set -euxo pipefail
main() {
if [ $TARGET = cargo-fmt ]; then
cargo fmt -- --check
return
fi
cargo check
cargo check --package cb
cargo run --package test-generator --target x86_64-unknown-linux-musl
if cargo fmt --version >/dev/null 2>&1; then
cargo fmt
fi
cross test --target $TARGET --release
}
main