Skip to content

Commit

Permalink
Merge pull request rust-lang#965 from lzutao/missed-sccache
Browse files Browse the repository at this point in the history
Fix broken cache by updating sccache version
  • Loading branch information
ehuss authored Jun 29, 2019
2 parents 2b992ac + 6cf8407 commit 2a5a7b4
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ cache:
directories:
- "$HOME/.cargo"
- "$HOME/.cache/sccache"
before_cache:
- rm -rf "$HOME/.cargo/registry"

env:
global:
Expand All @@ -27,28 +25,28 @@ matrix:
env: TARGET=x86_64-apple-darwin

before_install:
- export SCCACHE_VER=0.2.8 RUSTC_WRAPPER=sccache
- case "$TRAVIS_OS_NAME" in
- |
export RUSTC_WRAPPER=sccache;
cd "$(mktemp -d)";
case "$TRAVIS_OS_NAME" in
linux )
cd /tmp
&& 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 -
&& sudo mv "sccache-${SCCACHE_VER}-x86_64-unknown-linux-musl/sccache" /usr/local/bin/sccache;
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 &&
sudo cp sccache /usr/local/bin/sccache;
;;
osx )
cd "${TMPDIR}"
&& travis_retry curl -sSL "https://github.com/mozilla/sccache/releases/download/${SCCACHE_VER}/sccache-${SCCACHE_VER}-x86_64-apple-darwin.tar.gz" | tar xzf -
&& sudo mv "sccache-${SCCACHE_VER}-x86_64-apple-darwin/sccache" /usr/local/bin/sccache;
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 &&
sudo cp sccache /usr/local/bin/sccache;
;;
* ) unset RUSTC_WRAPPER;;
esac
- cd "$TRAVIS_BUILD_DIR"
esac;
cd "$TRAVIS_BUILD_DIR";
script:
- cargo test --all
- cargo test --all --no-default-features
- if [ "$TARGET" = x86_64-unknown-linux-gnu ] && [ "$TRAVIS_RUST_VERSION" = stable ]; then
rustup component add rustfmt;
rustfmt -vV;
- |
if [ "$TARGET" = x86_64-unknown-linux-gnu ] && [ "$TRAVIS_RUST_VERSION" = stable ]; then
rustup component add rustfmt && \
cargo fmt --all -- --check;
fi
Expand Down

0 comments on commit 2a5a7b4

Please sign in to comment.