-
Notifications
You must be signed in to change notification settings - Fork 6
76 lines (70 loc) · 2.45 KB
/
android.yml
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
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