Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/dataconnect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,16 @@ jobs:
npm install --fund=false --audit=false --save --save-exact firebase-tools@${{ env.FDC_FIREBASE_TOOLS_VERSION }}

- name: Restore Gradle cache
id: restore-gradle-cache
uses: actions/cache/restore@v4
if: github.event_name != 'schedule'
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-cache-jqnvfzw6w7
key: gradle-cache-jqnvfzw6w7-${{ github.run_id }}
restore-keys: |
gradle-cache-jqnvfzw6w7-

- name: tool versions
continue-on-error: true
Expand Down Expand Up @@ -121,7 +124,7 @@ jobs:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-cache-jqnvfzw6w7-${{ github.run_id }}
key: ${{ steps.restore-gradle-cache.outputs.cache-primary-key }}

- name: Enable KVM group permissions for Android Emulator
run: |
Expand All @@ -133,24 +136,24 @@ jobs:
- name: Restore AVD cache
uses: actions/cache/restore@v4
if: github.event_name != 'schedule'
id: avd-cache
id: restore-avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}

- run: echo "github.event_name == '${{ github.event_name }}' steps.avd-cache.outputs.cache-hit == '${{ steps.avd-cache.outputs.cache-hit }}'"
key: avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-${{ github.run_id }}
restore-keys: |
avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-

- name: Create AVD
if: github.event_name == 'schedule' || steps.avd-cache.outputs.cache-hit != 'true'
if: github.event_name == 'schedule' || steps.restore-avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
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: false
disable-animations: true
script: echo "Generated AVD snapshot for caching."

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

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