a #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ["**"] | |
merge_group: | |
types: [checks_requested] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: full | |
jobs: | |
android-test: | |
name: ${{ format('x86_64-linux-android {0}', matrix.features)}} | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
features: | |
[ | |
"", | |
"chains sm-raw-window-handle-06", | |
"chains sm-raw-window-handle-05", | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install rust | |
id: toolchain | |
uses: dtolnay/rust-toolchain@1.81.0 | |
with: | |
targets: x86_64-linux-android | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-dinghy | |
- 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 tests in android emulator | |
uses: reactivecircus/android-emulator-runner@v2 | |
env: | |
RANLIB: "${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib" | |
with: | |
api-level: 30 | |
arch: x86_64 | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: | | |
cargo dinghy all-platforms | |
cargo dinghy all-devices | |
cargo dinghy -p auto-android-x86_64-api30 --env RUST_BACKTRACE=${{ env.RUST_BACKTRACE }} test --features "${{ matrix.features }}" -- --test-threads 1 --nocapture |