@@ -39,11 +39,11 @@ jobs:
3939 path : |
4040 ~/.cache/go-build
4141 ~/go/pkg/mod
42- - name : Cache LLVM source
43- uses : actions/cache@v3
42+ - name : Restore LLVM source cache
43+ uses : actions/cache/restore @v3
4444 id : cache-llvm-source
4545 with :
46- key : llvm-source-15-linux-alpine-v2
46+ key : llvm-source-15-linux-alpine-v3
4747 path : |
4848 llvm-project/clang/lib/Headers
4949 llvm-project/clang/include
@@ -53,11 +53,22 @@ jobs:
5353 - name : Download LLVM source
5454 if : steps.cache-llvm-source.outputs.cache-hit != 'true'
5555 run : make llvm-source
56- - name : Cache LLVM build
57- uses : actions/cache@v3
56+ - name : Save LLVM source cache
57+ uses : actions/cache/save@v3
58+ if : steps.cache-llvm-source.outputs.cache-hit != 'true'
59+ with :
60+ key : ${{ steps.cache-llvm-source.outputs.cache-primary-key }}
61+ path : |
62+ llvm-project/clang/lib/Headers
63+ llvm-project/clang/include
64+ llvm-project/compiler-rt
65+ llvm-project/lld/include
66+ llvm-project/llvm/include
67+ - name : Restore LLVM build cache
68+ uses : actions/cache/restore@v3
5869 id : cache-llvm-build
5970 with :
60- key : llvm-build-15-linux-alpine-v3
71+ key : llvm-build-15-linux-alpine-v4
6172 path : llvm-build
6273 - name : Build LLVM
6374 if : steps.cache-llvm-build.outputs.cache-hit != 'true'
7182 make llvm-build
7283 # Remove unnecessary object files (to reduce cache size).
7384 find llvm-build -name CMakeFiles -prune -exec rm -r '{}' \;
85+ - name : Save LLVM build cache
86+ uses : actions/cache/save@v3
87+ if : steps.cache-llvm-build.outputs.cache-hit != 'true'
88+ with :
89+ key : ${{ steps.cache-llvm-build.outputs.cache-primary-key }}
90+ path : llvm-build
7491 - name : Cache Binaryen
7592 uses : actions/cache@v3
7693 id : cache-binaryen
@@ -168,11 +185,11 @@ jobs:
168185 run : |
169186 curl https://wasmtime.dev/install.sh -sSf | bash
170187 echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
171- - name : Cache LLVM source
172- uses : actions/cache@v3
188+ - name : Restore LLVM source cache
189+ uses : actions/cache/restore @v3
173190 id : cache-llvm-source
174191 with :
175- key : llvm-source-15-linux-asserts-v2
192+ key : llvm-source-15-linux-asserts-v3
176193 path : |
177194 llvm-project/clang/lib/Headers
178195 llvm-project/clang/include
@@ -182,11 +199,22 @@ jobs:
182199 - name : Download LLVM source
183200 if : steps.cache-llvm-source.outputs.cache-hit != 'true'
184201 run : make llvm-source
185- - name : Cache LLVM build
186- uses : actions/cache@v3
202+ - name : Save LLVM source cache
203+ uses : actions/cache/save@v3
204+ if : steps.cache-llvm-source.outputs.cache-hit != 'true'
205+ with :
206+ key : ${{ steps.cache-llvm-source.outputs.cache-primary-key }}
207+ path : |
208+ llvm-project/clang/lib/Headers
209+ llvm-project/clang/include
210+ llvm-project/compiler-rt
211+ llvm-project/lld/include
212+ llvm-project/llvm/include
213+ - name : Restore LLVM build cache
214+ uses : actions/cache/restore@v3
187215 id : cache-llvm-build
188216 with :
189- key : llvm-build-15-linux-asserts-v3
217+ key : llvm-build-15-linux-asserts-v4
190218 path : llvm-build
191219 - name : Build LLVM
192220 if : steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -198,6 +226,12 @@ jobs:
198226 make llvm-build ASSERT=1
199227 # Remove unnecessary object files (to reduce cache size).
200228 find llvm-build -name CMakeFiles -prune -exec rm -r '{}' \;
229+ - name : Save LLVM build cache
230+ uses : actions/cache/save@v3
231+ if : steps.cache-llvm-build.outputs.cache-hit != 'true'
232+ with :
233+ key : ${{ steps.cache-llvm-build.outputs.cache-primary-key }}
234+ path : llvm-build
201235 - name : Cache Binaryen
202236 uses : actions/cache@v3
203237 id : cache-binaryen
@@ -254,11 +288,11 @@ jobs:
254288 with :
255289 go-version : ' 1.20'
256290 cache : true
257- - name : Cache LLVM source
258- uses : actions/cache@v3
291+ - name : Restore LLVM source cache
292+ uses : actions/cache/restore @v3
259293 id : cache-llvm-source
260294 with :
261- key : llvm-source-15-linux-v2
295+ key : llvm-source-15-linux-v3
262296 path : |
263297 llvm-project/clang/lib/Headers
264298 llvm-project/clang/include
@@ -268,11 +302,22 @@ jobs:
268302 - name : Download LLVM source
269303 if : steps.cache-llvm-source.outputs.cache-hit != 'true'
270304 run : make llvm-source
271- - name : Cache LLVM build
272- uses : actions/cache@v3
305+ - name : Save LLVM source cache
306+ uses : actions/cache/save@v3
307+ if : steps.cache-llvm-source.outputs.cache-hit != 'true'
308+ with :
309+ key : ${{ steps.cache-llvm-source.outputs.cache-primary-key }}
310+ path : |
311+ llvm-project/clang/lib/Headers
312+ llvm-project/clang/include
313+ llvm-project/compiler-rt
314+ llvm-project/lld/include
315+ llvm-project/llvm/include
316+ - name : Restore LLVM build cache
317+ uses : actions/cache/restore@v3
273318 id : cache-llvm-build
274319 with :
275- key : llvm-build-15-linux-arm-v3
320+ key : llvm-build-15-linux-arm-v4
276321 path : llvm-build
277322 - name : Build LLVM
278323 if : steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -286,6 +331,12 @@ jobs:
286331 make llvm-build CROSS=arm-linux-gnueabihf
287332 # Remove unnecessary object files (to reduce cache size).
288333 find llvm-build -name CMakeFiles -prune -exec rm -r '{}' \;
334+ - name : Save LLVM build cache
335+ uses : actions/cache/save@v3
336+ if : steps.cache-llvm-build.outputs.cache-hit != 'true'
337+ with :
338+ key : ${{ steps.cache-llvm-build.outputs.cache-primary-key }}
339+ path : llvm-build
289340 - name : Cache Binaryen
290341 uses : actions/cache@v3
291342 id : cache-binaryen
@@ -354,11 +405,11 @@ jobs:
354405 with :
355406 go-version : ' 1.20'
356407 cache : true
357- - name : Cache LLVM source
358- uses : actions/cache@v3
408+ - name : Restore LLVM source cache
409+ uses : actions/cache/restore @v3
359410 id : cache-llvm-source
360411 with :
361- key : llvm-source-15-linux-v2
412+ key : llvm-source-15-linux-v3
362413 path : |
363414 llvm-project/clang/lib/Headers
364415 llvm-project/clang/include
@@ -368,11 +419,22 @@ jobs:
368419 - name : Download LLVM source
369420 if : steps.cache-llvm-source.outputs.cache-hit != 'true'
370421 run : make llvm-source
371- - name : Cache LLVM build
372- uses : actions/cache@v3
422+ - name : Save LLVM source cache
423+ uses : actions/cache/save@v3
424+ if : steps.cache-llvm-source.outputs.cache-hit != 'true'
425+ with :
426+ key : ${{ steps.cache-llvm-source.outputs.cache-primary-key }}
427+ path : |
428+ llvm-project/clang/lib/Headers
429+ llvm-project/clang/include
430+ llvm-project/compiler-rt
431+ llvm-project/lld/include
432+ llvm-project/llvm/include
433+ - name : Restore LLVM build cache
434+ uses : actions/cache/restore@v3
373435 id : cache-llvm-build
374436 with :
375- key : llvm-build-15-linux-arm64-v3
437+ key : llvm-build-15-linux-arm64-v4
376438 path : llvm-build
377439 - name : Build LLVM
378440 if : steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -384,6 +446,12 @@ jobs:
384446 make llvm-build CROSS=aarch64-linux-gnu
385447 # Remove unnecessary object files (to reduce cache size).
386448 find llvm-build -name CMakeFiles -prune -exec rm -r '{}' \;
449+ - name : Save LLVM build cache
450+ uses : actions/cache/save@v3
451+ if : steps.cache-llvm-build.outputs.cache-hit != 'true'
452+ with :
453+ key : ${{ steps.cache-llvm-build.outputs.cache-primary-key }}
454+ path : llvm-build
387455 - name : Cache Binaryen
388456 uses : actions/cache@v3
389457 id : cache-binaryen
0 commit comments