-
Notifications
You must be signed in to change notification settings - Fork 52
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
Use @actions/tool-cache #196
Conversation
91ded92
to
46db17b
Compare
fd77646
to
791b665
Compare
@paulo-ferraz-oliveira I think this is ready for review. Gleam and Rebar3 are still not using the tool-cache but I don't use them and don't want to deal with more merge conflicts so I am only doing Elixir and OTP in this PR. If someone wants to use to contribute the tool-cache for Gleam and Rebar3 that would be great. I also learnt tool-cache is only caching between usages in a single workflow, it doesn't cache between different CI runs. So if we actually want proper caching we need to use |
This is great. I think the main rub was OTP anyway. |
We have a failing job, I'd be in favor of removing it or altering the job so it doesn't test with rebar. I believe that version of rebar isn't supported anymore, at the very least that version of OTP supported isn't supported by rebar itself. If we really want to test OTP 20 with rebar, we should probably bump the rebar version in there, thoughts? |
I created an issue to track this: #204. If somebody wants to give it a go, it's there. |
Which one? It's probably one of those I recently fixed, but wanna be in sync with this comment. |
src/installer.js
Outdated
cachedPath = await tc.cacheDir(extractPath, 'otp', fullVersion) | ||
} | ||
|
||
// TODO: Can we cache install? |
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.
If this is not to be solved in the context of this pull request, could you create a task to track it, and delete the comment? I think there's a similar one below. What's the measurable improvement in caching the installation too?
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.
There's no improvement unless you do multiple installations in one workflow run. I don't think anyone is doing that.
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.
Perfect!
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.
Approved with minor comments:
- needs a rebase
- there's a comment-related comment you might want to look at, otherwise we can do it in the future too
791b665
to
3f2a75e
Compare
@ericmj, if/when you have time do you think you could summarise "I also learnt tool-cache is only caching between usages in a single workflow, it doesn't cache between different CI runs. So if we actually want proper caching we need to use @actions/cache. But tool-cache is still an improvement because it adds retries and removes the shell files and much of the different handling between linux and windows." in a new issue, for later tackling? Thanks much. |
I don't know yet if it's a good idea to do that, still looking into it. I can't find other actions using |
Late to the party here, but I do think that kind of caching should be left up to the user. |
Released in |
No description provided.