-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
27 lines (26 loc) · 1015 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
language: rust
rust:
- nightly
before_script: |
rustup component add clippy-preview;
if ! rustup component add clippy; then
target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy`;
echo "'clippy' is unavailable on the toolchain 'nightly', using the toolchain 'nightly-$target' instead";
rustup toolchain install nightly-$target;
rustup default nightly-$target;
rustup component add clippy;
fi
rustup component add rustfmt-preview;
if ! rustup component add rustfmt; then
target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt`;
echo "'rustfmt' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead";
rustup toolchain install nightly-$target;
rustup default nightly-$target;
rustup component add rustfmt;
fi
script: |
cargo fmt -- --check &&
cargo clippy -- -D clippy &&
cargo build --verbose &&
cargo test --verbose
cache: cargo