From b4c1e133c0038e002bb33b17781e74d050a52045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Balv=C3=ADn?= Date: Fri, 2 Oct 2026 16:15:02 +0200 Subject: [PATCH] ci: keep the GOOBJ link parity gate off the push pipeline Assisted-by: GLM 5.3 Flash --- .gitea/workflows/test.yml | 12 ------------ justfile | 4 ++++ verify/goobj_link_test.go | 9 ++++++++- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index f392e83..33968ba 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -119,18 +119,6 @@ jobs: # regression names the gate that failed instead of hiding inside the suite. run: go test -count=1 -timeout 10m -run 'TestGroundTruth' ./verify/... - - name: Install qemu-user - # The GOOBJ link regression runs the arm64 and riscv64 binaries it links - # under qemu-user; without the emulator those two degrade to link-only. - # The install is a no-op where it is already present. - run: dnf install -y qemu-user - - - name: GOOBJ link parity - # The cmd/link parity gate: gasm objects substituted into a real go build - # must re-link on all four architectures, and the binaries must reproduce - # the toolchain baseline's output (native on amd64, qemu-user elsewhere). - run: go test -count=1 -timeout 10m -run 'TestGOOBJLinkRegression' ./verify/... - - name: Coverage floor run: | perl -e ' diff --git a/justfile b/justfile index 8a640ee..f703ae7 100644 --- a/justfile +++ b/justfile @@ -62,6 +62,10 @@ unit pkgs=packages run=".*": fuzz target pkg fuzztime="60s": systemd-run --user --scope -p MemoryMax=4G -p MemorySwapMax=0 go test -run '^$' -fuzz '{{target}}' -fuzztime={{fuzztime}} {{pkg}} +# The cmd/link GOOBJ parity gate, opt-in: the per-push pipeline cannot afford it. +link-parity: + systemd-run --user --scope -p MemoryMax=4G -p MemorySwapMax=0 env GASM_LINK_PARITY=1 go test -count=1 -timeout 10m -run 'TestGOOBJLinkRegression' ./verify/ + # Benchmarks. On an idle machine only. bench pkgs=packages: go test -run '^$' -bench=. -benchmem -count=5 {{pkgs}} diff --git a/verify/goobj_link_test.go b/verify/goobj_link_test.go index ad829f6..82bce8e 100644 --- a/verify/goobj_link_test.go +++ b/verify/goobj_link_test.go @@ -111,11 +111,18 @@ func fieldAfterLinkLog(line, flag string) string { } // TestGOOBJLinkRegression is the per-architecture end-to-end gate -// described at the top of this file. +// described at the top of this file. It is a deliberate verification, +// not a suite member: building the gasm binary and cross-linking a +// module per architecture is minutes of work the shared one-core runner +// beside the forge cannot afford on every push, so it runs opt-in, the +// justfile's link-parity recipe being the intended way. func TestGOOBJLinkRegression(t *testing.T) { if testing.Short() { t.Skip("builds the gasm binary and links Go programs") } + if os.Getenv("GASM_LINK_PARITY") == "" { + t.Skip("deliberate verification: set GASM_LINK_PARITY=1 (just link-parity)") + } goBin, err := exec.LookPath("go") if err != nil { t.Skip("no Go toolchain available")