Skip to content

One build path: extract the cross-compile into a shared action - #8

Merged
nicodes merged 2 commits into
mainfrom
chore/one-build-path
Aug 2, 2026
Merged

One build path: extract the cross-compile into a shared action#8
nicodes merged 2 commits into
mainfrom
chore/one-build-path

Conversation

@nicodes

@nicodes nicodes commented Aug 2, 2026

Copy link
Copy Markdown
Member

Closes the gap left open in the CI standardization PR, which fixed the test duplication and noted this one.

The problem

  • CI ran scripts/cli_build.sh — one host binary, no version stamped in.
  • Release cross-compiled six targets inline with its own loop.

Only the CI path ran on a pull request. So a break in any of the other five — a build tag, a platform-specific import, a syscall that doesn't exist on windows — surfaced first at release time, on the one build nobody is watching.

The fix

Both call .github/actions/build. A pull request builds exactly what a release builds; the only difference is the version stamped in, and that one goes on to publish.

Build also runs before Test in release.yml now, matching CI and every other workflow in the org.

scripts/cli_build.sh stays — it's the fast host build for the person at the terminal, and it's no longer what CI checks.

Verified locally

  • All six targets compile and archive (linux/darwin/windows × amd64/arm64)
  • The extracted Linux_x86_64 binary reports gdam 1.2.3 when built with that version
  • windows/arm64 cross-compiles clean — a target CI has never checked until now

Follow-up to the Phase 5 standardization.

nicodes and others added 2 commits August 1, 2026 20:58
CI ran scripts/cli_build.sh -- one host binary, no version stamped in.
release.yml cross-compiled six targets inline with its own loop. Only
the CI path ran on a pull request, so a break in any of the other five
-- a build tag, a platform-specific import, a syscall that does not
exist on windows -- surfaced first at release time, on the one build
nobody is watching.

Both now call .github/actions/build. A pull request builds exactly what
a release builds; the only difference is the version stamped in, and
that one of them goes on to publish.

Build runs before Test in release.yml too, matching CI and every other
workflow in the organisation.

scripts/cli_build.sh stays. It is the fast host build for the person at
the terminal, and it is no longer what CI checks.

Verified locally: all six targets compile and archive, the extracted
Linux binary reports `gdam 1.2.3` when built with that version, and
windows/arm64 -- a target CI never checked -- cross-compiles clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The first run of this action failed with "built binary does not report
'dev'", and the check was wrong rather than the binary.

main.go falls back to the module version in its build info when nothing
was stamped -- the `version == "dev"` branch at main.go:37 -- so in a git
checkout the toolchain's VCS pseudo-version is what comes out. A pull
request legitimately reports
`gdam v0.0.8-0.20260802025843-da3ac2fda354`, never the literal "dev".

A requested version is still asserted exactly, because that is what a
release depends on. The default path asserts the shape instead: the
binary named itself and reported something.

This is the same mistake the ormos build action already documents, and
carrying that comment across is the point of writing it down.

Verified locally on both paths: VERSION=1.2.3 reports `gdam 1.2.3`, and
VERSION=dev reports the pseudo-version and passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nicodes
nicodes merged commit 9385955 into main Aug 2, 2026
1 check passed
@nicodes
nicodes deleted the chore/one-build-path branch August 2, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant