explicit caching instead of the default cache: cargo

Based on the suggestions at
https://levans.fr/rust_travis_cache.html
"Beware the rust cache on Travis"
This commit is contained in:
Дамјан Георгиевски 2018-10-20 17:15:05 +02:00
parent 47600fe218
commit 3f871d1779

View file

@ -1,5 +1,4 @@
language: rust
cache: cargo
rust: stable
sudo: false
@ -39,3 +38,13 @@ deploy:
# channel to use to produce the release artifacts
condition: $TRAVIS_RUST_VERSION = stable
tags: true
# Need to cache the whole `.cargo` directory to keep .crates.toml for
# cargo-update to work
cache:
directories:
- /home/travis/.cargo
# But don't cache the cargo registry
before_cache:
- rm -rf /home/travis/.cargo/registry