ci: run cross-compile build matrix only on push, not PRs (save minutes)#155
Merged
Conversation
Actions-minute reduction (the account is over its 3k budget). Measured per CI run: the 5-job build matrix is ~5 of ~9 billed minutes (~55%) and is the least valuable per-PR check — `go test`/`go vet` already compile the code on linux for every PR, and goreleaser does the authoritative cross-compile at release. Gate the build job to `github.event_name == 'push'` so it runs post-merge on main (and its coverage still gates the branch) but not on every PR. Effect: ~5 min saved on every PR (code and doc). Lint/Test/Bench still run on PRs so the required checks report (no --admin regression); the full darwin/linux/ windows matrix still runs on main pushes, and a platform build break surfaces there and at release — not silently. Build is not a required status check, so skipping it on PRs does not block them. Claude-Session: https://claude.ai/code/session_01QKTcmXFTKoTQr7mB3HCuHZ
felixgeelhaar
added a commit
that referenced
this pull request
Jul 8, 2026
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.
Actions-minute reduction — the account is over its 3k budget, and the CI change in #154 (PRs always run CI) cut the wrong way for that.
Measured cost per CI run (billed per-job, rounded up)
The build matrix is ~55% of every run and the least valuable per-PR check:
go test/go vetalready compile the code on linux for every PR, and goreleaser does the authoritative cross-compile at release.Change
Gate the build job to
github.event_name == 'push'— it runs post-merge onmain(and still gates the branch there), but not on PRs.Effect: ~5 min saved on every PR. Lint/Test/Bench still run on PRs so the required checks report (no
--adminregression from #154); the full darwin/linux/windows matrix still runs on main pushes; a platform build break surfaces there and at release, not silently. Build is not a required status check, so skipping it on PRs doesn't block them.This PR dogfoods it: its own build jobs should show skipped, and it should still be
CLEAN/mergeable.https://claude.ai/code/session_01QKTcmXFTKoTQr7mB3HCuHZ