File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -411,6 +411,16 @@ jobs:
411411 - uses : actions/download-artifact@v4
412412 with :
413413 name : profile
414+ - name : Cache downloads
415+ id : cache-tarballs
416+ uses : actions/cache@v4
417+ with :
418+ path : /opt/cache
419+ key : tarballs-${{ hashFiles('build-make.sh') }}
420+ - name : Restore cache
421+ if : steps.cache-tarballs.outputs.cache-hit != ''
422+ run : |
423+ ln -s /opt/cache/*.tar.* .
414424 - name : Build
415425 env :
416426 LLVM_VERSION : ${{needs.prepare.outputs.LLVM_VERSION}}
@@ -427,6 +437,13 @@ jobs:
427437 NAME=llvm-mingw-$TAG-${{matrix.crt}}-${{matrix.arch}}
428438 mv llvm-mingw $NAME
429439 zip -9rq ../$NAME.zip $NAME
440+ - name : Save cache
441+ if : steps.cache-tarballs.outputs.cache-hit != 'true'
442+ run : |
443+ mkdir -p /opt/cache
444+ for i in make-*.tar.*; do
445+ if [ ! -L $i ]; then cp -a $i /opt/cache; fi
446+ done
430447 - uses : actions/upload-artifact@v4
431448 with :
432449 name : windows-${{matrix.crt}}-${{matrix.arch}}-toolchain
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ download() {
5252}
5353
5454if [ ! -d make-$MAKE_VERSION ]; then
55- download https://ftpmirror.gnu.org/gnu/make/make-$MAKE_VERSION .tar.gz
55+ if [ ! -e make-$MAKE_VERSION .tar.gz ]; then
56+ download https://ftpmirror.gnu.org/gnu/make/make-$MAKE_VERSION .tar.gz
57+ fi
5658 tar -zxf make-$MAKE_VERSION .tar.gz
5759fi
5860
You can’t perform that action at this time.
0 commit comments