|
| 1 | +version: |
| 2 | + format: 1 |
| 3 | + # Minimum version of the binary that is expected to work. This is just for printing a nice error |
| 4 | + # message when someone tries to use an older version. |
| 5 | + binary: 0.13.2 |
| 6 | + |
| 7 | +# The examples in this file assume crate `A` to have a dependency on crate `B`. |
| 8 | +workflows: |
| 9 | + check: |
| 10 | + - [ |
| 11 | + 'lint', |
| 12 | + # Check that `A` activates the features of `B`. |
| 13 | + 'propagate-feature', |
| 14 | + # These are the features to check: |
| 15 | + '--features=try-runtime,runtime-benchmarks,std', |
| 16 | + # 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. |
| 17 | + '--left-side-feature-missing=ignore', |
| 18 | + # Enabling this feature somehow pulls in two versions of `sp-runtime-interface` and makes it impossible to build that crate with `cargo b -p sp-runtime-interface`. We therefore disable it for now. |
| 19 | + '--ignore-missing-propagate=sp-core/std:bandersnatch_vrfs/std', |
| 20 | + # Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on. |
| 21 | + '--left-side-outside-workspace=ignore', |
| 22 | + # Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used. |
| 23 | + '--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking', |
| 24 | + # Actually modify the files and not just report the issues: |
| 25 | + '--offline', |
| 26 | + '--locked', |
| 27 | + '--show-path', |
| 28 | + '--quiet', |
| 29 | + ] |
| 30 | + # Format the features into canonical format: |
| 31 | + - ['format', 'features', '--offline', '--locked', '--quiet'] |
| 32 | + # Same as `check`, but with the `--fix` flag. |
| 33 | + default: |
| 34 | + - [ $check.0, '--fix' ] |
| 35 | + - [ $check.1, '--fix' ] |
| 36 | + |
| 37 | +# Will be displayed when any workflow fails: |
| 38 | +help: |
| 39 | + text: | |
| 40 | + Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration. |
| 41 | + It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`. |
| 42 | + Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you. |
| 43 | + links: |
| 44 | + - "https://github.com/paritytech/polkadot-sdk/issues/1831" |
| 45 | + - "https://github.com/ggwpez/zepter" |
0 commit comments