ci: replace setup-zig action with manual installation for Forgejo compatibility
Some checks failed
CI with Native Libraries / Build and Test Native Libraries (push) Blocked by required conditions
CI with Native Libraries / Build Release Libraries (push) Blocked by required conditions
Documentation / build-and-publish (push) Waiting to run
Checkout test / test (push) Successful in 5s
CI with Native Libraries / Check Build Environment (push) Successful in 12s
CI/CD Pipeline / Test (push) Failing after 20s
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) Has been cancelled
CI/CD Pipeline / Docker Build (push) Has been cancelled

This commit is contained in:
Jeremie Fraeys 2026-02-12 14:14:37 -05:00
parent 4c82237608
commit bdcb134582
No known key found for this signature in database

View file

@ -71,9 +71,22 @@ jobs:
${{ runner.os }}-go-
- name: Set up Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
run: |
ZIG_VERSION="${{ env.ZIG_VERSION }}"
if command -v zig &> /dev/null && zig version | grep -q "${ZIG_VERSION}"; then
echo "Zig ${ZIG_VERSION} already installed - skipping download"
else
echo "Installing 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
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
fi
echo "Zig ${ZIG_VERSION} installed"
fi
zig version
- name: Cache Zig build
uses: actions/cache@v4
@ -178,9 +191,22 @@ jobs:
go version
- name: Set up Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
run: |
ZIG_VERSION="${{ env.ZIG_VERSION }}"
if command -v zig &> /dev/null && zig version | grep -q "${ZIG_VERSION}"; then
echo "Zig ${ZIG_VERSION} already installed - skipping download"
else
echo "Installing 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
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
fi
echo "Zig ${ZIG_VERSION} installed"
fi
zig version
- name: Cache Go modules
uses: actions/cache@v4