Skip to content

Commit 801114a

Browse files
committed
Only run clippy and rustfmt on CI if the component is available
1 parent 8cb8db4 commit 801114a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.travis.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,19 @@ matrix:
129129
- name: "rustfmt"
130130
install: true
131131
rust: nightly
132-
before_script: rustup component add rustfmt-preview
133-
script: cargo fmt --all -- --check
132+
script: |
133+
if rustup component add rustfmt-preview ; then
134+
cargo fmt --all -- --check
135+
fi
134136
- name: "clippy"
135137
install: true
136138
rust: nightly
137139
# allow(clippy::all) fails in the syscrate, so we can't use --all here:
138140
script: |
139-
if rustup component add clippy-preview; then
141+
if rustup component add clippy-preview ; then
140142
cargo clippy -p jemalloc-sys -- -D clippy::pedantic
141143
cargo clippy -p jemallocator -- -D clippy::pedantic
144+
cargo clippy -p jemallocator-global -- -D clippy::pedantic
142145
cargo clippy -p jemalloc-ctl -- -D clippy::pedantic
143146
fi
144147
- name: "Shellcheck"

0 commit comments

Comments
 (0)