-
Notifications
You must be signed in to change notification settings - Fork 27
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
Implement caching #17
Conversation
Thanks for the contribution, do you mind rebasing the pull request so CI can run. (it looks like it wasn't enable for pull requests but it now is) |
Hmm... It seems like it fails if two instances happen to be running at the same time with the same lua version on the same OS+arch. |
I guess I'll try to figure this out tomorrow :) |
It only works on self-hosted runners apparently
This should work fine now. In case of race condition it's safe to just ignore the error since the other thread will upload pretty much the same thing if the cache key is the same. The CI was a bit misleading since it used the cache from the previous run, so I added an |
@leafo small ping? |
.github/workflows/test.yml
Outdated
with: | ||
luaVersion: ${{ matrix.luaVersion }} | ||
ignoreCache: true |
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.
instead of a 'negative' boolean here can we have it called buildCache
, set to true by default to have it do the cache
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.
Done
Awesome, looks good. Thanks for contributing. I'll push out a new major version after I verify it on my projects that use the action |
Hi @leafo! Sorry if I'm bothering you. It would be nice to have a released version with this so that I can reference it in my actions :) |
This greatly reduces our CI costs, especially with macOS runners.
This uses the tool cache on self-hosted runners and Github's cross-job cache for cross-job, cross-action caching.