From c9cc202664a771ba81862d7dddf1aeb11feb33a5 Mon Sep 17 00:00:00 2001 From: stefanosiano Date: Mon, 10 Jul 2023 17:57:54 +0200 Subject: [PATCH 1/3] android emulators used for tests are now cached --- .github/workflows/agp-matrix.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/agp-matrix.yml b/.github/workflows/agp-matrix.yml index 11e7bfe7c7a..bf1c240a147 100644 --- a/.github/workflows/agp-matrix.yml +++ b/.github/workflows/agp-matrix.yml @@ -47,11 +47,32 @@ jobs: - name: Make assembleUiTests run: make assembleUiTests + - name: AVD cache + uses: actions/cache@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: aosp_atd + # We stop gradle at the end to make sure the cache folders # don't contain any lock files and are free to be cached. - name: Make stop run: make stop + - name: create AVD and generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #pin@v2.28.0 + with: + api-level: 30 + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + target: 'aosp_atd' + channel: canary # Necessary for ATDs + script: echo "Generated AVD snapshot for caching." + - name: Run instrumentation tests uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # pin@v2 with: From 2f92ce342a1610dc4426cb47ab3dff89f7c440fa Mon Sep 17 00:00:00 2001 From: stefanosiano Date: Tue, 11 Jul 2023 09:30:19 +0200 Subject: [PATCH 2/3] moved cache earlier --- .github/workflows/agp-matrix.yml | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/agp-matrix.yml b/.github/workflows/agp-matrix.yml index bf1c240a147..70de3b6cf89 100644 --- a/.github/workflows/agp-matrix.yml +++ b/.github/workflows/agp-matrix.yml @@ -16,6 +16,27 @@ jobs: with: access_token: ${{ github.token }} + - name: AVD cache + uses: actions/cache@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: aosp_atd + + - name: create AVD and generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # pin@v2 + with: + api-level: 30 + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + target: 'aosp_atd' + channel: canary # Necessary for ATDs + script: echo "Generated AVD snapshot for caching." + agp-matrix-compatibility: timeout-minutes: 30 runs-on: macos-latest @@ -47,32 +68,11 @@ jobs: - name: Make assembleUiTests run: make assembleUiTests - - name: AVD cache - uses: actions/cache@v3 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: aosp_atd - # We stop gradle at the end to make sure the cache folders # don't contain any lock files and are free to be cached. - name: Make stop run: make stop - - name: create AVD and generate snapshot for caching - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #pin@v2.28.0 - with: - api-level: 30 - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: true - target: 'aosp_atd' - channel: canary # Necessary for ATDs - script: echo "Generated AVD snapshot for caching." - - name: Run instrumentation tests uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # pin@v2 with: From c384fd16bb79e0cb00be8d9309a191565069316d Mon Sep 17 00:00:00 2001 From: stefanosiano Date: Tue, 11 Jul 2023 09:58:17 +0200 Subject: [PATCH 3/3] moved cache earlier --- .github/workflows/agp-matrix.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/agp-matrix.yml b/.github/workflows/agp-matrix.yml index 70de3b6cf89..c0c409c3252 100644 --- a/.github/workflows/agp-matrix.yml +++ b/.github/workflows/agp-matrix.yml @@ -73,6 +73,15 @@ jobs: - name: Make stop run: make stop + - name: AVD cache + uses: actions/cache@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: aosp_atd + - name: Run instrumentation tests uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # pin@v2 with: