Skip to content

Commit 3a6682d

Browse files
committed
ci: cover aarch64-windows via Linux cross-compile, drop flaky preview runner
The windows-11-arm preview runner exits 'zig build' with no output (toolchain instability, not a code bug — aarch64-windows cross-compiles clean from Linux: verified zig build + zig cc -lpsapi both produce valid ARM64 PE binaries). It was continue-on-error but still showed a red check on every commit. Replace the native aarch64 matrix entry with a reliable cross-windows-aarch64 job (build-only; runtime tests stay on native windows x86_64 + the Linux/macOS nix checks).
1 parent a5512aa commit 3a6682d

5 files changed

Lines changed: 44 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,14 @@ jobs:
8080
include:
8181
- runner: windows-latest
8282
arch: x86_64
83-
- runner: windows-11-arm
84-
arch: aarch64
8583

8684
runs-on: ${{ matrix.runner }}
8785
name: windows (${{ matrix.arch }})
88-
continue-on-error: true # ARM runner may be in preview
86+
# aarch64-windows is covered by the cross-windows-aarch64 job below (reliable
87+
# Linux cross-compile) instead of the GitHub windows-11-arm preview runner,
88+
# which exits zig build with no output (toolchain instability, not a code bug —
89+
# the same target cross-compiles clean from Linux). Revisit native ARM when
90+
# the runner leaves preview.
8991

9092
steps:
9193
- uses: actions/checkout@v6
@@ -183,3 +185,39 @@ jobs:
183185
with:
184186
name: printable-binary-c-${{ matrix.arch }}-windows
185187
path: printable-binary-c.exe
188+
189+
# aarch64-windows build coverage via reliable Linux cross-compilation, in
190+
# place of the flaky windows-11-arm preview runner. Build-only (a cross-built
191+
# Windows binary can't execute on the Linux runner); runtime tests are covered
192+
# natively on windows x86_64 above and on Linux/macOS via the nix checks.
193+
cross-windows-aarch64:
194+
runs-on: ubuntu-latest
195+
name: cross (aarch64-windows)
196+
steps:
197+
- uses: actions/checkout@v6
198+
199+
- name: Install Zig (x86_64-linux host)
200+
shell: bash
201+
run: |
202+
set -euo pipefail
203+
version="0.16.0"
204+
curl -fsSL "https://ziglang.org/download/${version}/zig-x86_64-linux-${version}.tar.xz" -o "$RUNNER_TEMP/zig.tar.xz"
205+
mkdir -p "$RUNNER_TEMP/zig"
206+
tar -xf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP/zig"
207+
zig_dir="$(find "$RUNNER_TEMP/zig" -mindepth 1 -maxdepth 1 -type d | head -n 1)"
208+
echo "$zig_dir" >> "$GITHUB_PATH"
209+
"$zig_dir/zig" version
210+
211+
- name: Cross-compile aarch64-windows (Zig CLI + lib)
212+
run: zig build -Dtarget=aarch64-windows -Doptimize=ReleaseFast
213+
214+
- name: Cross-compile aarch64-windows C CLI (zig cc, -lpsapi)
215+
run: zig cc -target aarch64-windows-gnu -O3 -I. -o printable-binary-c-aarch64-windows.exe src/printable_binary.c -lpsapi
216+
217+
- name: Upload aarch64-windows binaries
218+
uses: actions/upload-artifact@v6
219+
with:
220+
name: printable-binary-aarch64-windows
221+
path: |
222+
zig-out/bin/printable-binary-zig.exe
223+
printable-binary-c-aarch64-windows.exe

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ ZIG_0.15_TO_0.16_MIGRATION.md
3939
!bin/utf16to8
4040
AGENTS*.md
4141
CLAUDE*.md
42+
# Local convenience symlink to ~/dotfiles (external target — must not be committed
43+
# into a published repo; broke the GitHub Pages build as a dangling symlink).
44+
jj_cheatsheet.md

AGENTS.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

CLAUDE.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

jj_cheatsheet.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)