Skip to content

ci: cache Go build cache (GOCACHE) for test jobs#4087

Open
nogates wants to merge 1 commit into
nogates/ci-extract-license-checkfrom
nogates/ci-cache-go-build
Open

ci: cache Go build cache (GOCACHE) for test jobs#4087
nogates wants to merge 1 commit into
nogates/ci-extract-license-checkfrom
nogates/ci-cache-go-build

Conversation

@nogates

@nogates nogates commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • setup-go only caches downloaded modules (GOMODCACHE), not compiled object files (GOCACHE at ~/.cache/go-build)
  • Added an explicit actions/cache@v4 step for the Go build cache, keyed on Go version, build tags, and go.sum hash
  • The test script's go clean -testcache only clears test results, not compiled packages, so this cache remains effective for speeding up compilation

Stack

1/6 — ci: remove platform matrix (#4083)
2/6 — ci: upgrade action versions (#4084)
3/6 — ci: reduce staticcheck matrix (#4085)
4/6 — ci: extract license check (#4086)
5/6 — this PR
6/6 — ci: optimize gotestsum install

Test plan

  • First run populates the cache (cache miss)
  • Subsequent runs hit the cache and compile faster
  • Verify different matrix combos get separate cache entries

🤖 Generated with Claude Code

setup-go only caches downloaded modules (GOMODCACHE), not compiled
object files (GOCACHE). Adding an explicit cache for ~/.cache/go-build
avoids recompiling all dependencies on every run. The test script's
go clean -testcache only clears test results, not compiled packages,
so this cache remains effective.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nogates nogates requested review from a team as code owners May 14, 2026 14:05
@nogates nogates added the changelog/no-changelog Changes don't appear in changelog label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog Changes don't appear in changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant