Skip to content

android ci

android ci #13

Workflow file for this run

name: Android Test
on:
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.18.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