From 59ab1c8d78ba4d47de409a25a0bce3065a215936 Mon Sep 17 00:00:00 2001 From: Sergei Pepyakin Date: Thu, 26 Sep 2019 14:13:29 +0200 Subject: [PATCH] Don't use `cache: cargo` in Travis CI's config (#213) --- .travis.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9dc4375..d6f2342 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,17 @@ after_success: | ghp-import -n target/doc && git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -cache: cargo +cache: + # Don't use `cache: cargo` since it adds the `target` directory and that can be huge. + # Saving and loading this directory dwarfes actual compilation and test times. But what is more + # important, is that travis timeouts the build since the job doesn't produce any output for more + # than 10 minutes. + # + # So we just cache ~/.cargo directory + directories: + - /home/travis/.cargo before_cache: # Travis can't cache files that are not readable by "others" - chmod -R a+r $HOME/.cargo + # According to the Travis CI docs for building Rust project this is done by, + - rm -rf /home/travis/.cargo/registry