From 3f871d1779e4154619b362bb7094df7bb264ca76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Sat, 20 Oct 2018 17:15:05 +0200 Subject: [PATCH] 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" --- .travis.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b3353de..072fe3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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