Skip to content

Comments

ci: improve go caching#45

Merged
jason-lynch merged 1 commit intomainfrom
ci/improve-caching
Jun 10, 2025
Merged

ci: improve go caching#45
jason-lynch merged 1 commit intomainfrom
ci/improve-caching

Conversation

@jason-lynch
Copy link
Member

@jason-lynch jason-lynch commented Jun 10, 2025

Adds the go build cache directory to our saved cache so that we won't rebuild the go tool binaries unless there are module updates in the subsequent steps.

It also adds fallbacks to the restore_cache step so that it will restore from the most recent cache when we've modified the go dependencies or tools.

This change reduces the run time of our CI jobs by a few minutes.

@jason-lynch jason-lynch force-pushed the ci/improve-caching branch 4 times, most recently from f8462c6 to 174d288 Compare June 10, 2025 15:43
Adds the go build cache directory to our saved cache so that we won't
rebuild the go tool binaries unless there are module updates in the
subsequent steps.

It also adds fallbacks to the restore_cache step so that it will restore
from the most recent cache when we've modified the go dependencies or
tools.

This change reduces the run time of our CI jobs by a few minutes.
@jason-lynch jason-lynch changed the title ci: improve go bin caching ci: improve go caching Jun 10, 2025
@jason-lynch jason-lynch requested review from mmols and tsivaprasad June 10, 2025 17:36
@jason-lynch
Copy link
Member Author

While I was developing this, I had one version where I put the save_cache step after the test run, so the tests will run very fast with this particular cache. But, in order to maintain that type of cache, we would need to incorporate our go and test code into the cache key. That change is large enough to warrant a dedicated ticket, so I've removed it from this PR.

@jason-lynch jason-lynch merged commit 9b48b29 into main Jun 10, 2025
2 checks passed
@jason-lynch jason-lynch deleted the ci/improve-caching branch June 10, 2025 20:22
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.

2 participants