23
23
- stable
24
24
25
25
before_script :
26
+ # Travis installs rust with a non-default "minimal" profile, and advises us
27
+ # to add clippy manually:
28
+ - rustup component add clippy
29
+ # Unfortunately, this method often breaks on the nightly channel, where the
30
+ # most recent build might not have all the optional components.
31
+ # We explicitly specify `--profile default` to obtain the most recent nightly
32
+ # that has rustfmt (we don't care if it's a week old, as we need it only for
33
+ # an experimental flag):
34
+ - rustup toolchain install nightly --profile default
35
+
26
36
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
27
37
- export PATH=$HOME/.cargo/bin:$PATH
28
38
# `cargo install` fails if the specified binary is already installed, and
@@ -33,13 +43,9 @@ before_script:
33
43
# rebuilds from scratch, ignoring the cache entirely.
34
44
#
35
45
# [0]: https://github.com/rust-lang/cargo/issues/2082
36
- - cargo install cargo-update || echo "cargo-update already installed"
37
- - cargo install cargo-travis || echo "cargo-travis already installed"
46
+ - cargo install cargo-update || echo "cargo-update already installed" # for `cargo install-update`
47
+ - cargo install cargo-travis || echo "cargo-travis already installed" # for `cargo coveralls`
38
48
- cargo install-update -a # updates cargo-travis, if the cached version is outdated
39
- - rustup component add clippy
40
- # The license_template_path setting we use to verify copyright headers is
41
- # only available on the nightly rustfmt.
42
- - rustup toolchain install nightly && rustup component add --toolchain nightly rustfmt
43
49
44
50
script :
45
51
# Clippy must be run first, as its lints are only triggered during
@@ -50,6 +56,8 @@ script:
50
56
- travis-cargo build
51
57
- travis-cargo test
52
58
- travis-cargo test -- all-features
59
+ # The license_template_path setting we use to verify copyright headers is
60
+ # only available on the nightly rustfmt.
53
61
- cargo +nightly fmt -- --check --config-path <(echo 'license_template_path = "HEADER"')
54
62
55
63
after_success :
0 commit comments