Skip to content

Commit 5c17ae7

Browse files
chore: add cargo hack to CI for feature combinations check (#151)
1 parent 6ef65f9 commit 5c17ae7

File tree

3 files changed

+39
-41
lines changed

3 files changed

+39
-41
lines changed

.github/workflows/ci.yml

+21
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,26 @@ jobs:
9696
- name: Unit/integration tests
9797
run: cargo test --workspace --exclude e2e
9898

99+
additional-check-for-published-crates:
100+
runs-on: ubuntu-latest
101+
steps:
102+
- name: Checkout repository
103+
uses: actions/checkout@v4
104+
with:
105+
token: ${{ secrets.GITHUB_TOKEN }}
106+
107+
- name: Setup Rust
108+
uses: dtolnay/rust-toolchain@master
109+
with:
110+
toolchain: ${{ env.RUST_VERSION }}
111+
112+
- name: Setup cargo hack
113+
uses: taiki-e/install-action@cargo-hack
114+
115+
- name: Run cargo hack to check for invalid feature flag combinations
116+
working-directory: packages/encoding
117+
run: cargo hack --feature-powerset --no-dev-deps check
118+
99119
e2e-release-build:
100120
runs-on: ubuntu-latest
101121
steps:
@@ -315,6 +335,7 @@ jobs:
315335
publish:
316336
needs:
317337
- cargo-verifications
338+
- additional-check-for-published-crates
318339
- publish-crates-check
319340
# Only do this job if publishing a release
320341
if: github.event_name == 'release' && github.event.action == 'published'

Cargo.lock

+16-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/encoding/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ publish = true
1313
# alloy only really needed when generating proofs, and since the core doesn't
1414
# need to do that we've gated it behing the `kzg` feature flag.
1515
alloy = { workspace = true, features = ["consensus", "eips"], optional = true }
16-
anyhow = { workspace = true }
16+
anyhow = { workspace = true, features = ["default"] }
1717
bitvec = { workspace = true, features = ["default"] }
1818
c-kzg = { workspace = true }
1919
flate2 = { workspace = true, features = ["default"] }
2020
hex = { workspace = true }
2121
itertools = { workspace = true, features = ["use_std"] }
22-
postcard = { workspace = true, features = ["alloc"] }
22+
postcard = { workspace = true, features = ["use-std"] }
2323
serde = { workspace = true }
2424
static_assertions = { workspace = true }
2525

0 commit comments

Comments
 (0)