1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#!/bin/bash
set -ex
toolchains=(
+1.82
+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
if [[ $toolchain = +nightly ]]; then
cargo "$toolchain" test --features unstable
cargo "$toolchain" test --features unstable --release
fi
cargo "$toolchain" build --no-default-features
cargo "$toolchain" build --no-default-features --release
if [[ $toolchain = +nightly ]]; then
cargo "$toolchain" build --no-default-features --features unstable
cargo "$toolchain" build --no-default-features --features unstable --release
fi
done
for toolchain in "${toolchains[@]}"; do
export CARGO_TARGET_DIR=target/$toolchain
cargo "$toolchain" clippy --all-targets
if [[ $toolchain = +nightly ]]; then
cargo "$toolchain" clippy --all-targets --features unstable
fi
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
|