-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
66 lines (57 loc) · 1.13 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
language: rust
cache: cargo
rust:
- 1.26.0 # oldest supported version
- stable
- beta
- nightly
os:
- linux
env:
global:
- RUN_TEST=true
- RUN_CLIPPY=false
- RUSTFMT_VERSION=0.3.6
matrix:
fast_finish: true # Don't wait for the optional builds
include:
- rust: stable
env:
- RUN_RUSTFMT=true
- RUN_TEST=false
- rust: nightly
env:
- RUN_CLIPPY=true
- RUN_TEST=false
allow_failures: []
before_script:
- bash -c 'if [[ "$RUN_RUSTFMT" == "true" ]]; then
rustup component add rustfmt-preview
;
fi'
- bash -c 'if [[ "$RUN_CLIPPY" == "true" ]]; then
rm -f ~/.cargo/bin/clippy;
rustup component add clippy-preview
;
fi'
script:
- bash -c 'if [[ "$RUN_TEST" == "true" ]]; then
cargo test
;
fi'
- bash -c 'if [[ "$RUN_RUSTFMT" == "true" ]]; then
cargo fmt -v -- --check
;
fi'
- bash -c 'if [[ "$RUN_CLIPPY" == "true" ]]; then
cargo clippy -- -D warnings
;
fi'
branches:
only:
# release tags
- /^v\d+\.\d+\.\d+.*$/
- master
notifications:
email:
on_success: never