From c939b21d7d69e9349bdb4108b5787239ebce65be Mon Sep 17 00:00:00 2001 From: Joao Dordio Date: Wed, 6 May 2026 15:00:06 +0100 Subject: [PATCH] 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 --- .github/workflows/build.yml | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b072cdad2..1dec50f5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,8 +60,14 @@ jobs: instrumentation-tests: name: Instrumentation tests - runs-on: macos-15-intel + runs-on: ubuntu-latest steps: + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -75,10 +81,34 @@ jobs: - run: touch local.properties + - name: AVD cache + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-29-x86_64-v1 + + - name: Create AVD snapshot + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@324029e2f414c084d8b15ba075288885e74aef9c # v2.34.0 + with: + api-level: 29 + arch: x86_64 + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim + disable-animations: false + script: echo "Generated AVD snapshot." + - name: Test - uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1 + uses: reactivecircus/android-emulator-runner@324029e2f414c084d8b15ba075288885e74aef9c # v2.34.0 with: - api-level: 28 + api-level: 29 + arch: x86_64 + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim + disable-animations: true script: ./gradlew :iterableapi:connectedCheck # Coverage reporting temporarily disabled