@@ -73,13 +73,16 @@ jobs:
73
73
npm install --fund=false --audit=false --save --save-exact firebase-tools@${{ env.FDC_FIREBASE_TOOLS_VERSION }}
74
74
75
75
- name : Restore Gradle cache
76
+ id : restore-gradle-cache
76
77
uses : actions/cache/restore@v4
77
78
if : github.event_name != 'schedule'
78
79
with :
79
80
path : |
80
81
~/.gradle/caches
81
82
~/.gradle/wrapper
82
- key : gradle-cache-jqnvfzw6w7
83
+ key : gradle-cache-jqnvfzw6w7-${{ github.run_id }}
84
+ restore-keys : |
85
+ gradle-cache-jqnvfzw6w7-
83
86
84
87
- name : tool versions
85
88
continue-on-error : true
@@ -121,7 +124,7 @@ jobs:
121
124
path : |
122
125
~/.gradle/caches
123
126
~/.gradle/wrapper
124
- key : gradle-cache-jqnvfzw6w7- ${{ github.run_id }}
127
+ key : ${{ steps.restore-gradle-cache.outputs.cache-primary-key }}
125
128
126
129
- name : Enable KVM group permissions for Android Emulator
127
130
run : |
@@ -133,24 +136,24 @@ jobs:
133
136
- name : Restore AVD cache
134
137
uses : actions/cache/restore@v4
135
138
if : github.event_name != 'schedule'
136
- id : avd-cache
139
+ id : restore- avd-cache
137
140
with :
138
141
path : |
139
142
~/.android/avd/*
140
143
~/.android/adb*
141
- key : avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
142
-
143
- - run : echo "github.event_name == '${{ github.event_name }}' steps. avd-cache.outputs.cache-hit == ' ${{ steps.avd-cache.outputs.cache-hit }}'"
144
+ key : avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-${{ github.run_id }}
145
+ restore-keys : |
146
+ avd-cache-zhdsn586je-api ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-
144
147
145
148
- name : Create AVD
146
- if : github.event_name == 'schedule' || steps.avd-cache.outputs.cache-hit != 'true'
149
+ if : github.event_name == 'schedule' || steps.restore- avd-cache.outputs.cache-hit != 'true'
147
150
uses : reactivecircus/android-emulator-runner@v2
148
151
with :
149
152
api-level : ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
150
153
arch : x86_64
151
154
force-avd-creation : false
152
155
emulator-options : -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
153
- disable-animations : false
156
+ disable-animations : true
154
157
script : echo "Generated AVD snapshot for caching."
155
158
156
159
- name : Save AVD cache
@@ -160,7 +163,7 @@ jobs:
160
163
path : |
161
164
~/.android/avd/*
162
165
~/.android/adb*
163
- key : avd-cache-zhdsn586je-api ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-${{ github.run_id }}
166
+ key : ${{ steps.restore-avd-cache.outputs.cache-primary-key }}
164
167
165
168
- name : Data Connect Emulator
166
169
run : |
0 commit comments