File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -405,6 +405,17 @@ 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+ ls -lah /opt/cache
418+ ln -s /opt/cache/*.tar.* .
408419 - name : Build
409420 env :
410421 LLVM_VERSION : ${{needs.prepare.outputs.LLVM_VERSION}}
@@ -413,13 +424,20 @@ jobs:
413424 TAG : ${{needs.prepare.outputs.TAG}}
414425 BUILD_DATE : ${{needs.prepare.outputs.BUILD_DATE}}
415426 run : |
427+ ls -lah /opt/cache || true
416428 sudo apt-get update && sudo apt-get install libltdl-dev swig autoconf-archive
417429 ./build-make.sh $(pwd)/install/llvm-mingw --host=${{matrix.arch}}-w64-mingw32
418430 .github/workflows/store-version.sh install/llvm-mingw/versions.txt
419431 cd install
420432 NAME=llvm-mingw-$TAG-${{matrix.crt}}-${{matrix.arch}}
421433 mv llvm-mingw $NAME
422434 zip -9rq ../$NAME.zip $NAME
435+ cd ..
436+ set -x
437+ mkdir -p /opt/cache
438+ for i in make-*.tar.*; do
439+ if [ ! -L $i ]; then cp -a $i /opt/cache; fi
440+ done
423441 - uses : actions/upload-artifact@v4
424442 with :
425443 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