Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Move cargo hack check to proper place
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Jun 16, 2023
1 parent e0b0759 commit eff2c65
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions ci/test-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,6 @@ EOF

_ cargo "+${rust_nightly}" install cargo-hack --locked

# Detect possible compilation errors of problematic usage of `dev-utils`-gated code
# without being explicitly declared as such in respctive workspace member
# `Cargo.toml`s. This cannot be detected with `--workspace --all-targets`, due
# to unintentional `dev-utils` feature activation by cargo's feature
# unification mechanism.
# So, we use `cargo hack` to exhaustively build each individual workspace
# members in isolation to work aournd.

# Check implicit usage of `dev-utils`-gated code in non-dev (= production) code by
# buidling without dev dependencies (= tests/benches) for each crate
_ cargo "+${rust_nightly}" hack check --bins
# Check implicit usage of `dev-utils`-gated code in dev (= test/benches) code by
# building in isolation from other crates, which might happen to enable `dev-utils`
_ cargo "+${rust_nightly}" hack check --all-targets

echo --- build environment
(
set -x
Expand Down Expand Up @@ -129,6 +114,21 @@ else
_ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" sort --workspace --check
fi

# Detect possible compilation errors of problematic usage of `dev-utils`-gated code
# without being explicitly declared as such in respctive workspace member
# `Cargo.toml`s. This cannot be detected with `--workspace --all-targets`, due
# to unintentional `dev-utils` feature activation by cargo's feature
# unification mechanism.
# So, we use `cargo hack` to exhaustively build each individual workspace
# members in isolation to work aournd.

# Check implicit usage of `dev-utils`-gated code in non-dev (= production) code by
# buidling without dev dependencies (= tests/benches) for each crate
_ cargo "+${rust_nightly}" hack check --bins
# Check implicit usage of `dev-utils`-gated code in dev (= test/benches) code by
# building in isolation from other crates, which might happen to enable `dev-utils`
_ cargo "+${rust_nightly}" hack check --all-targets

_ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" fmt --all -- --check

_ ci/do-audit.sh
Expand Down

0 comments on commit eff2c65

Please sign in to comment.