From b4238e93af09bab036f7668963fa625ef29ae670 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 21 Jan 2019 23:30:02 +0100 Subject: [PATCH] Reduce cache size on travis (#532) The Windows build fails often because it takes too long to store the build cache (timeout). This commit uses `cargo cache` to clean up the /home/philipp/.cargo directory before caching. It also removes caching of the `target` directory since it needs to be recompiled for each new nightly anyway. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 543ff22d..8fcc74fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,8 +25,8 @@ os: - windows cache: - cargo: true directories: + - $HOME/.cargo - $HOME/Library/Caches/Homebrew addons: @@ -45,9 +45,11 @@ before_script: - (test -x $HOME/.cargo/bin/cargo-update-installed || cargo install cargo-update-installed) - (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild) - (test -x $HOME/.cargo/bin/bootimage || cargo install bootimage) + - (test -x $HOME/.cargo/bin/cargo-cache || cargo install cargo-cache) - cargo update-installed script: - bootimage build - cargo test - bootimage test + - cargo cache --autoclean