44 directories :
55 - " $HOME/.cargo"
66 - " $HOME/.cache/sccache"
7- before_cache :
8- - rm -rf "$HOME/.cargo/registry"
97
108env :
119 global :
@@ -27,28 +25,28 @@ matrix:
2725 env : TARGET=x86_64-apple-darwin
2826
2927before_install :
30- - export SCCACHE_VER=0.2.8 RUSTC_WRAPPER=sccache
31- - case "$TRAVIS_OS_NAME" in
28+ - |
29+ export RUSTC_WRAPPER=sccache;
30+ cd "$(mktemp -d)";
31+ case "$TRAVIS_OS_NAME" in
3232 linux )
33- cd /tmp
34- && travis_retry curl -sSL "https://github.com/mozilla/sccache/releases/download/${SCCACHE_VER}/sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl.tar.gz" | tar xzf -
35- && sudo mv "sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl/sccache" /usr/local/bin/sccache;
33+ travis_retry curl -sSL 'https://github.com/mozilla/sccache/releases/download/0.2.9/sccache-0.2.9-x86_64-unknown-linux-musl.tar.gz' | tar -xzf - --strip-components=1 &&
34+ sudo cp sccache /usr/local/bin/sccache;
3635 ;;
3736 osx )
38- cd "${TMPDIR}"
39- && travis_retry curl -sSL "https://github.com/mozilla/sccache/releases/download/${SCCACHE_VER}/sccache-${SCCACHE_VER}-x86_64-apple-darwin.tar.gz" | tar xzf -
40- && sudo mv "sccache-${SCCACHE_VER}-x86_64-apple-darwin/sccache" /usr/local/bin/sccache;
37+ travis_retry curl -sSL 'https://github.com/mozilla/sccache/releases/download/0.2.9/sccache-0.2.9-x86_64-apple-darwin.tar.gz' | tar -xzf - --strip-components=1 &&
38+ sudo cp sccache /usr/local/bin/sccache;
4139 ;;
4240 * ) unset RUSTC_WRAPPER;;
43- esac
44- - cd "$TRAVIS_BUILD_DIR"
41+ esac;
42+ cd "$TRAVIS_BUILD_DIR";
4543
4644script :
4745 - cargo test --all
4846 - cargo test --all --no-default-features
49- - if [ "$TARGET" = x86_64-unknown-linux-gnu ] && [ "$TRAVIS_RUST_VERSION" = stable ]; then
50- rustup component add rustfmt;
51- rustfmt -vV;
47+ - |
48+ if [ "$TARGET" = x86_64-unknown-linux-gnu ] && [ "$TRAVIS_RUST_VERSION" = stable ]; then
49+ rustup component add rustfmt && \
5250 cargo fmt --all -- --check;
5351 fi
5452
0 commit comments