From abd9cc6eed9ac64f64ab8419dae87914eb06cb37 Mon Sep 17 00:00:00 2001 From: Anton Shilov Date: Mon, 21 Jun 2021 20:38:38 +0300 Subject: [PATCH 1/2] Add avd snapshot caching --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59a6bad26..18f110586 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,11 +128,34 @@ jobs: restore-keys: | ${{ runner.os }}-gradle-${{ matrix.compose-enabled }}- ${{ runner.os }}-gradle- + + - uses: actions/cache@v2 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd + + + - name: generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: false + script: echo "Generated AVD snapshot for caching." + - name: Instrumentation tests uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} arch: x86 + force-avd-creation: false + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true script: ./gradlew connectedCheck -PuseCompose=${{ matrix.compose-enabled }} - name: Upload failure reports From 6bdc76ec1273f8c148da6ba9b0c2f88459fc7968 Mon Sep 17 00:00:00 2001 From: Anton Shilov Date: Wed, 23 Jun 2021 12:11:28 +0300 Subject: [PATCH 2/2] Add cache key for every sdk version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18f110586..6b04b3331 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,7 @@ jobs: path: | ~/.android/avd/* ~/.android/adb* - key: avd + key: avd-${{ matrix.api-level }} - name: generate snapshot for caching