Skip to content

ci(release): warm the cross-compile build cache between releases - #39

Merged
blairham merged 1 commit into
mainfrom
ci/release-go-cache
Aug 15, 2026
Merged

ci(release): warm the cross-compile build cache between releases#39
blairham merged 1 commit into
mainfrom
ci/release-go-cache

Conversation

@blairham

Copy link
Copy Markdown
Owner

Same release-cache pattern rolled out across the goreleaser repos (and the pinpredict setup-go composite in pinpredict/.github#56): setup-go's built-in cache can't warm a goreleaser job — its key is exact-match on go.sum and its snapshot comes from CI test jobs, which build only the host platform. A go-release--scoped actions/cache with a restore-keys fallback, saved after goreleaser, restores a build cache covering every cross-compiled target. First release after merge populates the cache; subsequent ones compile mostly incrementally. No release behavior changes — cache only.

setup-go's built-in cache is exact-match on go.sum (any dependency bump
means a fully cold build of every GOOS/GOARCH target) and its immutable
snapshot is claimed by whichever job saves first — usually a CI test
job whose GOCACHE covers only host-platform test builds. Replace it in
the release job with a go-release-* scoped module+build cache: a
restore-keys prefix keeps dependency bumps warm, and the post step
saves after goreleaser so the snapshot carries the full cross-compile
matrix. First release populates it; later ones compile incrementally.
@blairham
blairham merged commit 229af48 into main Aug 15, 2026
9 of 10 checks passed
@blairham
blairham deleted the ci/release-go-cache branch August 15, 2026 13:26
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