Debian Codegraph @

.cargo/vendor/bytes/ci/test-stable.sh

raw
1 #!/bin/bash
2
3 set -ex
4
5 cmd="${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
10 cargo hack "${cmd}" --each-feature --optional-deps
11 # Run with all features
12 cargo "${cmd}" --all-features
13
14 if [[ "${RUST_VERSION}" == "nightly"* ]]; then
15 # Check benchmarks
16 cargo check --benches
17
18 # Check minimal versions
19 # Remove dev-dependencies from Cargo.toml to prevent the next `cargo update`
20 # from determining minimal versions based on dev-dependencies.
21 cargo hack --remove-dev-deps --workspace
22 # Update Cargo.lock to minimal version dependencies.
23 cargo update -Z minimal-versions
24 cargo check --all-features
25 fi