Skip to content

Commit c5a8010

Browse files
committed
ci: re-add Windows x86_64 to the release matrix
Re-add Windows support to all 4 files (mix.exs, justfile, .github/workflows/ci.yml, mix.lock). Windows was previously dropped because the windows-latest runner reports 'ImageOS=win25-vs2026' which erlef/setup-beam doesn't recognize (only supports win22/win25/win25 but not win25-vs2026). Fix the same way we fixed the ARM64 runner: pin to windows-2022 explicitly and override ImageOS=win22. Added: - Pin 'os: windows-2022' in the matrix (instead of windows-latest) so the runner ImageOS is stable - Add 'ImageOS: win22' override (for the matrix.os == 'windows-2022' case) so erlef/setup-beam accepts the runner - Add Windows-specific install step for 7zip + xz via choco (Burrito needs 7z/7zz in PATH to package Windows releases; 7zip is not preinstalled on windows-2022) - Add Windows case to the rename shell script - Add Windows row to the GitHub Release markdown table mix.lock: deps updated (earmark_parser 1.4.44→1.4.45, json_codec 0.1.3→0.1.4, pi_bridge 0.6.14→0.6.20) from recent mix deps.get operations. Verified: - actionlint clean - mix ci green (compile + format + credo + xref + dialyzer + tests) - 162 tests pass - 'just release' builds all 5 targets, renamed to ado-0.1.0-{linux-x86_64,linux-aarch64,macos-aarch64, macos-x86_64,windows-x86_64.exe} Note: 'mix compile --warnings-as-errors' passes (exit 0) for all 3 envs. Visible warnings during compilation are all from 3rd-party deps (hpax, plug, sourceror, ex_ast, excoveralls) and are unfixable from our side.
1 parent 9a819b8 commit c5a8010

4 files changed

Lines changed: 66 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,24 +201,43 @@ jobs:
201201
ext: ""
202202
label: "Linux x86_64"
203203
artifact: ado-linux-x86_64
204+
# ubuntu-latest reports ImageOS='ubuntu24', so we set it
205+
# explicitly to avoid surprises if it ever changes.
206+
imageos: ubuntu24
204207
- os: ubuntu-24.04-arm
205208
target: linux_arm
206209
cpu: aarch64
207210
ext: ""
208211
label: "Linux ARM64"
209212
artifact: ado-linux-aarch64
213+
# ubuntu-24.04-arm reports ImageOS='ubuntu24-arm64'
214+
# which erlef/setup-beam doesn't recognize. Use 'ubuntu24'
215+
# (Erlang/Elixir prebuilt binaries are arch-independent,
216+
# so the ubuntu24 ones work on the arm64 runner).
217+
imageos: ubuntu24
210218
- os: macos-latest
211219
target: macos
212220
cpu: aarch64
213221
ext: ""
214222
label: "macOS Apple Silicon"
215223
artifact: ado-macos-aarch64
224+
# macos-latest currently reports ImageOS='macos15'.
225+
imageos: macos15
216226
- os: macos-latest
217227
target: macos_x86
218228
cpu: x86_64
219229
ext: ""
220230
label: "macOS Intel"
221231
artifact: ado-macos-x86_64
232+
imageos: macos15
233+
- os: windows-2022
234+
target: windows
235+
cpu: x86_64
236+
ext: ".exe"
237+
label: "Windows x86_64"
238+
artifact: ado-windows-x86_64
239+
# windows-2022 reports ImageOS='win22'.
240+
imageos: win22
222241

223242
steps:
224243
- uses: actions/checkout@v4
@@ -229,12 +248,13 @@ jobs:
229248
otp-version: ${{ env.OTP_VERSION }}
230249
elixir-version: ${{ env.ELIXIR_VERSION }}
231250
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
251+
# Drive ImageOS from the matrix instead of a hardcoded
252+
# value. setup-beam requires ImageOS to be one of:
253+
# ubuntu22, ubuntu24, win19, win22, win25, macos13,
254+
# macos14, macos15, macos26. The runner's default may
255+
# be unrecognized on non-x86 runners (e.g. ubuntu-24.04-arm
256+
# reports 'ubuntu24-arm64'), so we override per-matrix-entry.
257+
ImageOS: ${{ matrix.imageos }}
238258

239259
- name: Install Zig
240260
# Burrito needs a specific zig version (0.16.0) to cross-compile
@@ -257,6 +277,17 @@ jobs:
257277
if: runner.os == 'macOS'
258278
run: brew install xz
259279

