-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
36 lines (29 loc) · 966 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
language: rust
rust:
- stable
os:
- linux
- osx
before_script:
- if [ "$TRAVIS_OS_NAME" = 'windows' ]; then choco install windows-sdk-10.0; fi
- rustup component add rustfmt-preview
- rustup component add clippy-preview
before_cache: |
if [[ "$TRAVIS_OS_NAME" == linux && "$TRAVIS_RUST_VERSION" == nightly ]]; then
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f
fi
cache:
directories:
- $HOME/.cargo
script:
- export CARGO_TARGET_DIR=/tmp/target
- export RUST_BACKTRACE=1
- RUSTFLAGS="-D warnings" cargo check --all || exit
- if [ "$TRAVIS_RUST_VERSION" = 'stable' ]; then cargo fmt --all -- --check; fi
- if [ "$TRAVIS_RUST_VERSION" = 'stable' ]; then cargo clippy --all -- -D warnings; fi
after_success: |
if [[ "$TRAVIS_OS_NAME" == linux && "$TRAVIS_RUST_VERSION" == nightly ]]; then
cd ..
cargo tarpaulin -r rust -v --all --out Xml
bash <(curl -s https://codecov.io/bash)
fi