Skip to content

Commit 9a819b8

Browse files
committed
ci: add cross-platform release builds (no signing)
Add a CI release workflow that builds Burrito binaries for 4 platforms (Linux x86_64, Linux ARM64, macOS Apple Silicon, macOS Intel), renames them to a versioned, platform-tagged naming convention (ado-<version>-<os>-<arch>), uploads them as workflow artifacts, and attaches them to a GitHub Release on tag push. CI improvements consolidated into a single clean commit: - Use ubuntu-24.04-arm runner for Linux ARM64 (real native execution, no QEMU needed) - Use BURRITO_TARGET env var to build only one target per runner (avoids cross-compiling for all 4 platforms on every runner); replaces the invalid 'mix release --target' flag - Install zig 0.16.0 via mlugg/setup-zig (the recommended successor to the deprecated goto-bus-stop/setup-zig) - Install xz via apt-get on Linux and brew on macOS - Override ImageOS=ubuntu24 on the ARM64 runner to work around erlef/setup-beam not recognizing ubuntu24-arm64 - Remove Windows from the target list (runner reported 'ImageOS=win25-vs2026' which setup-beam didn't support) - 'file' check in the smoke test for an extra sanity check Removed signing-related code (moved distribution to package managers which sidestep Gatekeeper): - bin/sign.sh - SIGNING.md - justfile 'release-macos' recipe (referenced bin/sign.sh) - SIGNING.md reference in README.md file tree Verified: actionlint clean, mix ci green, 162 tests pass.
1 parent 96232c6 commit 9a819b8

6 files changed

Lines changed: 51 additions & 209 deletions

File tree

.github/workflows/ci.yml

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ jobs:
201201
ext: ""
202202
label: "Linux x86_64"
203203
artifact: ado-linux-x86_64
204-
- os: ubuntu-latest
204+
- os: ubuntu-24.04-arm
205205
target: linux_arm
206206
cpu: aarch64
207207
ext: ""
@@ -219,12 +219,6 @@ jobs:
219219
ext: ""
220220
label: "macOS Intel"
221221
artifact: ado-macos-x86_64
222-
- os: windows-latest
223-
target: windows
224-
cpu: x86_64
225-
ext: ".exe"
226-
label: "Windows x86_64"
227-
artifact: ado-windows-x86_64
228222

229223
steps:
230224
- uses: actions/checkout@v4
@@ -234,6 +228,39 @@ jobs:
234228
with:
235229
otp-version: ${{ env.OTP_VERSION }}
236230
elixir-version: ${{ env.ELIXIR_VERSION }}
231+
env:
232+
# On ubuntu-24.04-arm, ImageOS is reported as
233+
# 'ubuntu24-arm64' which erlef/setup-beam doesn't recognize.
234+
# Override to 'ubuntu24' (Erlang/Elixir prebuilt binaries
235+
# are architecture-independent, so the ubuntu24 ones work
236+
# fine on the arm64 runner).
237+
ImageOS: ubuntu24
238+
239+
- name: Install Zig
240+
# Burrito needs a specific zig version (0.16.0) to cross-compile
241+
# BEAM. Install it via mlugg/setup-zig (the recommended
242+
# successor to goto-bus-stop/setup-zig, which is now
243+
# deprecated and hits GitHub's cache service unreliability).
244+
uses: mlugg/setup-zig@v2
245+
with:
246+
version: 0.16.0
247+
248+
- name: Install xz
249+
# Burrito needs xz to extract zig's tarball and musl. xz-utils
250+
# ships with the Linux build image but not always; install
251+
# defensively.
252+
if: runner.os == 'Linux'
253+
run: sudo apt-get -y install xz-utils
254+
255+
- name: Install xz (macOS)
256+
# xz is rarely preinstalled on macOS runners.
257+
if: runner.os == 'macOS'
258+
run: brew install xz
259+
260+
- name: Verify zig/xz
261+
run: |
262+
zig version
263+
xz --version
237264
238265
- name: Cache build artifacts
239266
uses: actions/cache@v4
@@ -242,6 +269,7 @@ jobs:
242269
_build
243270
deps
244271
priv/plts
272+
~/.cache/burrito_file_cache
245273
key: release-${{ runner.os }}-${{ hashFiles('**/mix.lock') }}
246274
restore-keys: |
247275
release-${{ runner.os }}-
@@ -252,12 +280,16 @@ jobs:
252280
- name: Build Burrito release
253281
env:
254282
MIX_ENV: prod
255-
# Burrito writes binaries to burrito_out/<target-key> by
283+
# Burrito accepts BURRITO_TARGET=<target-key> to build only
284+
# that target from the targets list in mix.exs. This avoids
285+
# cross-compiling for all 4 platforms on each runner.
286+
BURRITO_TARGET: ${{ matrix.target }}
287+
# Burrito writes the binary to burrito_out/ado_<target> by
256288
# convention. We rename the output below to a stable,
257289
# versioned name.
258290
run: |
259291
mkdir -p release_bin
260-
mix release --overwrite --target ${{ matrix.target }}
292+
mix release --overwrite
261293
ls -lh burrito_out/
262294
263295
- name: Get version
@@ -273,7 +305,6 @@ jobs:
273305
# ado-<version>-<os>-<arch><.exe?>
274306
# e.g. ado-0.1.0-macos-aarch64
275307
# ado-0.1.0-linux-x86_64
276-
# ado-0.1.0-windows-x86_64.exe
277308
run: |
278309
set -euo pipefail
279310
VERSION="${{ steps.version.outputs.version }}"
@@ -283,7 +314,6 @@ jobs:
283314
linux_arm) SUFFIX="linux-aarch64" ;;
284315
macos) SUFFIX="macos-aarch64" ;;
285316
macos_x86) SUFFIX="macos-x86_64" ;;
286-
windows) SUFFIX="windows-x86_64" ;;
287317
*) echo "::error::Unknown target ${{ matrix.target }}"; exit 1 ;;
288318
esac
289319
OUT_NAME="ado-${VERSION}-${SUFFIX}${{ matrix.ext }}"
@@ -300,12 +330,16 @@ jobs:
300330
ls -lh release_bin/
301331
302332
- name: Smoke test the binary
333+
# All release jobs run on a native runner for the target
334+
# platform (e.g. ubuntu-24.04-arm for the Linux ARM build),
335+
# so the binary can always be executed here.
303336
run: |
304337
set -euo pipefail
305338
# Glob is intentional here — there's exactly one file in
306339
# the dir, but actionlint warns about unquoted globs.
307340
BINARY=$(ls release_bin/ado-*)
308341
echo "Testing $BINARY"
342+
file "$BINARY"
309343
"$BINARY" --version || "$BINARY" --help | head -20
310344
311345
- name: Upload release binary
@@ -349,7 +383,6 @@ jobs:
349383
| Linux | aarch64 | `ado-*-linux-aarch64` |
350384
| macOS | Apple Silicon | `ado-*-macos-aarch64` |
351385
| macOS | Intel | `ado-*-macos-x86_64` |
352-
| Windows | x86_64 | `ado-*-windows-x86_64.exe` |
353386
354387
See [README.md](https://github.com/gilbertwong96/ado_cli) for
355388
installation instructions.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ ado_cli/
395395
├── test/
396396
├── .credo.exs # Credo configuration (strict mode)
397397
├── AGENTS.md # CI quality gate principles
398-
├── SIGNING.md # macOS code signing + notarization guide
399398
└── mix.exs # Project definition & aliases
400399
```
401400

SIGNING.md

Lines changed: 0 additions & 73 deletions
This file was deleted.

bin/sign.sh

Lines changed: 0 additions & 113 deletions
This file was deleted.

justfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,12 @@ release-clean:
7171
release-list:
7272
@ls -lh burrito_out/
7373

74-
# Rename Burrito's ado_<target>{,.exe} binaries to the versioned,
75-
# platform-tagged naming convention used by the CI release workflow:
74+
# Rename Burrito's ado_<target> binaries to the versioned, platform-
75+
# tagged naming convention used by the CI release workflow:
7676
# ado-<version>-linux-x86_64
7777
# ado-<version>-linux-aarch64
7878
# ado-<version>-macos-aarch64
7979
# ado-<version>-macos-x86_64
80-
# ado-<version>-windows-x86_64.exe
8180
# Original Burrito outputs are removed.
8281
release-rename:
8382
#!/usr/bin/env bash
@@ -95,18 +94,16 @@ release-rename:
9594
linux_arm) SUFFIX="linux-aarch64" ;;
9695
macos) SUFFIX="macos-aarch64" ;;
9796
macos_x86) SUFFIX="macos-x86_64" ;;
98-
windows) SUFFIX="windows-x86_64" ;;
9997
*) echo "::warn::Unknown Burrito target: $key (no rename rule)"; continue ;;
10098
esac
10199
dest="burrito_out/ado-${VERSION}-${SUFFIX}${ext}"
102100
mv "$src" "$dest"
103101
echo "renamed $src -> $dest"
104102
done
105103
106-
# Build, sign, and notarize the macOS binary. See bin/sign.sh for env vars.
107-
release-macos:
108-
@just release
109-
@bin/sign.sh
104+
# (macOS code signing is intentionally not provided here. We
105+
# distribute via package managers — npm, Homebrew — which
106+
# sidestep macOS Gatekeeper entirely. See README for details.)
110107

111108
# ── Skills ─────────────────────────────────────────────────────────────
112109

mix.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ defmodule AdoCli.MixProject do
195195
macos: [os: :darwin, cpu: :aarch64],
196196
macos_x86: [os: :darwin, cpu: :x86_64],
197197
linux: [os: :linux, cpu: :x86_64],
198-
linux_arm: [os: :linux, cpu: :aarch64],
199-
windows: [os: :windows, cpu: :x86_64]
198+
linux_arm: [os: :linux, cpu: :aarch64]
200199
]
201200
]
202201
]

0 commit comments

Comments
 (0)