Android Test #32
Workflow file for this run
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: Android Test | |
on: | |
merge_group: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
#android-arch: ["arm64-v8a", "x86_64"] | |
android-arch: ["x86_64"] | |
android-api-level: [29] | |
android-ndk-version: ["26.0.10792818"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Go Toolchain | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '=1.20.0' | |
- name: Rust Toolchain | |
run: | | |
rustup toolchain install stable --profile minimal --no-self-update | |
#rustup target add aarch64-linux-android | |
rustup target add x86_64-linux-android | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Avd Cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ matrix.android-api-level }} | |
- name: Avd Snapshot | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
env: | |
ANDROID_API_LEVEL: ${{ matrix.android-api-level }} | |
ANDROID_NDK_VERSION: ${{ matrix.android-ndk-version }} | |
ANDROID_ARCH: ${{ matrix.android-arch }} | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.android-api-level }} | |
ndk: ${{ matrix.android-ndk-version }} | |
arch: ${{ matrix.android-arch }} | |
target: google_apis | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: echo "Generated AVD snapshot for caching." | |
- name: Build and Run Tests | |
env: | |
ANDROID_API_LEVEL: ${{ matrix.android-api-level }} | |
ANDROID_NDK_VERSION: ${{ matrix.android-ndk-version }} | |
ANDROID_ARCH: ${{ matrix.android-arch }} | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.android-api-level }} | |
ndk: ${{ matrix.android-ndk-version }} | |
arch: ${{ matrix.android-arch }} | |
target: google_apis | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./android-build-tests.bash && ./android-run-tests.bash |