You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1009 B
42 lines
1009 B
set -ex
|
|
|
|
export CARGO_INCREMENTAL=0
|
|
|
|
FEATURES="async_smol async_tokio async_std async_futures"
|
|
|
|
if [ "$CLIPPY" = "yes" ]; then
|
|
cargo clippy --all -- -D warnings
|
|
elif [ "$DOCS" = "yes" ]; then
|
|
cargo clean
|
|
cargo doc --features "$FEATURES" --all --no-deps
|
|
cd book
|
|
mdbook build
|
|
cd ..
|
|
cp -r book/book/html/ target/doc/book/
|
|
travis-cargo doc-upload || true
|
|
elif [ "$RUSTFMT" = "yes" ]; then
|
|
cargo fmt --all -- --check
|
|
elif [ "$MINIMAL_VERSIONS" = "yes" ]; then
|
|
rm Cargo.lock || true
|
|
cargo build -Z minimal-versions
|
|
else
|
|
export RUSTFLAGS="-D warnings"
|
|
|
|
cargo build --features "$FEATURES" $BUILD_ARGS
|
|
|
|
cargo test --features "$FEATURES" --all
|
|
cargo test --features "$FEATURES" --benches
|
|
|
|
cd bencher_compat
|
|
export CARGO_TARGET_DIR="../target"
|
|
cargo test --benches
|
|
cd ..
|
|
|
|
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
|
|
cd macro
|
|
export CARGO_TARGET_DIR="../target"
|
|
cargo test --benches
|
|
cd ..
|
|
fi
|
|
fi
|