-
Notifications
You must be signed in to change notification settings - Fork 86
83 lines (67 loc) · 2.07 KB
/
Copy pathci.yml
File metadata and controls
83 lines (67 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build-rust-app:
name: Build Rust App on ${{ matrix.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
- os: windows-latest
platform: windows
- os: macos-latest
platform: macos
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: taiki-e/install-action@just
- name: Install dependencies (Linux)
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libjack-jackd2-dev libpipewire-0.3-dev libpulse-dev libxkbcommon-dev protobuf-compiler
- name: Install dependencies (Windows)
if: matrix.platform == 'windows'
run: choco install protoc -y
- name: Install dependencies (macOS)
if: matrix.platform == 'macos'
run: brew install protobuf --quiet
- name: Install Rust toolchain
run: rustup update
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "./RustApp -> target"
- name: Build
working-directory: ./RustApp
run: just build-debug
build-android-app:
name: Build Android App
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: "21"
distribution: "temurin"
cache: gradle
- name: Build APK
working-directory: ./Android
run: ./gradlew assembleDebug