#!/bin/bash set -ex toolchains=( #+1.65 +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 export CARGO_TARGET_DIR=target/$toolchain-no-default-features 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