PSA: You can now specify `cache: cargo` in `.travis.yml` to cache Cargo dependencies
github.com/travis-ci/travis-build/pull/710Posted Apr 28, 2016, 12:16 AM UTC
Posted Apr 28, 2016, 12:16 AM UTC
Why are things like this not turned on by default?
Recent feature addition I would guess? I don't think it was too long ago that travis even got good lang:rust support.
If it's new, or even if it isn't, I think they'd want it off by default to not unnecessarily store caches for projects which don't run very often.
I admit, I was imagining they would do some kind of deduplication of such things; I hadn’t thought about what was actually happening as explained at https://docs.travis-ci.com/user/caching/#How-does-the-caching-work%3F. Caching the Cargo package downloads would be much better handled by “something like our APT caching proxy”.
Yeah, that would be much better, but I guess they would have to themselves integrate trustworthy build independent dependency compilation, which would be hard.
Another thing to think of is that a lot of projects use tho nightly versions too, or multiple versions - and caching dependencies for those builds would be fairly pointless AFAIK.
[deleted]
Caching target is likely not useful when using Rust Nightly unless you do many builds per day, is it? When the compiler is updated anything in target needs to be rebuilt.
Personally, I only care about travis running quickly when I need to run it multiple times in a row (e.g., when fixing a bug that only shows up on MacOs (I don't have a Mac)).
We have a project that is pinned to a nightly version that doesn't change that frequently. Caching target in this case is a big win.
Awesome. Lets see how the build time decreases by this. At the time of writing, we have build times near 30 minutes for imag
https://docs.travis-ci.com/user/caching/#Rust-Cargo-cache