Skip to content

Commit ef66fc8

Browse files
committed
chore(ci): firebase emulators are cross-platform, share cache across OSs
the downloaded/cached files are pure javascript and java, they may be shared across operating systems safely
1 parent 0dd19a5 commit ef66fc8

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

.github/workflows/android.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ jobs:
5656
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
5757
continue-on-error: true
5858
with:
59+
# The firebase emulators are pure javascript and java, OS-independent
60+
enableCrossOsArchive: true
5961
# Must match the save path exactly
6062
path: ~/.cache/firebase/emulators
61-
key: firebase-emulators-v3-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
63+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
6264
restore-keys: firebase-emulators-v3
6365
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
6466
with:

.github/workflows/e2e_tests_fdc.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ jobs:
5050
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
5151
continue-on-error: true
5252
with:
53+
# The firebase emulators are pure javascript and java, OS-independent
54+
enableCrossOsArchive: true
5355
# Must match the save path exactly
5456
path: ~/.cache/firebase/emulators
55-
key: firebase-emulators-v3-fdc-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
57+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
5658
restore-keys: firebase-emulators-v3
5759
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
5860
with:
@@ -169,9 +171,11 @@ jobs:
169171
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
170172
continue-on-error: true
171173
with:
174+
# The firebase emulators are pure javascript and java, OS-independent
175+
enableCrossOsArchive: true
172176
# Must match the save path exactly
173177
path: ~/.cache/firebase/emulators
174-
key: firebase-emulators-v3-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
178+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
175179
restore-keys: firebase-emulators-v3
176180
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
177181
with:
@@ -269,9 +273,11 @@ jobs:
269273
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
270274
continue-on-error: true
271275
with:
276+
# The firebase emulators are pure javascript and java, OS-independent
277+
enableCrossOsArchive: true
272278
# Must match the save path exactly
273279
path: ~/.cache/firebase/emulators
274-
key: firebase-emulators-v3-fdc-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
280+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
275281
restore-keys: firebase-emulators-v3
276282
- name: Start Firebase Emulator
277283
run: |

.github/workflows/ios.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ jobs:
6868
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
6969
continue-on-error: true
7070
with:
71+
# The firebase emulators are pure javascript and java, OS-independent
72+
enableCrossOsArchive: true
7173
# Must match the save path exactly
7274
path: ~/.cache/firebase/emulators
73-
key: firebase-emulators-v3-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
75+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
7476
restore-keys: firebase-emulators-v3
7577
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
7678
with:

.github/workflows/macos.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ jobs:
6666
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
6767
continue-on-error: true
6868
with:
69+
# The firebase emulators are pure javascript and java, OS-independent
70+
enableCrossOsArchive: true
6971
# Must match the save path exactly
7072
path: ~/.cache/firebase/emulators
71-
key: firebase-emulators-v3-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
73+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
7274
restore-keys: firebase-emulators-v3
7375
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
7476
with:

.github/workflows/web.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ jobs:
6464
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
6565
continue-on-error: true
6666
with:
67+
# The firebase emulators are pure javascript and java, OS-independent
68+
enableCrossOsArchive: true
6769
# Must match the save path exactly
6870
path: ~/.cache/firebase/emulators
69-
key: firebase-emulators-v3-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
71+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
7072
restore-keys: firebase-emulators-v3
7173
- name: Start Firebase Emulator
7274
run: sudo chown -R 501:20 "/Users/runner/.npm" && cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
@@ -130,9 +132,11 @@ jobs:
130132
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
131133
continue-on-error: true
132134
with:
135+
# The firebase emulators are pure javascript and java, OS-independent
136+
enableCrossOsArchive: true
133137
# Must match the save path exactly
134138
path: ~/.cache/firebase/emulators
135-
key: firebase-emulators-v3-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
139+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
136140
restore-keys: firebase-emulators-v3
137141
- name: Start Firebase Emulator
138142
run: sudo chown -R 501:20 "/Users/runner/.npm" && cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
@@ -201,9 +205,11 @@ jobs:
201205
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
202206
continue-on-error: true
203207
with:
208+
# The firebase emulators are pure javascript and java, OS-independent
209+
enableCrossOsArchive: true
204210
# Must match the save path exactly
205211
path: ~/.cache/firebase/emulators
206-
key: firebase-emulators-v3-${{ runner.os }}-${{ env.FIREBASE_TOOLS_VERSION }}
212+
key: firebase-emulators-v3-${{ env.FIREBASE_TOOLS_VERSION }}
207213
restore-keys: firebase-emulators-v3
208214
- name: Start Firebase Emulator
209215
run: sudo chown -R 501:20 "/Users/runner/.npm" && cd ./.github/workflows/scripts && ./start-firebase-emulator.sh

0 commit comments

Comments
 (0)