-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
44 lines (44 loc) · 1.15 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
language: rust
sudo: false
env:
global:
- RUST_VERSION="stable"
- RUST_VERSION_MIN="1.37.0"
matrix:
include:
- rust: stable
env:
- NAME="stable"
- FEATURES=''
- rust: stable
env:
- NAME="stable,clippy"
- FEATURES=''
- CLIPPY=yes
- rust: stable
env:
- NAME="stable,fmt"
- FEATURES=''
- RUSTFMT=yes
- rust: stable
env:
- NAME="rust-${RUST_VERSION_MIN}"
- RUST_VERSION="${RUST_VERSION_MIN}"
- FEATURES=''
- rust: nightly
env:
- NAME="nightly"
- RUST_VERSION="nightly"
- FEATURES=''
before_script:
- rustup default "${RUST_VERSION}"
- rustc --version
- ([ "$CLIPPY" != yes ] || rustup component add clippy)
- ([ "$RUSTFMT" != yes ] || rustup component add rustfmt)
script:
- ([ "$CLIPPY" != yes ] || cargo clippy --features "$FEATURES" --all-targets -- -D clippy::all)
- ([ "$RUSTFMT" != yes ] || cargo fmt --all -- --check)
- |
cargo build --verbose --features "$FEATURES" &&
cargo test --verbose --features "$FEATURES" &&
([ "$BENCH" != 1 ] || cargo bench --verbose --features "$FEATURES")