-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Improve caching in GitHub Actions workflow #7990
Comments
Hi @hlg, You're right that
The "fix" to the CI cache creation is on my radar since quite some time, I know that the update week / day is not optimal, because it should always follow the actual hash of the files. But there can be the case where there are no files, so the cache hash is empty and this created multiple issues in the past, hence this current implementation, which is an improvement from the previous one. But since then I've dabbled with cache creation when debugging another issue, which brought another idea: Someone might want to implement it faster than me, so this is the idea from the top of my head:
Current restore-keys is So, the restore-keys should be [EDIT2: The strategy above changes both the prefix and suffix, but A simple fix, right? Well, I need to setup a repository and test it, and haven't found the executive function to do this in the past few months, so somebody else could try it out ✌️ |
Thanks for reporting, and thanks for the analysis, @kamilkrzyskow! I'm undersand that this is still an area where we can improve. I'll change the title on this issue to zoom out, so we can focus on improving the situation. I'm currently short on time, so I'd be happy to collaborate on PRs. However, #7991 is not mergable due to the reasons stated by @kamilkrzyskow. |
Indeed, I was not aware of plugins and caching in Material for MkDocs. Thanks for clarification. Maybe a note (or link) about the cache in question would be helpful as addition to the documentation. Otherwise - up to you to close this issue or keep it open for more general cache improvement. |
Description
I found that the Github action given to publish the site fails with error message
Warning: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
in the post run hook foractions/cache@v4
. Currently the path specified to be cached is.cache
. However, apparently the home directory is not the place the action is executed and thus the relative path fails to resolve. Further, it might be enough to cache the pip subdirectory. Hence, the path should be changed to include the home folder~/.cache/pip
.I have tested the suggested change with the BIMserver doc and it can also be confirmed by looking at the examples in the Github Actions and the Cache action documentation.
Related links
Proposed change
see PR #7991
Before submitting
The text was updated successfully, but these errors were encountered: