Skip to content

ci: run the Go gate as one derivation, skip render matrices under -race - #161

Merged
noamsto merged 1 commit into
mainfrom
ci/single-go-gate
Oct 5, 2026
Merged

noamsto merged 1 commit into
mainfrom
ci/single-go-gate

Conversation

@noamsto

@noamsto noamsto commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Merge the three buildGoModule gate checks (golangci-lint, nilaway, go-test-race) into one checks.go-gate derivation with buildPhase = "true", so they share one GOCACHE instead of each compiling every dependency from scratch on a 4-core runner.
  • The race pass was dominated by internal/ui: 271s, nearly all of it in six single-goroutine render-matrix sweeps. The gate now runs go test ./... (everything, no race) plus go test -race -short ./..., and those sweeps skip under -short.
  • CI builds the single check with -L so test output lands in the job log.

Testing

  • nix build .#checks.x86_64-linux.go-gate --cores 4: 112s, against 293s for the three old checks at --cores 4 (235s at 32 cores). Race pass for internal/ui: 271s → 12.5s.
  • nix flake check: go-gate passes. The pre-commit check fails on typos (mch in internal/ui/actionview.go and a docs plan), which is pre-existing on main and untouched here.

The three gate derivations each compiled every dependency from scratch, in
parallel on a 4-core runner, and each ran a binary buildPhase it never used.
One go-gate derivation shares a single GOCACHE across golangci-lint, nilaway
and both test passes.

internal/ui's exhaustive render matrices took 271s of the race pass alone.
They are single-goroutine, so they now run once without -race and skip in the
`go test -race -short` pass. Locally at --cores 4: 293s -> 112s.
@noamsto noamsto self-assigned this Oct 5, 2026
@noamsto
noamsto merged commit c84a905 into main Oct 5, 2026
1 check passed
@noamsto
noamsto deleted the ci/single-go-gate branch October 5, 2026 13:47
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