π ci: replace setup-zig action with direct ziglang.org download (mirrors down, action deprecated)
swadhinbiswas committed 2 months ago
4188668
1 parent 51015a2
commit 4188668
1 file changed
+17 -5
Showing 1 changed file+17-5
βΌ.github/workflows/wheels.yml
+17-5
| @@ -112,12 +112,24 @@ jobs: | ||
112 | 112 | # against the string 'true' β accept both forms so the step always |
113 | 113 | # runs when zig is needed (the bash build step compares the |
114 | 114 | # interpolated value, which is always the string "true"). |
115 | + # | |
116 | + # Download directly from ziglang.org (official tarballs) instead of | |
117 | + # mlugg/setup-zig β its mirrors were down (503/502/404) and it is a | |
118 | + # Node 20 action (deprecated). Matches the zig version verified | |
119 | + # locally (maturin 1.14.1 + zig 0.16.0, 2026-08-07). | |
115 | 120 | if: matrix.zig == true || matrix.zig == 'true' |
116 | - uses: mlugg/setup-zig@v1 | |
117 | - with: | |
118 | - # Matches the zig version verified locally (all 5 wheels built with | |
119 | - # maturin 1.14.1 + zig 0.16.0 on 2026-08-07). | |
120 | - version: 0.16.0 | |
121 | + shell: bash | |
122 | + run: | | |
123 | + VER="0.16.0" | |
124 | + OS="$(uname -s | tr '[:upper:]' '[:lower:]')" # linux / darwin | |
125 | + [ "$OS" = "darwin" ] && OS="macos" | |
126 | + HOST_ARCH="$(uname -m)" # host arch of the runner | |
127 | + [ "$HOST_ARCH" = "arm64" ] && HOST_ARCH="aarch64" | |
128 | + curl -fsSL --retry 5 --retry-all-errors \ | |
129 | + "https://ziglang.org/download/${VER}/zig-${HOST_ARCH}-${OS}-${VER}.tar.xz" \ | |
130 | + -o /tmp/zig.tar.xz | |
131 | + tar -xJf /tmp/zig.tar.xz -C /tmp | |
132 | + echo "/tmp/zig-${HOST_ARCH}-${OS}-${VER}" >> "$GITHUB_PATH" | |
121 | 133 | - name: Resolve free-threaded interpreter |
122 | 134 | if: matrix.python == '3.14t' |
123 | 135 | shell: bash |
124 | 136 | |