From 6d9f30db3c76e2456afc092e773126853a5b49e9 Mon Sep 17 00:00:00 2001 From: Jeremy Collins Date: Mon, 6 Jul 2026 10:59:05 -0400 Subject: [PATCH 1/2] ci: run the xbuild cross-compile on PR/main, and de-dup CI triggers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CGO binary's zig-cc cross-build for linux+windows amd64/arm64 lived only in release.yml (v* tags), so a cross-compile break — e.g. an engine change that only fails to build for Windows — first surfaced when tagging a release (v0.1.0 failed on the tile57 CLI's POSIX-only --tui). Add the same `make xbuild` as a job in ci.yml, floating the engine submodule to main like the other jobs, so it's caught before the tag. Build-health gate only; no artifact upload. Also scope `push` to main so a push to a branch with an open PR no longer fires both `push` and `pull_request` — otherwise every PR push would run the whole suite (now including the ~7-min xbuild) twice. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b6eb6c..b5f0414 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,11 @@ name: CI on: + # push only on main; PR branches are covered by pull_request. Scoping push this + # way avoids the double run (a push to a branch with an open PR otherwise fires + # both events — now doubly wasteful with the ~7-min xbuild job below). push: + branches: [main] pull_request: # libtile57 is the sole engine: the build is CGO and statically links the native @@ -72,3 +76,34 @@ jobs: run: make -C chartplotter tile57-lib - name: Vulnerability scan run: cd chartplotter && go run golang.org/x/vuln/cmd/govulncheck@latest ./... + + # Cross-compile the CGO binary for every release target (linux + windows, + # amd64/arm64) with `zig cc`, the same path release.yml runs on a v* tag. Kept + # here on push/PR so a cross-compile break (e.g. an engine change that only + # fails to build for windows) is caught before tagging, not during the release. + xbuild: + runs-on: ubuntu-latest + steps: + - name: Checkout chartplotter (+ tile57 engine submodule) + uses: actions/checkout@v7 + with: + path: chartplotter + submodules: recursive + - name: Float tile57 submodule to latest main + run: | + git -C chartplotter submodule update --remote tile57 + git -C chartplotter submodule update --init --recursive tile57 + - uses: actions/setup-go@v6 + with: + go-version: '1.26' + cache: true + cache-dependency-path: chartplotter/go.sum + - name: Install Zig + uses: mlugg/setup-zig@v2 + with: + version: 0.16.0 + # Builds libtile57 per target with zig, then links each binary with `zig cc`, + # emitting dist/chartplotter_${goos}_${goarch}${ext} for linux+windows + # amd64/arm64. No artifact upload — this is a build-health gate, not a release. + - name: Cross-build linux + windows binaries + run: make -C chartplotter xbuild TILE57=tile57 VERSION="ci" From 298bda43f8cc126e478eeb90394c36e13c08dbad Mon Sep 17 00:00:00 2001 From: Jeremy Collins Date: Mon, 6 Jul 2026 11:38:08 -0400 Subject: [PATCH 2/2] chore(tile57): bump engine pin to merged main (Windows cross-compile fix) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The xbuild CI job compiled the stale pinned engine (068474e3d), which predates the Windows cross-compile fix, so it hit the same `raw.lflag.ICANON` termios error on x86_64-windows-gnu. tile57 main (a2022b6, "Merge #1 fix/windows-cross-compile") has the fix; bump the committed submodule pin to it so the cross-build — and releases — build the fixed engine. Note: the "float tile57 to latest main" CI step actually reverts the submodule to the committed pin (a latent bug: the second `git submodule update --init --recursive tile57` run from the superproject resets tile57 back to the gitlink, undoing the preceding --remote float), so the pin is what CI really builds. Bumping the pin is what turns CI green. Co-Authored-By: Claude Opus 4.8 (1M context) --- tile57 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tile57 b/tile57 index 068474e..a2022b6 160000 --- a/tile57 +++ b/tile57 @@ -1 +1 @@ -Subproject commit 068474e3daf1926a094d101ea2d57945d1e94063 +Subproject commit a2022b6758dc26258bc83fc9a4b3c22beb5eba75