You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build once, test many: cross-compiled binaries verified by self-install on target machines #652
Epic:#444. Depends on:#639 (pin the host toolchain so a cross-compile build completes at all).
The goal, stated by USER 2026-08-24: build on one machine and test on many. No maintained Linux or Windows environment on every box being targeted — instead, cross-compile the binaries once, ship them to the target, and verify by self-installing there.
Today the only cross-platform gate is make vet, which compiles and runs nothing. That is precisely why #639 hid: a defect that only manifests when a binary executes cannot be caught by a gate that never executes one.
What exists already
dist (Makefile:286-287) cross-compiles under explicit GOOS/GOARCH/CGO_ENABLED=0 — but only writ and lore, 2 of the 7 binaries make build produces (lore, star, writ, devlore-test, devlore-docs, devlore-index, devlore-inventory).
TestSelfInstallScenario (cmd/scenario) already drives self-install end to end, and make test-scenario runs it on all three platforms in CI — but against binaries built on each platform, which is the workflow this issue replaces.
Product recipes (Makefile:136-142) already carry $(GOEXE), so they anticipate cross-compilation.
What has to be worked out
Which binaries ship. All seven, or the user-facing subset? devlore-inventory and star are build tools — a target machine has no obvious use for them, but devlore-test may be exactly what runs on the target.
How binaries reach the target. Artifact upload, a release, a shared path, scp — and whether that is CI's job or a local make target.
What "verify" means on the target. Self-install and exit 0, or self-install and then run a scenario subset? The stronger form needs devlore-test and its data/*.star fixtures on the target too.
Where it runs. CI matrix job, or an operator-driven flow the user invokes by hand across their own boxes. The stated motivation — not maintaining environments — points away from CI runners and toward real machines.
CGO_ENABLED.dist forces 0. Whether every binary tolerates that, and whether it should be uniform, is unverified.
Item 6 alone, immediately after #639: a CI step that runs GOOS=linux make build and GOOS=windows make build. It protects the fix, costs one job, and needs none of the decisions above settled.
Duplicate of #598, which was ruled 2026-08-21 and is the more complete statement. Closing this; filing it was my error — I did not check for an existing issue before opening one.
#598 already answers four of the six questions this issue raised as open:
layout build/<goos>-<goarch>/<binary>[.exe]; "installing anywhere is a copy"
Where it runs
make build = full matrix by default, PLATFORMS= override for the inner loop; tests stay native per platform in CI
CGO_ENABLED
moot — the codebase is pure Go, zero import "C", verified 2026-08-21
It also states the same motivation in the same terms: "the build should come to the machine instead."
The one item here not already in #598 is the regression guard — a CI step that actually runs a cross-compile build, so #639 cannot silently return. That has been noted on #639 instead, where it belongs.
Two of my observations are worth carrying over to #598, since they narrow it:
dist (Makefile:286-287) already cross-compiles writ and lore under explicit GOOS/GOARCH — prior art for the matrix, covering 2 of the intended 4 products.
Activity
David-Noble-at-work commentedon Aug 24, 2026
Duplicate of #598, which was ruled 2026-08-21 and is the more complete statement. Closing this; filing it was my error — I did not check for an existing issue before opening one.
#598 already answers four of the six questions this issue raised as open:
lore,writ,star,devlore-test; dev tools (devlore-docs,devlore-index,devlore-inventory,scenario) stay host-onlybuild/<goos>-<goarch>/<binary>[.exe]; "installing anywhere is a copy"make build= full matrix by default,PLATFORMS=override for the inner loop; tests stay native per platform in CICGO_ENABLEDimport "C", verified 2026-08-21It also states the same motivation in the same terms: "the build should come to the machine instead."
The one item here not already in #598 is the regression guard — a CI step that actually runs a cross-compile build, so #639 cannot silently return. That has been noted on #639 instead, where it belongs.
Two of my observations are worth carrying over to #598, since they narrow it:
dist(Makefile:286-287) already cross-compileswritandloreunder explicitGOOS/GOARCH— prior art for the matrix, covering 2 of the intended 4 products.build/star(the tool codegen invokes) while line 137 buildsbuild/star$(GOEXE)(the product copy). make build cross-compiles for the selected platforms; dist ships every supported one #598's "generators run once, host-side, shared by all targets" is exactly that distinction — and Cross-compiling the product cross-compiles the build tools too #639 is what makes it enforceable.