set -ex
toolchains=(
+stable
+nightly
)
rm -f Cargo.lock
for toolchain in "${toolchains[@]}"; do
export CARGO_TARGET_DIR=target/$toolchain
cargo "$toolchain" build
cargo "$toolchain" build --release
cargo "$toolchain" test
cargo "$toolchain" test --release
export CARGO_TARGET_DIR=target/$toolchain-no-default-features
cargo "$toolchain" build --no-default-features
cargo "$toolchain" build --no-default-features --release
done
for toolchain in "${toolchains[@]}"; do
export CARGO_TARGET_DIR=target/$toolchain
cargo "$toolchain" clippy --all-targets
done
for toolchain in "${toolchains[@]}"; do
export CARGO_TARGET_DIR=target/$toolchain
if [[ $toolchain = +nightly ]]; then
cargo "$toolchain" miri test
fi
done
cargo semver-checks