Repository navigation
ci: run the Go gate as one derivation, skip render matrices under -race - #161
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buildGoModulegate checks (golangci-lint, nilaway, go-test-race) into onechecks.go-gatederivation withbuildPhase = "true", so they share one GOCACHE instead of each compiling every dependency from scratch on a 4-core runner.internal/ui: 271s, nearly all of it in six single-goroutine render-matrix sweeps. The gate now runsgo test ./...(everything, no race) plusgo test -race -short ./..., and those sweeps skip under-short.-Lso 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 forinternal/ui: 271s → 12.5s.nix flake check:go-gatepasses. Thepre-commitcheck fails ontypos(mchininternal/ui/actionview.goand a docs plan), which is pre-existing on main and untouched here.