-
Notifications
You must be signed in to change notification settings - Fork 28
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
Are downloads cached? #6
Comments
Take this with a grain of salt (since I'm not the maintainer), but I believe it does cache. If you read further down the doc you linked:
Also a cursory look at the code confirms that the functions are used. See https://github.com/DeLaGuardo/setup-clojure/search?q=cacheDir |
GitHub's cache action does this, and is leveraged by the setup-java action for exactly this purpose. I too am in favour of setup-clojure doing something similar, though in looking through the setup-java action's code to try to see how this might be done (for a PR), I realised I'm way out of my depth when it comes to the specifics of implementing GitHub actions. |
I did some research and can conclude that GitHub action should be widespread enough in order to benefit from tool cache. Here is the result of CodeQL
Java_Adopt_jdk
Java_Temurin-Hotspot_jdk
PyPy
Python
Ruby
go
node It seems like each next run is more likely to be performed in some other random machine. For some reason, I assumed GitHub has mechanism that assigns previously used physical runners when possible, so we often hit the tool cache. Seems like it's not the case. |
If I understand correctly, there is two separate cache concepts for GitHub actions:
What we probably want is to leverage the second one to store Java distributions, Clojure tools, What I want to try is to pre-populate |
Hi, I’m interested in using this action, but I can’t tell whether it caches Clojure and whichever tools are specified (in my case it’d be tools.deps along with the CLI tools.) I’m generally uncomfortable with automations that download the same dependencies every time they run, so I personally tend to include very comprehensive caching in my automations (example).
I did search the code and saw that it’s using
@actions/tool-cache
which seems promising, but when I read the docs I found this:(emphasis mine)
This seems to imply that
@actions/tool-cache
does not actually, you know, cache anything, when running on GitHub’s runners. But of course, there’s a very good chance I’m just missing something here.Bottom line: does this action currently its downloads when running on GitHub’s runners?
Thank you!
The text was updated successfully, but these errors were encountered: