CI: download tarball if not already present on macos runners

This commit is contained in:
Andrew Kelley 2024-04-29 15:09:55 -07:00
parent e07ad33f1d
commit b018f2bae1
3 changed files with 18 additions and 7 deletions

View File

@ -13,6 +13,12 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
PREFIX="$HOME/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"
if [ ! -d "$PREFIX" ]; then
cd $HOME
curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"
tar xf "$CACHE_BASENAME.tar.xz"
fi
cd $ZIGDIR
# Make the `zig version` number consistent.

View File

@ -13,6 +13,12 @@ CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
PREFIX="$HOME/$CACHE_BASENAME"
ZIG="$PREFIX/bin/zig"
if [ ! -d "$PREFIX" ]; then
cd $HOME
curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"
tar xf "$CACHE_BASENAME.tar.xz"
fi
cd $ZIGDIR
# Make the `zig version` number consistent.

View File

@ -9,15 +9,14 @@ MCPU="baseline"
CACHE_BASENAME="zig+llvm+lld+clang-$TARGET-0.13.0-dev.69+c8b808826"
PREFIX="$HOME/$CACHE_BASENAME"
JOBS="-j3"
rm -rf $PREFIX
cd $HOME
curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"
tar xf "$CACHE_BASENAME.tar.xz"
ZIG="$PREFIX/bin/zig"
if [ ! -d "$PREFIX" ]; then
cd $HOME
curl -L -O "https://ziglang.org/deps/$CACHE_BASENAME.tar.xz"
tar xf "$CACHE_BASENAME.tar.xz"
fi
cd $ZIGDIR
# Make the `zig version` number consistent.