Only cache the .cargo directory on Travis

This commit is contained in:
Sasha Hilton 2020-02-27 00:31:35 +00:00 committed by GitHub
parent 08c239319c
commit a9446c3e01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: