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 8set -ex 9 10rm -f Cargo.lock 11cargo build --all --exclude signal-hook-async-std --exclude signal-hook-tokio 12 13if [ "$RUST_VERSION" = 1.36.0 ] ; then 14 exit 15fi 16 17if [ "$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" 24else 25 EXCLUDE_FROM_BUILD="" 26fi 27 28export RUSTFLAGS="-D warnings" 29 30cargo test --all --all-features $EXCLUDE_FROM_BUILD 31cargo test --all $EXCLUDE_FROM_BUILD 32