Skip to content

Commit f7e01ef

Browse files
authored
Auto merge of #230 - Atul9:add-cargo-fmt-to-travis-config, r=mbrubeck
Add cargo fmt to travis build config The build failure is fixed in this PR #231 hence #231 should be merged first.
2 parents f7c7157 + b3fada1 commit f7e01ef

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

.travis.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,26 @@ matrix:
1919
env: DO_FUZZ=true
2020
- rust: stable
2121
env: DO_FUZZ=true
22-
script: |
23-
cargo build --verbose &&
24-
cargo test --verbose &&
25-
cargo test --verbose --features serde &&
26-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo check --verbose --no-default-features) &&
27-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --features union) &&
28-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --all-features) &&
29-
([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench) &&
30-
([ $TRAVIS_RUST_VERSION != nightly ] || bash ./scripts/run_miri.sh) &&
31-
if [ "$DO_FUZZ" = true ]
32-
then
33-
(
34-
cd fuzz
35-
./travis-fuzz.sh
36-
)
37-
fi
22+
script:
23+
- |
24+
if [[ "$TRAVIS_RUST_VERSION" == stable ]]
25+
then
26+
rustup component add rustfmt
27+
cargo fmt --all -- --check
28+
fi
29+
- |
30+
cargo build --verbose &&
31+
cargo test --verbose &&
32+
cargo test --verbose --features serde &&
33+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo check --verbose --no-default-features) &&
34+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --features union) &&
35+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --all-features) &&
36+
([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench) &&
37+
([ $TRAVIS_RUST_VERSION != nightly ] || bash ./scripts/run_miri.sh) &&
38+
if [ "$DO_FUZZ" = true ]
39+
then
40+
(
41+
cd fuzz
42+
./travis-fuzz.sh
43+
)
44+
fi

0 commit comments

Comments
 (0)