Skip to content
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

Use the standard GitHub cache action #15

Merged
merged 1 commit into from
May 8, 2022
Merged

Conversation

palant
Copy link
Contributor

@palant palant commented May 8, 2022

Call me paranoid but I don’t like depending on third-party stuff for the build infrastructure. So I looked into whether there is a more canonical caching solution for Github actions. Turns out there is: https://github.com/actions/cache/blob/main/examples.md#rust---cargo. It works well for my repo.

One has to commit the Cargo.lock file however. That’s probably recommendable either way.

@olafurw
Copy link
Owner

olafurw commented May 8, 2022

Sure, seems fine. I just picked some from google.

@palant
Copy link
Contributor Author

palant commented May 8, 2022

There is one more difference: the way I understood, the action you used cannot clean up the cache for release builds. The cache key doesn’t change when dependencies change, so it just keeps adding to the existing cache. With action/cache on the other hand each dependency change results in a cache key change and a clean rebuild of all dependencies.

@olafurw olafurw merged commit 96a77d2 into olafurw:main May 8, 2022
@olafurw
Copy link
Owner

olafurw commented May 8, 2022

Good call.

@palant palant deleted the action-cache branch May 9, 2022 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants