• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1set -ex
2
3export CARGO_INCREMENTAL=0
4
5FEATURES="async_smol async_tokio async_std async_futures"
6
7if [ "$CLIPPY" = "yes" ]; then
8      cargo clippy --all -- -D warnings
9elif [ "$DOCS" = "yes" ]; then
10    cargo clean
11    cargo doc --features "$FEATURES" --all --no-deps
12    cd book
13    mdbook build
14    cd ..
15    cp -r book/book/html/ target/doc/book/
16    travis-cargo doc-upload || true
17elif [ "$RUSTFMT" = "yes" ]; then
18    cargo fmt --all -- --check
19elif [ "$MINIMAL_VERSIONS" = "yes" ]; then
20    rm Cargo.lock || true
21    cargo build -Z minimal-versions
22else
23    export RUSTFLAGS="-D warnings"
24
25    cargo build --features "$FEATURES" $BUILD_ARGS
26
27    cargo test --features "$FEATURES" --all
28    cargo test --features "$FEATURES" --benches
29
30    cd bencher_compat
31    export CARGO_TARGET_DIR="../target"
32    cargo test --benches
33    cd ..
34
35    if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
36        cd macro
37        export CARGO_TARGET_DIR="../target"
38        cargo test --benches
39        cd ..
40    fi
41fi
42