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
Automatically enable caching of Rust packages #4470
Comments
/cc @alexcrichton and other people on the Rust tooling team |
Aha, thanks for the cc! Here's a bit of a rundown on where cargo downloads deps:
In other words, Yes caching |
Thanks for the info. Which directories are useful in caches? Users can specify, of course, but I suspect @alex wants a shortcut such as: cache: cargo |
@BanzaiMan yeah, I think |
@alexcrichton It looks like caching |
Yeah, that's correct. All compiled output is in the project's local |
So, the right directory to cache for the proposed |
It's generally pretty rare that you actually can cache binary artifacts across runs of the compiler, it requires a number of stars to align:
Overall I'd recommend only caching |
I've thought about this on and off for the last 6 weeks. Here's why I believe caching built libraries would be worth it:
Given that, I think caching binary artifacts would be good. @alexcrichton if I cache the |
Hmm, it looks like I'm not correct about there being a per-environment cache. @BanzaiMan how hard would it be to split the cache out based on which |
@alex yep, that should do the trick! |
Cool, it sounds like making Travis have a separate cache per Rust channel is the only missing piece then. |
We can easily do separate caches per Rust channel! I can talk to @BanzaiMan about this later in the week. |
@joshk Cool, please let me know if that's somethign I can help out with! |
To recap, caching For the name, is cache: cargo |
Yes, I also feel that caching |
@alex By "split out caches out by rust line", you mean the |
Exactly. On Wed, Oct 28, 2015 at 8:12 AM, Hiro Asari notifications@github.com
"I disapprove of what you say, but I will defend to the death your right to |
Resolves travis-ci/travis-ci#4470 As discussed in that thread, we will add: ```yaml cache: cargo ``` and equivalent for Rust. This will add `$HOME/.cargo` and `target` (in `$TRAVIS_BUILD_DIR`) to the cache.
@alex @frewsxcv @alexcrichton The PR above defines |
Sounds good to me! |
To be clear: caches will be marked with |
@BanzaiMan sounds perfect! |
Deployed and documented (https://docs.travis-ci.com/user/caching/#Rust-Cargo-cache)! Thanks for your help, everyone! |
Awesome, thanks @BanzaiMan! |
Right now by default when you have a
language: rust
repo on travis, it redownloads your dependencies on every run. I believe caching/home/travis/.cargo/
would resolve this, but someone who works on Cargo/Rust should probably chime in.The text was updated successfully, but these errors were encountered: