File tree 1 file changed +27
-15
lines changed
1 file changed +27
-15
lines changed Original file line number Diff line number Diff line change 1
1
sudo : false
2
2
dist : trusty
3
+
3
4
language : rust
4
5
cache : cargo
5
- rust :
6
- - stable
7
- - nightly-2018-01-20
8
6
9
7
env :
10
8
global :
11
9
- RUSTFLAGS=-Dwarnings
12
- # Versions known to work with pinned nightly.
10
+ # Versions known to work with pinned nightly for lints .
13
11
- CLIPPY_VERSION=0.0.180
14
12
13
+ matrix :
14
+ include :
15
+ - env : TASK=test
16
+ rust : stable
17
+ - env : TASK=test
18
+ rust : beta
19
+ - env : TASK=lint
20
+ rust : nightly-2018-01-20
21
+ allow_failures :
22
+ - env : TASK=test
23
+ rust : nightly
24
+
15
25
before_script :
16
26
- export PATH=$HOME/.cargo/bin:$PATH
17
27
- |
18
- if ! type -p cargo-install-update ; then
19
- cargo install --force cargo-update
20
- else
21
- cargo install-update -i cargo-update
22
- fi
23
- - |
24
- if [[ $TRAVIS_RUST_VERSION =~ nightly-* ]]; then
28
+ if [[ $TASK = "lint" ]] ; then
29
+ if ! type -p cargo-install- update; then
30
+ cargo install --force cargo-update
31
+ else
32
+ cargo install-update -i cargo-update
33
+ fi
34
+
25
35
rustup component add rustfmt-preview
26
36
cargo install-update -i "clippy:$CLIPPY_VERSION"
27
37
fi
28
38
script :
29
39
- |
30
- [[ ! $TRAVIS_RUST_VERSION =~ nightly-* ]] || cargo fmt -- --write-mode diff
31
- - cargo build && cargo test
32
- - |
33
- [[ ! $TRAVIS_RUST_VERSION =~ nightly-* ]] || cargo clippy
40
+ if [[ $TASK = "lint" ]]; then
41
+ cargo fmt -- --write-mode diff
42
+ cargo clippy
43
+ elif [[ $TASK = "test" ]]; then
44
+ cargo build && cargo test
45
+ fi
You can’t perform that action at this time.
0 commit comments