-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path.travis.yml
45 lines (45 loc) · 1.07 KB
/
.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
37
38
39
40
41
42
43
44
45
env:
global:
- RUST_BACKTRACE=1
- PATH=$PATH:$HOME/.cargo/bin
os:
- linux
- osx
- windows
language: rust
rust:
- 1.30.1
sudo: false
cache:
cargo: true
before_script:
- if ! cargo prune --version | grep -q "0.1.8"; then
cargo install cargo-prune --vers="0.1.8" --force;
fi
- if ! rustfmt --version | grep -q "0.99.4-stable"; then
rustup component add rustfmt-preview;
if ! rustfmt --version | grep -q "0.99.4-stable"; then
printf "Bad rustfmt version";
exit 1;
fi
fi
- if ! cargo clippy --version | grep -q "0.0.212"; then
rustup component add clippy-preview;
if ! cargo clippy --version | grep -q "0.0.212"; then
printf "Bad clippy version";
exit 1;
fi
fi
script:
- set -x;
cargo test --verbose --release
- if [ "${TRAVIS_OS_NAME}" = linux ]; then
(
set -x;
cargo fmt -- --check &&
cargo clippy --verbose --release &&
cargo clippy --verbose --release --profile=test ;
)
fi
before_cache:
- cargo prune