Only cache the `.cargo` directory on Travis
@@ -5,18 +5,15 @@ rust:
- beta
- nightly
-cache: cargo
-# Reduce cache bloat
+# 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 -rfv "$TRAVIS_HOME/.cargo/registry/src"
- - rm -rfv target/debug/incremental/{librespot,build_script_build}-*
- - rm -rfv target/debug/.fingerprint/librespot-*
- - rm -rfv target/debug/build/librespot-*
- - rm -rfv target/debug/deps/liblibrespot-*
- - rm -rfv target/debug/deps/librespot-*
- - rm -rfv target/debug/{librespot,liblibrespot}.d
- - rm -rfv target/debug/incremental/{build_script_build,librespot,librespot_core,librespot_connect,librespot_audio,librespot_metadata,librespot_playback,librespot_player,librespot_protocol}-*
- - cargo clean -p librespot -p librespot-core -p librespot-connect -p librespot-audio -p librespot-metadata -p librespot-playback
+ - rm -rf /home/travis/.cargo/registry
addons:
apt:
