2022-01-25 19:22:06 +11:00
#!/bin/sh
set -e
export RUSTFLAGS="-D warnings"
export RUSTDOCFLAGS="-D warnings"
2022-01-25 21:24:48 +11:00
run_tests() {
for release in "" "--release"; do
2022-02-22 13:50:22 +11:00
cargo $1 test $release --no-default-features # Not very useful without std or hashbrown, but hey, it works! (Doctests emit an error about needing a global allocator, but it exits zero anyway. ¯\_(ツ)_/¯)
2022-01-25 21:24:48 +11:00
cargo $1 test $release --no-default-features --features hashbrown
cargo $1 test $release
2022-02-22 13:50:22 +11:00
cargo $1 test $release --all-features
2022-01-25 21:24:48 +11:00
done
}
# We’ d like to test with the oldest declared-supported version of *all* our dependencies.
# That means Rust 1.36.0 + hashbrown 0.1.1.
# Hence the different lock file.
# (Also Rust 1.36.0 can’ t read the latest lock file format.)
cp test-oldest-Cargo.lock Cargo.lock
run_tests +1.36.0
rm Cargo.lock
run_tests
2022-01-25 19:22:06 +11:00
cargo clippy
2022-01-25 21:24:48 +11:00
cargo bench
2022-01-25 19:22:06 +11:00
cargo doc