Re-enabled the emulator caching in CI.

This commit is contained in:
MohitMaliFtechiz 2024-09-04 15:06:23 +05:30
parent 829ec5301c
commit 9d3c275ca8

View File

@ -43,6 +43,33 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- 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 }}
target: default
arch: x86_64
profile: pixel_2
ram-size: 4096M
force-avd-creation: false
sdcard-path-or-size: 2048M
cores: 4
disable-animations: false
heap-size: 512M
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
channel: canary
script: echo "Generated AVD snapshot for caching."
- name: create instrumentation coverage
uses: reactivecircus/android-emulator-runner@v2
env:
@ -54,8 +81,10 @@ jobs:
profile: pixel_2
ram-size: 4096M
cores: 4
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
sdcard-path-or-size: 2048M
disable-animations: true
force-avd-creation: false
heap-size: 512M
emulator-boot-timeout: 1200
script: bash contrib/instrumentation.sh
@ -71,8 +100,10 @@ jobs:
profile: pixel_2
ram-size: 3072M
cores: 4
sdcard-path-or-size: 1024M
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
force-avd-creation: false
sdcard-path-or-size: 1024M
emulator-boot-timeout: 1200
heap-size: 512M
script: bash contrib/instrumentation-customapps.sh