Skip to content

Commit 3efb5b8

Browse files
committed
ci: install zig 0.16.0 and xz in release job
The release jobs were failing at the Burrito pre_check step: > You MUST have `zig` and `xz` installed to use Burrito, we couldn't find all of them in your PATH! GitHub-hosted runners don't ship with zig (which Burrito needs at a pinned version, 0.16.0) or xz (used to extract zig's tarball and musl). Added three new steps to the release job, copied from Burrito's own upstream CI workflow: 1. Install Zig via goto-bus-stop/setup-zig@v2 with version 0.16.0 (pinned in deps/burrito/lib/burrito.ex as @zig_version_expected). 2. Install xz via apt-get on Linux runners, brew on macOS runners. 3. Verify zig/xz are present and on PATH. Also extended the build artifact cache to include ~/.cache/burrito_file_cache — Burrito's download cache — so re-runs don't re-download zig/musl/openssl on every run. Tested: actionlint clean, YAML parses, mix ci green, 162 tests pass.
1 parent aa48c53 commit 3efb5b8

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,39 @@ jobs:
229229
otp-version: ${{ env.OTP_VERSION }}
230230
elixir-version: ${{ env.ELIXIR_VERSION }}
231231

232+
- name: Install Zig
233+
# Burrito needs a specific zig version (0.16.0) to cross-compile
234+
# BEAM. Install it via goto-bus-stop/setup-zig which is the
235+
# same action Burrito's own CI uses.
236+
uses: goto-bus-stop/setup-zig@v2
237+
with:
238+
version: 0.16.0
239+
240+
- name: Install xz
241+
# Burrito needs xz to extract zig's tarball and musl. xz-utils
242+
# ships with the Linux build image but not always; install
243+
# defensively.
244+
if: runner.os == 'Linux'
245+
run: sudo apt-get -y install xz-utils
246+
247+
- name: Install xz (macOS)
248+
# xz is rarely preinstalled on macOS runners.
249+
if: runner.os == 'macOS'
250+
run: brew install xz
251+
252+
- name: Verify zig/xz
253+
run: |
254+
zig version
255+
xz --version
256+
232257
- name: Cache build artifacts
233258
uses: actions/cache@v4
234259
with:
235260
path: |
236261
_build
237262
deps
238263
priv/plts
264+
~/.cache/burrito_file_cache
239265
key: release-${{ runner.os }}-${{ hashFiles('**/mix.lock') }}
240266
restore-keys: |
241267
release-${{ runner.os }}-

0 commit comments

Comments
 (0)