@@ -192,6 +192,8 @@ jobs:
192
192
env :
193
193
TOOLCHAIN_CHANNEL : DEVELOPMENT
194
194
DEVELOPER_DIR : /Applications/Xcode_13.2.1.app/Contents/Developer/
195
+ # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
196
+ SEGMENT_DOWNLOAD_TIMEOUT_MINS : 30
195
197
needs : [build-matrix]
196
198
if : ${{ always() }}
197
199
strategy :
@@ -233,20 +235,19 @@ jobs:
233
235
fetch-depth : 0
234
236
235
237
- name : Prepare sccache timestamp
236
- id : cache_timestamp
238
+ id : cache_key
237
239
run : |
238
- echo "::set-output name=timestamp::$ (date +'%Y-%m-%d-%I-%M-%S')"
240
+ echo "SCCACHE_KEY=${{ matrix.target }}-sccache-v13-$ (date +'%Y-%m-%d-%I-%M-%S')" >> $GITHUB_OUTPUT
239
241
240
242
- name : Check Xcode version
241
243
if : ${{ startsWith(matrix.build_os, 'macos-') }}
242
244
run : |
243
245
xcodebuild -version
244
246
245
- - uses : actions/cache@v3
246
- timeout-minutes : 30
247
+ - uses : actions/cache/restore@v3
247
248
with :
248
249
path : build-cache
249
- key : ${{ matrix.target }}-sccache-v13-${{ steps.cache_timestamp .outputs.timestamp }}
250
+ key : ${{ steps.cache_key .outputs.SCCACHE_KEY }}
250
251
restore-keys : |
251
252
${{ matrix.target }}-sccache-v13-
252
253
@@ -276,6 +277,11 @@ jobs:
276
277
277
278
- name : Check cache hit rate
278
279
run : sccache --show-stats
280
+ - uses : actions/cache/save@v3
281
+ if : ${{ always() }}
282
+ with :
283
+ path : build-cache
284
+ key : ${{ steps.cache_key.outputs.SCCACHE_KEY }}
279
285
280
286
- name : Upload ${{ matrix.target }} installable archive
281
287
uses : actions/upload-artifact@v1
0 commit comments