Skip to content

Commit c939b21

Browse files
committed
ci: migrate Instrumentation tests to ubuntu-latest with KVM + AVD cache
Move the required `Instrumentation tests` job off the flaky `macos-15-intel` runner. KVM-accelerated `ubuntu-latest` is the official `android-emulator-runner` recommendation, runs ~3x faster, and is dramatically more stable than the deprecating Intel mac fleet that has been failing this required check on master. - Bump `reactivecircus/android-emulator-runner` v2.30.1 -> v2.34.0 - Switch to API 29 x86_64 (better-supported image than legacy API 28 x86) - Add AVD cache + warm-up step to cut cold-start time - Pin all action SHAs
1 parent d457147 commit c939b21

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,14 @@ jobs:
6060

6161
instrumentation-tests:
6262
name: Instrumentation tests
63-
runs-on: macos-15-intel
63+
runs-on: ubuntu-latest
6464
steps:
65+
- name: Enable KVM
66+
run: |
67+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
68+
sudo udevadm control --reload-rules
69+
sudo udevadm trigger --name-match=kvm
70+
6571
- name: Checkout
6672
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6773

@@ -75,10 +81,34 @@ jobs:
7581

7682
- run: touch local.properties
7783

84+
- name: AVD cache
85+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
86+
id: avd-cache
87+
with:
88+
path: |
89+
~/.android/avd/*
90+
~/.android/adb*
91+
key: avd-29-x86_64-v1
92+
93+
- name: Create AVD snapshot
94+
if: steps.avd-cache.outputs.cache-hit != 'true'
95+
uses: reactivecircus/android-emulator-runner@324029e2f414c084d8b15ba075288885e74aef9c # v2.34.0
96+
with:
97+
api-level: 29
98+
arch: x86_64
99+
force-avd-creation: false
100+
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
101+
disable-animations: false
102+
script: echo "Generated AVD snapshot."
103+
78104
- name: Test
79-
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1
105+
uses: reactivecircus/android-emulator-runner@324029e2f414c084d8b15ba075288885e74aef9c # v2.34.0
80106
with:
81-
api-level: 28
107+
api-level: 29
108+
arch: x86_64
109+
force-avd-creation: false
110+
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
111+
disable-animations: true
82112
script: ./gradlew :iterableapi:connectedCheck
83113

84114
# Coverage reporting temporarily disabled

0 commit comments

Comments
 (0)