From 2e892a66888295cf3edc1b33c4f4df7792fdbb0f Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Tue, 5 Nov 2024 14:06:19 -0500 Subject: [PATCH] ci: Increase AVD cache key specificity Avoid erroneous cache hits that may result in the CI task hanging indefinitely while terminating the emulator. --- .github/workflows/rnmobile-android-runner.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rnmobile-android-runner.yml b/.github/workflows/rnmobile-android-runner.yml index a57b857aac6234..00e1905f8cf9da 100644 --- a/.github/workflows/rnmobile-android-runner.yml +++ b/.github/workflows/rnmobile-android-runner.yml @@ -20,6 +20,8 @@ jobs: matrix: native-test-name: [gutenberg-editor-rendering] api-level: [29] + target: [default, google_apis] + arch: [x86_64] steps: - name: checkout @@ -56,17 +58,18 @@ jobs: path: | ~/.android/avd/* ~/.android/adb* - key: avd-${{ matrix.api-level }} + key: avd-${{ matrix.api-level }}-${{ matrix.target }}-${{ matrix.arch }} - name: Create AVD and generate snapshot for caching if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # v2.33.0 with: api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false - arch: x86_64 + arch: ${{ matrix.arch }} profile: Nexus 6 script: echo "Generated AVD snapshot for caching." @@ -74,10 +77,11 @@ jobs: uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d # v2.33.0 with: api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true - arch: x86_64 + arch: ${{ matrix.arch }} profile: Nexus 6 script: npm run native test:e2e:android:local ${{ matrix.native-test-name }}