Skip to content

Commit

Permalink
run zepter
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Sep 3, 2024
1 parent 09dcbe8 commit f314fd8
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,19 @@ frame-try-runtime = { workspace = true, optional = true }
default = []
runtime-benchmarks = [
"encointer-node-notee-runtime/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-asset-tx-payment/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
# in the near future. Todo: implement try runtime for encointer-pallets
try-runtime = [
"encointer-node-notee-runtime/try-runtime",
"frame-system/try-runtime",
"frame-try-runtime/try-runtime",
"pallet-asset-tx-payment/try-runtime",
"sp-runtime/try-runtime",
]
18 changes: 18 additions & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ std = [
"encointer-balances-tx-payment/std",
"encointer-primitives/serde_derive",
"encointer-primitives/std",
"frame-benchmarking?/std",
"frame-executive/std",
"frame-metadata-hash-extension/std",
"frame-support/std",
"frame-system-benchmarking?/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"frame-try-runtime/std",
Expand All @@ -106,11 +108,13 @@ std = [
"pallet-grandpa/std",
"pallet-insecure-randomness-collective-flip/std",
"pallet-proxy/std",
"pallet-scheduler/std",
"pallet-sudo/std",
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
"pallet-treasury/std",
"pallet-utility/std",
"parity-scale-codec/std",
"scale-info/std",
"serde",
Expand All @@ -123,17 +127,22 @@ std = [
"sp-offchain/std",
"sp-runtime/std",
"sp-session/std",
"sp-staking/std",
"sp-std/std",
"sp-storage/std",
"sp-transaction-pool/std",
"sp-version/std",
"substrate-wasm-builder",
]
runtime-benchmarks = [
"encointer-balances-tx-payment/runtime-benchmarks",
"encointer-primitives/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
"pallet-asset-tx-payment/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-encointer-balances/runtime-benchmarks",
"pallet-encointer-bazaar/runtime-benchmarks",
Expand All @@ -144,11 +153,19 @@ runtime-benchmarks = [
"pallet-encointer-reputation-commitments/runtime-benchmarks",
"pallet-encointer-scheduler/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
]

try-runtime = [
"encointer-balances-tx-payment/try-runtime",
"encointer-primitives/try-runtime",
"frame-executive/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
Expand All @@ -173,4 +190,5 @@ try-runtime = [
"pallet-transaction-payment/try-runtime",
"pallet-treasury/try-runtime",
"pallet-utility/try-runtime",
"sp-runtime/try-runtime",
]
44 changes: 44 additions & 0 deletions zepter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version:
format: 1
# Minimum version of the binary that is expected to work. This is just for printing a nice error
# message when someone tries to use an older version.
binary: 0.13.2

# The examples in this file assume crate `A` to have a dependency on crate `B`.
workflows:
check:
- [
'lint',
# Check that `A` activates the features of `B`.
'propagate-feature',
# These are the features to check:
'--features=try-runtime,runtime-benchmarks,std',
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
'--left-side-feature-missing=ignore',
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
'--left-side-outside-workspace=ignore',
# Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used.
'--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking',
# Auxillary flags:
'--offline',
'--locked',
'--show-path',
'--quiet',
]
# The umbrella crate uses more features, so we to check those too:
check_umbrella:
- [ $check.0, '--features=serde,experimental,with-tracing,tuples-96,with-tracing', '-p=polkadot-sdk' ]
# Same as `check_*`, but with the `--fix` flag.
default:
- [ $check.0, '--fix' ]
- [ $check_umbrella.0, '--fix' ]

# Will be displayed when any workflow fails:
help:
text: |
Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration.
It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`.
Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you.
links:
- "https://github.com/paritytech/polkadot-sdk/issues/1831"
- "https://github.com/ggwpez/zepter"

0 comments on commit f314fd8

Please sign in to comment.