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

Is possible an option to cache also build of own code? #37

Closed
jhg opened this issue Oct 15, 2021 · 2 comments
Closed

Is possible an option to cache also build of own code? #37

jhg opened this issue Oct 15, 2021 · 2 comments

Comments

@jhg
Copy link

jhg commented Oct 15, 2021

The idea is an option default to false to improve builds as Rust compiler will have cache and only need to build the changes.

@Swatinem
Copy link
Owner

The idea is that the tradeoff to only cache dependencies is better because:

  • it would only cache the first invocation when it generates a new cache key.
  • with time the code will diverge more, causing longer builds.
  • incremental needs a lot of disk space, and thus cache space and time to fetch & extract, lowering the benefits.

@jhg
Copy link
Author

jhg commented Oct 16, 2021

Thanks for the comment @Swatinem. About the first two points, I was thinking in incremental and default to false, but I guess that could be complex to do. And interesting the third point.

Oppen added a commit to lambdaclass/cairo-vm that referenced this issue Nov 22, 2022
As explained in Swatinem/rust-cache#37, build artifacts only contribute
to bloating the cache, as the divergences negate any benefits from
caching them due to the cache key not changing over most commits.
Juan-M-V added a commit to lambdaclass/cairo-vm that referenced this issue Dec 22, 2022
* Test github actions cache for rust

* Trigger ci

* Test another cache step

* Trigger ci

* Add cache step

* Back to testing actions/cache

* Trigger ci

* Test path

* Test

* Debug step

* Update rust.yml

* Update bench_pull_request.yml

* Test target without tarpaulin

* Debug

* Don't include lockfiles from targets

* Restrict cache targets to avoid complicated permissions issues

* Include build

* Include incremental build :fingers-crossed:

* Incremental won't work anyway

* Enable codecov

* Clean

* Fix

* Remove spurious separator

* Only cache deps

As explained in Swatinem/rust-cache#37, build artifacts only contribute
to bloating the cache, as the divergences negate any benefits from
caching them due to the cache key not changing over most commits.

Co-authored-by: Juan-M-V <102986292+Juan-M-V@users.noreply.github.com>
Co-authored-by: Mario J. Rugiero <mrugiero@gmail.com>
JadedBlueEyes added a commit to metabrainz/mb-mail-service that referenced this issue Jul 31, 2024
Swatinem/rust-cache#37
This now matches behavior of rust-cache and lowers disk usage
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

No branches or pull requests

2 participants