CI: Enable sccache build (#913)
This commit is contained in:
parent
581187098c
commit
7ab939f8f2
37
.travis.yml
37
.travis.yml
|
@ -1,5 +1,16 @@
|
||||||
language: rust
|
language: rust
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- "$HOME/.cargo"
|
||||||
|
- "$HOME/.cache/sccache"
|
||||||
|
before_cache:
|
||||||
|
- rm -rf "$HOME/.cargo/registry"
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- CRATE_NAME=mdbook
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- rust: stable
|
- rust: stable
|
||||||
|
@ -13,16 +24,22 @@ matrix:
|
||||||
os: osx
|
os: osx
|
||||||
env: TARGET=x86_64-apple-darwin
|
env: TARGET=x86_64-apple-darwin
|
||||||
|
|
||||||
cache:
|
before_install:
|
||||||
timeout: 360
|
- export SCCACHE_VER=0.2.8 RUSTC_WRAPPER=sccache
|
||||||
cargo: true
|
- case "$TRAVIS_OS_NAME" in
|
||||||
|
linux )
|
||||||
before_cache:
|
cd /tmp
|
||||||
- chmod -R a+r $HOME/.cargo
|
&& 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;
|
||||||
env:
|
;;
|
||||||
global:
|
osx )
|
||||||
- CRATE_NAME=mdbook
|
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;
|
||||||
|
;;
|
||||||
|
* ) unset RUSTC_WRAPPER;;
|
||||||
|
esac
|
||||||
|
- cd "$TRAVIS_BUILD_DIR"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cargo test --all
|
- cargo test --all
|
||||||
|
|
Loading…
Reference in New Issue