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 @@ -405,6 +405,16 @@ jobs:
405405 sudo mv llvm-mingw* /opt/llvm-mingw
406406 echo /opt/llvm-mingw/bin >> $GITHUB_PATH
407407 - uses : actions/checkout@v4
408+ - name : Cache downloads
409+ id : cache-tarballs
410+ uses : actions/cache@v4
411+ with :
412+ path : /opt/cache
413+ key : tarballs-${{ hashFiles('build-make.sh') }}
414+ - name : Restore cache
415+ if : steps.cache-tarballs.outputs.cache-hit != ''
416+ run : |
417+ ln -s /opt/cache/*.tar.* .
408418 - name : Build
409419 env :
410420 LLVM_VERSION : ${{needs.prepare.outputs.LLVM_VERSION}}
@@ -420,6 +430,13 @@ jobs:
420430 NAME=llvm-mingw-$TAG-${{matrix.crt}}-${{matrix.arch}}
421431 mv llvm-mingw $NAME
422432 zip -9rq ../$NAME.zip $NAME
433+ - name : Save cache
434+ if : steps.cache-tarballs.outputs.cache-hit != 'true'
435+ run : |
436+ mkdir -p /opt/cache
437+ for i in make-*.tar.*; do
438+ if [ ! -L $i ]; then cp -a $i /opt/cache; fi
439+ done
423440 - uses : actions/upload-artifact@v4
424441 with :
425442 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