From a9446c3e01e3c43d4c603c54e95805e033d37ddb Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Thu, 27 Feb 2020 00:31:35 +0000 Subject: [PATCH] Only cache the `.cargo` directory on Travis --- .travis.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 31b7bbe..e268d62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: