From 7319626116d98b9fcf5130103ca130df693bb8df Mon Sep 17 00:00:00 2001 From: Yang Date: Sat, 12 Oct 2024 17:18:11 +1100 Subject: [PATCH] Revert avd caching. --- .github/workflows/main.yml | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 191918633..06c078931 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,14 +56,14 @@ jobs: distribution: 'zulu' java-version: 23 - # - uses: actions/cache@v4 - # id: avd-cache - # with: - # path: | - # ~/.android/avd/* - # ~/.android/adb* - # ~/.android/debug.keystore - # key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.arch }} + - uses: actions/cache@v4 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + ~/.android/debug.keystore + key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.arch }} - uses: gradle/actions/setup-gradle@v4 @@ -78,23 +78,23 @@ jobs: sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm - # - name: run emulator to generate snapshot for caching - # if: steps.avd-cache.outputs.cache-hit != 'true' - # uses: ./ - # with: - # api-level: ${{ matrix.api-level }} - # target: ${{ matrix.target }} - # arch: ${{ matrix.arch }} - # profile: Galaxy Nexus - # cores: 2 - # sdcard-path-or-size: 100M - # avd-name: test - # force-avd-creation: false - # emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - # disable-animations: false - # working-directory: ./test-fixture/ - # channel: canary - # script: echo "Generated AVD snapshot for caching." + - name: run emulator to generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: ./ + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: ${{ matrix.arch }} + profile: Galaxy Nexus + cores: 2 + sdcard-path-or-size: 100M + avd-name: test + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: false + working-directory: ./test-fixture/ + channel: canary + script: echo "Generated AVD snapshot for caching." - name: run action uses: ./