| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# We try to support some older versions of rustc. However, the support is |
| 4 |
# tiered a bit. Our dev-dependencies do *not* guarantee that old minimal |
| 5 |
# version. So we don't do tests on the older ones. Also, the |
| 6 |
# signal-hook-registry supports older rustc than we signal-hook. |
| 7 |
|
| 8 |
set -ex |
| 9 |
|
| 10 |
rm -f Cargo.lock |
| 11 |
cargo build --all --exclude signal-hook-async-std --exclude signal-hook-tokio |
| 12 |
|
| 13 |
if [ "$RUST_VERSION" = 1.36.0 ] ; then |
| 14 |
exit |
| 15 |
fi |
| 16 |
|
| 17 |
if [ "$OS" = "windows-latest" ] || [ "$RUST_VERSION" = 1.40.0 ]; then |
| 18 |
# The async support crates rely on the iterator module |
| 19 |
# which isn't available for windows. So exclude them |
| 20 |
# from the build. |
| 21 |
|
| 22 |
# Also, some dependencies of the runtimes don't like 1.40. |
| 23 |
EXCLUDE_FROM_BUILD="--exclude signal-hook-mio --exclude signal-hook-tokio --exclude signal-hook-async-std" |
| 24 |
else |
| 25 |
EXCLUDE_FROM_BUILD="" |
| 26 |
fi |
| 27 |
|
| 28 |
export RUSTFLAGS="-D warnings" |
| 29 |
|
| 30 |
cargo test --all --all-features $EXCLUDE_FROM_BUILD |
| 31 |
cargo test --all $EXCLUDE_FROM_BUILD |