Skip to content

dataconnect: github actions cache key fix #6829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 2, 2025
8 changes: 4 additions & 4 deletions .github/workflows/dataconnect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ steps.restore-gradle-cache.outputs.cache-primary-key }}
key: gradle-cache-jqnvfzw6w7-${{ github.run_id }}

- name: Enable KVM group permissions for Android Emulator
run: |
Expand All @@ -146,15 +146,15 @@ jobs:
avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-

- name: Create AVD
if: github.event_name == 'schedule' || steps.restore-avd-cache.outputs.cache-hit != 'true'
if: github.event_name == 'schedule' || steps.restore-avd-cache.outputs.cache-matched-key == ''
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
with:
api-level: ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: echo "Generated AVD snapshot for caching."
script: 'echo "Generated AVD snapshot for caching; event_name=${{ github.event_name }}, cache-matched-key=${{ steps.restore-avd-cache.outputs.cache-matched-key }}"'

- name: Save AVD cache
uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # 4.2.2
Expand All @@ -163,7 +163,7 @@ jobs:
path: |
~/.android/avd/*
~/.android/adb*
key: ${{ steps.restore-avd-cache.outputs.cache-primary-key }}
key: avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-${{ github.run_id }}

- name: Data Connect Emulator
run: |
Expand Down
Loading