Travis: split build into jobs

- Change benchmarks build to use `cargo test --benches`. This runs the
  benchmarks and compiles faster than `cargo bench`.

Closes 
This commit is contained in:
Chris Wong 2019-03-27 19:42:02 +13:00
parent dae5074c8d
commit c5e8eb4d5f

View file

@ -2,19 +2,22 @@ language: rust
rust: nightly rust: nightly
sudo: false sudo: false
before_script: jobs:
- | include:
RUN_CLIPPY=true - name: "Main"
rustup component add clippy --toolchain=nightly || RUN_CLIPPY=false script:
- |
script: RUN_CLIPPY=true
- cargo test --all --all-features rustup component add clippy --toolchain=nightly || RUN_CLIPPY=false
- (cd benchmarks && cargo bench --no-run) - cargo test --all --all-features
- | - |
if $RUN_CLIPPY; then if $RUN_CLIPPY; then
CLIPPY_STATUS=0 CLIPPY_STATUS=0
for package in maud_htmlescape maud_macros maud; do for package in maud_htmlescape maud_macros maud; do
(cd $package && cargo clippy -- -D warnings) || CLIPPY_STATUS=$? (cd $package && cargo clippy -- -D warnings) || CLIPPY_STATUS=$?
done done
(exit $CLIPPY_STATUS) (exit $CLIPPY_STATUS)
fi fi
- name: "Benchmarks"
script:
- (cd benchmarks && cargo test --benches)