Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ci powerset #214

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 8 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Loading