Skip to content

Commit

Permalink
ci: add cache and api target 31
Browse files Browse the repository at this point in the history
  • Loading branch information
ujizin committed Sep 8, 2024
1 parent b374dc4 commit 34438eb
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/android_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [21, 26, 29]
api-level: [21, 26, 29, 31]
include:
- api-level: 21
arch: 'x86'
- api-level: 26
arch: 'x86_64'
- api-level: 29
arch: 'x86_64'
- api-level: 31
arch: 'x86_64'
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -37,6 +39,28 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Gradle cache
uses: gradle/actions/setup-gradle@v3

- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}

- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-window -no-boot-anim -camera-back emulated -camera-front emulated -gpu swiftshader_indirect
disable-animations: false
script: echo "Generated AVD snapshot for caching."

- name: run android tests
uses: reactivecircus/android-emulator-runner@v2
with:
Expand Down

0 comments on commit 34438eb

Please sign in to comment.