Resolve the std/hashbrown conflict situation
[anymap] / test
1 #!/bin/sh
2 set -e
3 export RUSTFLAGS="-D warnings"
4 export RUSTDOCFLAGS="-D warnings"
5 run_tests() {
6 for release in "" "--release"; do
7 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. ¯\_(ツ)_/¯)
8 cargo $1 test $release --no-default-features --features hashbrown
9 cargo $1 test $release
10 cargo $1 test $release --all-features
11 done
12 }
13
14 # We’d like to test with the oldest declared-supported version of *all* our dependencies.
15 # That means Rust 1.36.0 + hashbrown 0.1.1.
16 # Hence the different lock file.
17 # (Also Rust 1.36.0 can’t read the latest lock file format.)
18 cp test-oldest-Cargo.lock Cargo.lock
19 run_tests +1.36.0
20 rm Cargo.lock
21 run_tests
22
23 cargo clippy
24 cargo bench
25 cargo doc