Skip to content

ci: run cross-compile build matrix only on push, not PRs (save minutes)#155

Merged
felixgeelhaar merged 1 commit into
mainfrom
ci/build-matrix-push-only
Jul 8, 2026
Merged

ci: run cross-compile build matrix only on push, not PRs (save minutes)#155
felixgeelhaar merged 1 commit into
mainfrom
ci/build-matrix-push-only

Conversation

@felixgeelhaar

Copy link
Copy Markdown
Collaborator

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)

job time billed
Test (ubuntu-latest) 95s 2 min
Lint 30s 1 min
Bench gate 20s 1 min
Build ×5 (cross-compile) ~47s each 5 min

The build matrix is ~55% of every run and 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.

Change

Gate the build job to github.event_name == 'push' — it runs post-merge on main (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 --admin regression 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

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 felixgeelhaar merged commit f5326d4 into main Jul 8, 2026
6 checks passed
@felixgeelhaar felixgeelhaar deleted the ci/build-matrix-push-only branch July 8, 2026 08:35
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