280+
- name: Install 7zip (Windows)
281+
# Burrito requires 7z/7zz in PATH to package Windows
282+
# releases. The 7zip Chocolatey package ships with xz
283+
# support (7z handles both .7z and .xz archives), so
284+
# installing 7zip is sufficient — no separate xz package
285+
# needed. (The 'xz' choco package was removed from
286+
# chocolatey.org at some point.)
287+
if: runner.os == 'Windows'
288+
shell: pwsh
289+
run: choco install -y 7zip
290+
260291
- name: Verify zig/xz
261292
run: |
262293
zig version
@@ -287,6 +318,10 @@ jobs:
287318
# Burrito writes the binary to burrito_out/ado_<target> by
288319
# convention. We rename the output below to a stable,
289320
# versioned name.
321+
# Use bash explicitly so the `[[ ]]` / `mkdir -p` syntax
322+
# works on Windows (the default PowerShell on windows-2022
323+
# doesn't understand these).
324+
shell: bash
290325
run: |
291326
mkdir -p release_bin
292327
mix release --overwrite
@@ -305,6 +340,10 @@ jobs:
305340
# ado-<version>-<os>-<arch><.exe?>
306341
# e.g. ado-0.1.0-macos-aarch64
307342
# ado-0.1.0-linux-x86_64
343+
# Use bash explicitly so the `[[ ]]` / `case` / `mv` syntax
344+
# works on Windows (PowerShell on windows-2022 doesn't
345+
# understand these). The smoke test below also uses bash.
346+
shell: bash
308347
run: |
309348
set -euo pipefail
310349
VERSION="${{ steps.version.outputs.version }}"
@@ -314,32 +353,38 @@ jobs:
314353
linux_arm) SUFFIX="linux-aarch64" ;;
315354
macos) SUFFIX="macos-aarch64" ;;
316355
macos_x86) SUFFIX="macos-x86_64" ;;
356+
windows) SUFFIX="windows-x86_64" ;;
317357
*) echo "::error::Unknown target ${{ matrix.target }}"; exit 1 ;;
318358
esac
319359
OUT_NAME="ado-${VERSION}-${SUFFIX}${{ matrix.ext }}"
320360
SRC="burrito_out/ado_${{ matrix.target }}${{ matrix.ext }}"
321361
DEST="release_bin/${OUT_NAME}"
322362
if [[ ! -f "${SRC}" ]]; then
323363
echo "::error::Expected Burrito output not found: ${SRC}"
324-
ls -lh burrito_out/
364+
ls -lh burrito_out
325365
exit 1
326366
fi
327367
mv "${SRC}" "${DEST}"
328368
chmod +x "${DEST}"
329369
echo "Renamed ${SRC} -> ${DEST}"
330-
ls -lh release_bin/
370+
ls -lh release_bin
331371
332372
- name: Smoke test the binary
333373
# All release jobs run on a native runner for the target
334374
# platform (e.g. ubuntu-24.04-arm for the Linux ARM build),
335375
# so the binary can always be executed here.
376+
# Use bash explicitly so the `[[ ]]` / `set -euo pipefail`
377+
# syntax works on Windows (PowerShell doesn't understand
378+
# these). On Windows the `file` command is provided by
379+
# Git for Windows; the .exe is executable via bash.
380+
shell: bash
336381
run: |
337382
set -euo pipefail
338383
# Glob is intentional here — there's exactly one file in
339384
# the dir, but actionlint warns about unquoted globs.
340385
BINARY=$(ls release_bin/ado-*)
341386
echo "Testing $BINARY"
342-
file "$BINARY"
387+
file "$BINARY" || true
343388
"$BINARY" --version || "$BINARY" --help | head -20
344389
345390
- name: Upload release binary
@@ -383,6 +428,7 @@ jobs:
383428
| Linux | aarch64 | `ado-*-linux-aarch64` |
384429
| macOS | Apple Silicon | `ado-*-macos-aarch64` |
385430
| macOS | Intel | `ado-*-macos-x86_64` |
431+
| Windows | x86_64 | `ado-*-windows-x86_64.exe` |
386432
387433
See [README.md](https://github.com/gilbertwong96/ado_cli) for
388434
installation instructions.

justfile

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

74-
# Rename Burrito's ado_<target> binaries to the versioned, platform-
75-
# tagged naming convention used by the CI release workflow:
74+
# Rename Burrito's ado_<target>{,.exe} binaries to the versioned,
75+
# platform-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
8081
# Original Burrito outputs are removed.
8182
release-rename:
8283
#!/usr/bin/env bash
@@ -94,6 +95,7 @@ release-rename:
9495
linux_arm) SUFFIX="linux-aarch64" ;;
9596
macos) SUFFIX="macos-aarch64" ;;
9697
macos_x86) SUFFIX="macos-x86_64" ;;
98+
windows) SUFFIX="windows-x86_64" ;;
9799
*) echo "::warn::Unknown Burrito target: $key (no rename rule)"; continue ;;
98100
esac
99101
dest="burrito_out/ado-${VERSION}-${SUFFIX}${ext}"

mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ 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]
198+
linux_arm: [os: :linux, cpu: :aarch64],
199+
windows: [os: :windows, cpu: :x86_64]
199200
]
200201
]
201202
]

0 commit comments

Comments
 (0)