-
Notifications
You must be signed in to change notification settings - Fork 9
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
make depot if not restored #91
Conversation
# for other julia actions to check, like https://github.com/julia-actions/julia-buildpkg/pull/41 | ||
- name: make depot if not restored, then list depot directory sizes | ||
run: | | ||
mkdir -p ${{ steps.paths.outputs.depot }} |
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.
I'd personally make this a separate step which only occurs on a cache miss
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.
So it seems that steps.cache.outputs.cache-hit
is only true
if the full key is hit. We only ever hit partial hits by design, so will always be false
, so the only way to do this would be to check if the dir exists in the cmd rather than do an if
.
The current setup is robust to this, so maybe we just leave this PR as is?
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.
You are correct. This would be possible to determine if actions/cache
had the same outputs as actions/cache/restore
. Oh well
# for other julia actions to check, like https://github.com/julia-actions/julia-buildpkg/pull/41 | ||
- name: make depot if not restored, then list depot directory sizes | ||
run: | | ||
mkdir -p ${{ steps.paths.outputs.depot }} |
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.
You are correct. This would be possible to determine if actions/cache
had the same outputs as actions/cache/restore
. Oh well
- name: make depot if not restored, then list depot directory sizes | ||
run: | | ||
mkdir -p ${{ steps.paths.outputs.depot }} | ||
du -shc ${{ steps.paths.outputs.depot }}/* || 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.
Perhaps this should be guarded behind something, otherwise it looks a bit like an error in the logs when the folder is empty:
du: cannot access '/home/runner/.julia/*': No such file or directory
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.
Yeah I tried to figure that out but couldn't. It's the contents that doesn't exist not the dir.
This helps other following actions know that this action ran
i.e. julia-actions/julia-buildpkg#41
Alternatively we could set an env var, but this seems logical to me