Skip to content

Commit e91a3f1

Browse files
taiki-ecramertj
authored andcommitted
ci: Use the latest toolchain with clippy available if clippy is unavailable on the latest nightly
1 parent 22e2942 commit e91a3f1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.travis.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ matrix:
6262
- name: cargo clippy
6363
rust: nightly
6464
script:
65-
- if rustup component add clippy-preview;
66-
then
67-
cargo clippy --all --all-features;
68-
else
69-
echo 'Skipping clippy';
65+
- if ! rustup component add clippy; then
66+
target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy`;
67+
echo "'clippy' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead";
68+
rustup toolchain install nightly-$target;
69+
rustup default nightly-$target;
70+
rustup component add clippy;
7071
fi
72+
- cargo clippy --all --all-features
7173

7274
- name: cargo bench
7375
rust: nightly

0 commit comments

Comments
 (0)