1#!/bin/bash
2
3set -ex
4
5cmd="${1:-test}"
6
7# Run with each feature
8# * --each-feature includes both default/no-default features
9# * --optional-deps is needed for serde feature
10cargo hack "${cmd}" --each-feature --optional-deps
11# Run with all features
12cargo "${cmd}" --all-features
13
14if [[ "${RUST_VERSION}" == "nightly"* ]]; then
15    # Check benchmarks
16    cargo check --benches
17
18    # Check minimal versions
19    cargo clean
20    cargo update -Zminimal-versions
21    cargo check --all-features
22fi
23