Output cache-paths and cache-key as well#169
Merged
IanButterworth merged 1 commit intojulia-actions:mainfrom Apr 1, 2025
penelopeysm:main
Merged
Output cache-paths and cache-key as well#169IanButterworth merged 1 commit intojulia-actions:mainfrom penelopeysm:main
cache-paths and cache-key as well#169IanButterworth merged 1 commit intojulia-actions:mainfrom
penelopeysm:main
Conversation
Member
|
Sounds good, at least adding these outputs seems harmless. If you end up happy with this design, it's definitely worth documenting here. |
IanButterworth
approved these changes
Apr 1, 2025
Contributor
Author
|
Thanks! Sure, I'll do a followup PR on the readme :) |
Member
This was referenced Apr 2, 2025
This was referenced Mar 26, 2026
Closed
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello! I've been looking for a way to save the cache even if an intermediate step fails (#79). (Context: on Turing.jl docs it takes 10 mins to instantiate the environment and 2 hours to build the docs, so having this would save a lot of time on PRs)
I understand that a 'nicer' solution to this would depend on upstream fixes to GitHub Actions, but this PR seems like a good enough way to do it. The gist is that as long as we know the cache paths and the key, we can manually call
actions/cache/saveto save the cache at the bottom of the workflow. (That's also the workflow that GitHub said to use.)So if
julia-actions/cacheoutputs these as variables, it becomes easy to write something likeI've tested this using a playground repo and a workflow pointing to my fork, and it seems to work perfectly as far as I can tell. You can see the first time the action runs here (no cache hit, and an intermediate step fails, but the cache is still saved):
https://github.com/penelopeysm/Shaymin.jl/actions/runs/14022967403/job/39257320572
and a subsequent run where the cache is then correctly loaded:
https://github.com/penelopeysm/Shaymin.jl/actions/runs/14022985223/job/39257363646
If you think this approach is sensible, then I can add some documentation explaining this too.