Repository navigation
51 lines (41 loc) · 1.44 KB
/
Copy pathandroid.yml
File metadata and controls
51 lines (41 loc) · 1.44 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
name: Android Build
on:
push:
branches: [ "main" ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Android Rust targets
run: |
rustup target add aarch64-linux-android
rustup target add armv7-linux-androideabi
rustup target add i686-linux-android
rustup target add x86_64-linux-android
- name: Run clippy
run: cargo clippy --target aarch64-linux-android --all-targets -- -D warnings
- name: Run clippy on Android example code
working-directory: ./android/app-native
run: cargo clippy --target aarch64-linux-android --all-targets -- -D warnings
- name: Check formatting of Android example code
working-directory: ./android/app-native
run: cargo fmt --all -- --check
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run integration tests via test app
uses: reactivecircus/android-emulator-runner@v2
env:
RUST_BACKTRACE: 1
with:
api-level: 35
target: default
arch: x86_64
profile: pixel_6
script: cargo test --test android_api_test -- --include-ignored --nocapture