-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Optimize Go caches in Github Actions #4064
Conversation
I think we still need chezmoi/assets/chezmoi.io/docs/hooks.py Lines 35 to 39 in 938fdfd
|
Thanks for the pointer! It actually works without it, but slower because of no cache. |
02e9d0e
to
1978bc7
Compare
@twpayne I fixed issue with Windows jobs. They are 3 times faster now. |
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was creating duplicating cache entry which also was super slow to unpack.
Awesome, thank you very much! |
GOPATH
,GOCACHE
andGOMODCACHE
on Windows jobs. DriveC:/
on Windows workers is extremely slow and now these jobs are as fast as on MacOS or Linux.test-windows
job is down to 6m8s from 18m30s, 67% imrovement!lint-windows-2022
is down to 58s from 3m10s, 70% improvement!codeql
job. Re-use cache key generated byactions/setup-go
. Run time is improved from 2m19s to 1m49s, by ~22%.