From b018f2bae189cbcf2476b4147b108b815af149bc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 29 Apr 2024 15:09:55 -0700 Subject: [PATCH] CI: download tarball if not already present on macos runners --- ci/aarch64-macos-debug.sh | 6 ++++++ ci/aarch64-macos-release.sh | 6 ++++++ ci/x86_64-macos-release.sh | 13 ++++++------- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ci/aarch64-macos-debug.sh b/ci/aarch64-macos-debug.sh index 3a8c1938d3..0de04c5b8d 100755 --- a/ci/aarch64-macos-debug.sh +++ b/ci/aarch64-macos-debug.sh @@ -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. diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index 3d35b49bd7..3d7b4ec541 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -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. diff --git a/ci/x86_64-macos-release.sh b/ci/x86_64-macos-release.sh index 3dfbfd3cc0..6e75a1056d 100755 --- a/ci/x86_64-macos-release.sh +++ b/ci/x86_64-macos-release.sh @@ -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.