File tree Expand file tree Collapse file tree 1 file changed +33
-15
lines changed Expand file tree Collapse file tree 1 file changed +33
-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
+ # Tests on all the channels
16
+ - env : TASK=test
17
+ rust : stable
18
+ - env : TASK=test
19
+ rust : beta
20
+ - env : TASK=test
21
+ rust : nightly
22
+
23
+ # Execute lints with the pinned nightly we know works.
24
+ - env : TASK=lint
25
+ rust : nightly-2018-01-20
26
+
27
+ # Don't block CI if a nightly is faulty
28
+ allow_failures :
29
+ - rust : nightly
30
+
15
31
before_script :
16
32
- export PATH=$HOME/.cargo/bin:$PATH
17
33
- |
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
34
+ if [[ $TASK = "lint" ]] ; then
35
+ if ! type -p cargo-install- update; then
36
+ cargo install --force cargo-update
37
+ else
38
+ cargo install-update -i cargo-update
39
+ fi
40
+
25
41
rustup component add rustfmt-preview
26
42
cargo install-update -i "clippy:$CLIPPY_VERSION"
27
43
fi
28
44
script :
29
45
- |
30
- [[ ! $TRAVIS_RUST_VERSION =~ nightly-* ]] || cargo fmt -- --write-mode diff
31
- - cargo build && cargo test
32
- - |
33
- [[ ! $TRAVIS_RUST_VERSION =~ nightly-* ]] || cargo clippy
46
+ if [[ $TASK = "lint" ]]; then
47
+ cargo fmt -- --write-mode diff
48
+ cargo clippy
49
+ elif [[ $TASK = "test" ]]; then
50
+ cargo build && cargo test
51
+ fi
You can’t perform that action at this time.
0 commit comments