github: Cache the gnu make tarball
This avoids breaking the build if the gnu download server is unavailable.
This commit is contained in:
1 parent
06e91d01b0
commit
b0bbde0073
2 files changed
+19
No files matched your search
@@ -411,6 +411,16 @@ jobs:
|
|||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: profile
|
name: profile
|
||||||
|
- name: Cache downloads
|
||||||
|
id: cache-tarballs
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /opt/cache
|
||||||
|
key: tarballs-${{ hashFiles('build-make.sh') }}
|
||||||
|
- name: Restore cache
|
||||||
|
if: steps.cache-tarballs.outputs.cache-hit != ''
|
||||||
|
run: |
|
||||||
|
ln -s /opt/cache/*.tar.* .
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
|
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
|
||||||
@@ -427,6 +437,13 @@ jobs:
|
|||||||
NAME=llvm-mingw-$TAG-${{matrix.crt}}-${{matrix.arch}}
|
NAME=llvm-mingw-$TAG-${{matrix.crt}}-${{matrix.arch}}
|
||||||
mv llvm-mingw $NAME
|
mv llvm-mingw $NAME
|
||||||
zip -9rq ../$NAME.zip $NAME
|
zip -9rq ../$NAME.zip $NAME
|
||||||
|
- name: Save cache
|
||||||
|
if: steps.cache-tarballs.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
mkdir -p /opt/cache
|
||||||
|
for i in make-*.tar.*; do
|
||||||
|
if [ ! -L $i ]; then cp -a $i /opt/cache; fi
|
||||||
|
done
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: windows-${{matrix.crt}}-${{matrix.arch}}-toolchain
|
name: windows-${{matrix.crt}}-${{matrix.arch}}-toolchain
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ download() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -d make-$MAKE_VERSION ]; then
|
if [ ! -d make-$MAKE_VERSION ]; then
|
||||||
|
if [ ! -e make-$MAKE_VERSION.tar.gz ]; then
|
||||||
download https://ftpmirror.gnu.org/gnu/make/make-$MAKE_VERSION.tar.gz
|
download https://ftpmirror.gnu.org/gnu/make/make-$MAKE_VERSION.tar.gz
|
||||||
|
fi
|
||||||
tar -zxf make-$MAKE_VERSION.tar.gz
|
tar -zxf make-$MAKE_VERSION.tar.gz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user