diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e7407e8..32fbdcc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,33 +167,35 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v3 + - uses: taiki-e/install-action@just - uses: dtolnay/rust-toolchain@nightly with: components: rustfmt - - run: cargo fmt --all --check + - run: just fmt-check cfg-check: runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v3 + - uses: taiki-e/install-action@just - uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - - run: cargo check -Zcheck-cfg --workspace + - run: just check feature-powerset: runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v4 + - uses: taiki-e/install-action@just - uses: dtolnay/rust-toolchain@stable - uses: taiki-e/install-action@cargo-hack - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - - name: cargo hack - run: cargo hack check --feature-powerset --no-dev-deps + - run: just hack diff --git a/Justfile b/Justfile index fbd03036..29a0d89b 100644 --- a/Justfile +++ b/Justfile @@ -4,6 +4,7 @@ alias l := lint alias f := fmtf alias b := build alias h := hack +alias c := check # default recipe to display help information default: @@ -24,11 +25,11 @@ test-docs: lint: lint-native lint-docs # Lint the workspace -lint-native: fmt-native-check lint-docs +lint-native: fmt-check lint-docs cargo +nightly clippy --workspace --all --all-features --all-targets -- -D warnings # Check the formatting of the workspace -fmt-native-check: +fmt-check: cargo +nightly fmt --all -- --check # Lint the Rust documentation @@ -43,6 +44,10 @@ fmtf: build *args='': cargo build --workspace $@ +# Checks the workspace with a cfg-check +check: + cargo check -Zcheck-cfg --workspace + # Runs `cargo hack check` against the workspace hack: - cargo hack check --feature-powerset --no-dev-deps --exclude op-alloy + cargo hack check --feature-powerset --no-dev-deps --exclude op-alloy --workspace