fix(ci): use GitHub releases for Zig download with better error handling
Some checks failed
CI with Native Libraries / Build Release Libraries (push) Blocked by required conditions
Security Scan / Security Analysis (push) Waiting to run
Security Scan / Native Library Security (push) Waiting to run
Checkout test / test (push) Successful in 4s
CI with Native Libraries / Check Build Environment (push) Successful in 11s
CI/CD Pipeline / Test (push) Failing after 5m7s
CI/CD Pipeline / Dev Compose Smoke Test (push) Has been skipped
CI/CD Pipeline / Build (push) Has been skipped
CI/CD Pipeline / Test Scripts (push) Has been skipped
CI/CD Pipeline / Security Scan (push) Failing after 4m50s
Documentation / build-and-publish (push) Failing after 26s
CI with Native Libraries / Build and Test Native Libraries (push) Failing after 2h5m54s
CI/CD Pipeline / Docker Build (push) Has been skipped
Some checks failed
CI with Native Libraries / Build Release Libraries (push) Blocked by required conditions
Security Scan / Security Analysis (push) Waiting to run
Security Scan / Native Library Security (push) Waiting to run
Checkout test / test (push) Successful in 4s
CI with Native Libraries / Check Build Environment (push) Successful in 11s
CI/CD Pipeline / Test (push) Failing after 5m7s
CI/CD Pipeline / Dev Compose Smoke Test (push) Has been skipped
CI/CD Pipeline / Build (push) Has been skipped
CI/CD Pipeline / Test Scripts (push) Has been skipped
CI/CD Pipeline / Security Scan (push) Failing after 4m50s
Documentation / build-and-publish (push) Failing after 26s
CI with Native Libraries / Build and Test Native Libraries (push) Failing after 2h5m54s
CI/CD Pipeline / Docker Build (push) Has been skipped
- Switch from ziglang.org/download to github.com/ziglang/zig/releases - Add curl -fsSL --retry 3 for reliable downloads - Use file-based extraction instead of pipe-to-tar for verification
This commit is contained in:
parent
ed7b5032a9
commit
169dd98642
1 changed files with 20 additions and 8 deletions
|
|
@ -77,13 +77,19 @@ jobs:
|
|||
echo "Zig ${ZIG_VERSION} already installed - skipping download"
|
||||
else
|
||||
echo "Installing Zig ${ZIG_VERSION}..."
|
||||
ZIG_DIR="/usr/local/zig-${ZIG_VERSION}"
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
curl -sL "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz" | sudo tar -C /usr/local -xJf -
|
||||
sudo ln -sf "/usr/local/zig-linux-x86_64-${ZIG_VERSION}/zig" /usr/local/bin/zig
|
||||
curl -fsSL --retry 3 "https://github.com/ziglang/zig/releases/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz" -o /tmp/zig.tar.xz
|
||||
sudo mkdir -p "${ZIG_DIR}"
|
||||
sudo tar -C "${ZIG_DIR}" --strip-components=1 -xJf /tmp/zig.tar.xz
|
||||
sudo ln -sf "${ZIG_DIR}/zig" /usr/local/bin/zig
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
curl -sL "https://ziglang.org/download/${ZIG_VERSION}/zig-macos-x86_64-${ZIG_VERSION}.tar.xz" | sudo tar -C /usr/local -xJf -
|
||||
sudo ln -sf "/usr/local/zig-macos-x86_64-${ZIG_VERSION}/zig" /usr/local/bin/zig
|
||||
curl -fsSL --retry 3 "https://github.com/ziglang/zig/releases/download/${ZIG_VERSION}/zig-macos-x86_64-${ZIG_VERSION}.tar.xz" -o /tmp/zig.tar.xz
|
||||
sudo mkdir -p "${ZIG_DIR}"
|
||||
sudo tar -C "${ZIG_DIR}" --strip-components=1 -xJf /tmp/zig.tar.xz
|
||||
sudo ln -sf "${ZIG_DIR}/zig" /usr/local/bin/zig
|
||||
fi
|
||||
rm -f /tmp/zig.tar.xz
|
||||
echo "Zig ${ZIG_VERSION} installed"
|
||||
fi
|
||||
zig version
|
||||
|
|
@ -188,13 +194,19 @@ jobs:
|
|||
echo "Zig ${ZIG_VERSION} already installed - skipping download"
|
||||
else
|
||||
echo "Installing Zig ${ZIG_VERSION}..."
|
||||
ZIG_DIR="/usr/local/zig-${ZIG_VERSION}"
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
curl -sL "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz" | sudo tar -C /usr/local -xJf -
|
||||
sudo ln -sf "/usr/local/zig-linux-x86_64-${ZIG_VERSION}/zig" /usr/local/bin/zig
|
||||
curl -fsSL --retry 3 "https://github.com/ziglang/zig/releases/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz" -o /tmp/zig.tar.xz
|
||||
sudo mkdir -p "${ZIG_DIR}"
|
||||
sudo tar -C "${ZIG_DIR}" --strip-components=1 -xJf /tmp/zig.tar.xz
|
||||
sudo ln -sf "${ZIG_DIR}/zig" /usr/local/bin/zig
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
curl -sL "https://ziglang.org/download/${ZIG_VERSION}/zig-macos-x86_64-${ZIG_VERSION}.tar.xz" | sudo tar -C /usr/local -xJf -
|
||||
sudo ln -sf "/usr/local/zig-macos-x86_64-${ZIG_VERSION}/zig" /usr/local/bin/zig
|
||||
curl -fsSL --retry 3 "https://github.com/ziglang/zig/releases/download/${ZIG_VERSION}/zig-macos-x86_64-${ZIG_VERSION}.tar.xz" -o /tmp/zig.tar.xz
|
||||
sudo mkdir -p "${ZIG_DIR}"
|
||||
sudo tar -C "${ZIG_DIR}" --strip-components=1 -xJf /tmp/zig.tar.xz
|
||||
sudo ln -sf "${ZIG_DIR}/zig" /usr/local/bin/zig
|
||||
fi
|
||||
rm -f /tmp/zig.tar.xz
|
||||
echo "Zig ${ZIG_VERSION} installed"
|
||||
fi
|
||||
zig version
|
||||
|
|
|
|||
Loading…
Reference in a new issue