Add the optional tool-cache input, which allows the user to override the location into which Julia is installed#100
Conversation
58411cc to
c9d9098
Compare
tool-cache input, which allows the user to override the location into which Julia is installedtool-cache input, which allows the user to override the location into which Julia is installed
|
Alright, this is now working correctly and is ready for review. Right before merging, I'll remove the lines in |
c9d9098 to
1497028
Compare
|
I'm a bit confused why setting the environment variable in the workflow doesn't accomplish the same. I've tried but it seems to ignore it. I don't like the approach of changing the tool cache directory. This could have unintended side effects. I think a better approach would be to use an input to set the temporary installation to a custom location: Line 186 in f29cb96 This directory is usually removed after adding Julia to the tool-cache. We'd have add a condition to only do so if there's no custom installation dir: setup-julia/src/setup-julia.ts Lines 65 to 66 in f29cb96 We might want to add deletion of that dir as a post-action step. Otherwise it could fill up the storage of self-hosted runners with a persistent filesystem. What do you think? |
1497028 to
8c7a800
Compare
|
In addition to the comments above, I'm curious why one would want to do this? The other setup-* actions don't take installation directories as an input either, so I'm not sure the complexity is worth it. (but I'm open to good arguments) |
8c7a800 to
51f29bb
Compare
51f29bb to
2258e98
Compare
|
So, the motivation here is to be able to cache the precompilation cache (the The core problem here is that there are certain stdlibs (e.g. Therefore, when you precompile a project that depends (directly or indirectly) on one of these stdlibs, that stdlib is also precompiled, and the corresponding So, suppose that we have two GitHub Actions CI jobs, job A and job B. Both jobs will run on GitHub-hosted runners of the same operating system and architecture. At the end of job A, we want to upload our cache, and at the beginning of job B, we want to download our cache and have the precompilation files be fresh. In order for that to work, the So the only solution that I have come up with is:
|
2258e98 to
5feb787
Compare
…e the location into which Julia is installed
5feb787 to
82a743c
Compare
|
That sounds like a good reason, let's add it. But imo we should add it properly by setting the new installation path in the places where it's relevant instead of overwriting the environment variable as I'm not sure what side effects that will have. What are your thoughts on that? |
No description provided.