Skip to content

Commit

Permalink
CI check features (#1708)
Browse files Browse the repository at this point in the history
To resolve issue #1136.

This is a cross verification against zepter.

- [cargo-featalign](https://github.com/hack-ink/cargo-featalign):
Verifies the proper propagation of all features.
- [zepter](https://github.com/ggwpez/zepter): Checks for accidentally
enabled features.

cc @ggwpez 

---
Switch to a new branch. Original PR #1537.

---------

Signed-off-by: Xavier Lau <xavier@inv.cafe>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 16, 2024
1 parent a42a47f commit 05cfb02
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/check-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check Features

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
check-features:
runs-on: ubuntu-latest
steps:
- name: Fetch latest code
uses: actions/checkout@v4
- name: Check
uses: hack-ink/cargo-featalign-action@bea88a864d6ca7d0c53c26f1391ce1d431dc7f34 # v0.1.1
with:
crate: substrate/bin/node/runtime
features: std,runtime-benchmarks,try-runtime
ignore: sc-executor
default-std: true
4 changes: 2 additions & 2 deletions substrate/frame/support/procedural/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ frame-support-procedural-tools = { path = "tools" }
macro_magic = { version = "0.5.0", features = ["proc_support"] }
proc-macro-warning = { version = "1.0.0", default-features = false }
expander = "2.0.0"
sp-core-hashing = { path = "../../../primitives/core/hashing" }
sp-core-hashing = { path = "../../../primitives/core/hashing", default-features = false }

[dev-dependencies]
regex = "1"

[features]
default = ["std"]
std = []
std = ["sp-core-hashing/std"]
no-metadata-docs = []
# Generate impl-trait for tuples with the given number of tuples. Will be needed as the number of
# pallets in a runtime grows. Does increase the compile time!
Expand Down
2 changes: 1 addition & 1 deletion substrate/primitives/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false }
sp-api-proc-macro = { path = "proc-macro" }
sp-api-proc-macro = { path = "proc-macro", default-features = false }
sp-core = { path = "../core", default-features = false }
sp-std = { path = "../std", default-features = false }
sp-runtime = { path = "../runtime", default-features = false }
Expand Down

0 comments on commit 05cfb02

Please sign in to comment.