-
Notifications
You must be signed in to change notification settings - Fork 25
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
Enable cache sweeping in CI #289
Conversation
This will be reverted in the future. It is done for demonstration purposes only.
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.
Caching in release is nice for faster iteration during a game jam (e.g. with playtesters). The caveat is you have to keep releasing to the same version tag, because GitHub is silly -- but it works. There could be a flag in the env variables to disable it, but it should be supported and probably enabled by default.
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.
Agreed with @benfrankel. I think the pros outweigh the cons for most people, and if you care about these things enough, you can disable the cache very simply.
This reverts commit 7188e2c.
I made a temporary commit (7188e2c) that updates some dependencies, which will make some build artifacts stale. After looking at the run, it removed 365 MiB on the Clippy and Docs jobs and removed a whopping 3.68 GiB on the Tests job. These savings will only occur when a fallback key is used (typically when |
That's really impressive :D Good work! |
Addresses part of #212.
I recently merged a feature into Leafwing-Studios/cargo-cache v2.3.0 that automatically deletes unused build artifacts before creating a new cache, to prevent cache sizes from snowballing.
It's disabled by default due to backward compatibility reasons, so this PR enables it. Cache sweeping should keep cache sizes small and workflow runs fast.
(As an side, should a cache be used at all in the release build? Caching prevents builds from being reproducible, and can introduce the occasional issue when building.)