From 6810ad40606263944b0d11d0904d2d0d5f57cb39 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Mon, 21 Oct 2019 21:39:39 +0700 Subject: [PATCH 1/3] build: use minimal rustup profile to avoid rust-docs components --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0e85c20f..35c0d7d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,13 @@ -language: rust +language: shell cache: cargo -rust: - - nightly +before_install: + - curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal + - export PATH="$HOME/.cargo/bin:$PATH" before_script: - (cargo install mdbook --force || true) script: - - export PATH=$PATH:/home/travis/.cargo/bin; - mdbook test - From 7c1607a50f3805dd813100479fd077509c86c5d2 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Mon, 21 Oct 2019 21:40:11 +0700 Subject: [PATCH 2/3] build: cache .cargo/bin only --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 35c0d7d9..bfcb8ab4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,15 @@ language: shell -cache: cargo +cache: + directories: + - "$HOME/.cargo/bin" before_install: - curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal - export PATH="$HOME/.cargo/bin:$PATH" -before_script: - - (cargo install mdbook --force || true) +install: + - cargo install -Z install-upgrade mdbook script: - mdbook test From 4b15126000acf2acfdac7102e87c2cb0592143e1 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Mon, 21 Oct 2019 21:46:29 +0700 Subject: [PATCH 3/3] build: use cargo-cache to clean up .cargo dir --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bfcb8ab4..e5007e5f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,10 @@ language: shell cache: directories: - - "$HOME/.cargo/bin" + - "$HOME/.cargo" +before_cache: + - cargo install -Z install-upgrade cargo-cache --debug + - cargo cache --autoclean before_install: - curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal