[travis] Enable cache for $HOME/.cargo/bin/
authorBehnam Esfahbod <behnam@zwnj.org>
Mon, 11 Sep 2017 00:45:59 +0000 (17:45 -0700)
committerBehnam Esfahbod <behnam@zwnj.org>
Fri, 22 Sep 2017 08:02:18 +0000 (01:02 -0700)
This should accelerate the `cargo install mdbook` step under `install`,
which is currently called on all linux+nightly setups.

.travis.yml

index b925208bc5146cdd72bcf148df1aee0a3bb9379e..c2f7ca36cf70a4923bf0f70e877c85742ec7c55b 100644 (file)
@@ -6,6 +6,10 @@ dist: trusty
 git:
   depth: 1
 
+cache:
+  directories:
+    - $HOME/.cargo/bin/
+
 matrix:
   include:
     - env: TARGET=x86_64-unknown-linux-gnu
@@ -22,7 +26,7 @@ matrix:
            ALT=i686-unknown-linux-gnu
       rust: nightly
       install:
-        - cargo install mdbook
+        - mdbook --help || cargo install mdbook --force
       script:
         - cargo test
         - cargo doc --no-deps