mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 06:48:01 +00:00
CI check against Rust feature bleed (#12341)
* CI check for rust feature bleed Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cargo not available Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Handle missing programs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Check for deps Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add doc Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use correct CI image Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove --offline Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Install cargo-workspaces Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove cargo-workspaces dep Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix try-runtime feature Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix more features... Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use pipeline-script Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * 🤡 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make stupid change to test the CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * This reverts commit ad2746aa117fa7cb473521113a9bec89aaf26484. * Use correct branch Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Allow failure Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make stupid change to test the CI Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "Make stupid change to test the CI" This reverts commit 16ec00e1675c7ec57c988315549ff71e832a3093. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
0fe016eed7
commit
52744e4ddb
@@ -75,4 +75,4 @@ runtime-benchmarks = [
|
||||
]
|
||||
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
|
||||
# in the near future.
|
||||
try-runtime = ["node-template-runtime/try-runtime", "try-runtime-cli"]
|
||||
try-runtime = ["node-template-runtime/try-runtime", "try-runtime-cli/try-runtime"]
|
||||
|
||||
@@ -99,7 +99,7 @@ runtime-benchmarks = [
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame-try-runtime",
|
||||
"frame-try-runtime/try-runtime",
|
||||
"frame-executive/try-runtime",
|
||||
"frame-system/try-runtime",
|
||||
"frame-support/try-runtime",
|
||||
|
||||
@@ -165,7 +165,7 @@ runtime-benchmarks = [
|
||||
]
|
||||
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
|
||||
# in the near future.
|
||||
try-runtime = ["kitchensink-runtime/try-runtime", "try-runtime-cli"]
|
||||
try-runtime = ["kitchensink-runtime/try-runtime", "try-runtime-cli/try-runtime"]
|
||||
|
||||
[[bench]]
|
||||
name = "transaction_pool"
|
||||
|
||||
@@ -254,7 +254,7 @@ runtime-benchmarks = [
|
||||
"frame-system-benchmarking/runtime-benchmarks",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame-try-runtime",
|
||||
"frame-try-runtime/try-runtime",
|
||||
"frame-executive/try-runtime",
|
||||
"frame-system/try-runtime",
|
||||
"frame-support/try-runtime",
|
||||
|
||||
@@ -49,4 +49,4 @@ std = [
|
||||
"sp-std/std",
|
||||
"sp-tracing/std",
|
||||
]
|
||||
try-runtime = ["frame-support/try-runtime", "frame-try-runtime" ]
|
||||
try-runtime = ["frame-support/try-runtime", "frame-try-runtime/try-runtime" ]
|
||||
|
||||
@@ -19,7 +19,7 @@ use crate::pallet::Def;
|
||||
|
||||
///
|
||||
/// * implement the trait `sp_runtime::BuildModuleGenesisStorage`
|
||||
/// * add #[cfg(features = "std")] to GenesisBuild implementation.
|
||||
/// * add #[cfg(feature = "std")] to GenesisBuild implementation.
|
||||
pub fn expand_genesis_build(def: &mut Def) -> proc_macro2::TokenStream {
|
||||
let genesis_config = if let Some(genesis_config) = &def.genesis_config {
|
||||
genesis_config
|
||||
|
||||
@@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"]}
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, features = [ "try-runtime" ], path = "../support" }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
|
||||
sp-api = { version = "4.0.0-dev", default-features = false, path = "../../primitives/api" }
|
||||
sp-runtime = { version = "6.0.0", default-features = false, path = "../../primitives/runtime" }
|
||||
sp-std = { version = "4.0.0", default-features = false, path = "../../primitives/std" }
|
||||
@@ -28,3 +28,6 @@ std = [
|
||||
"sp-runtime/std",
|
||||
"sp-std/std",
|
||||
]
|
||||
try-runtime = [
|
||||
"frame-support/try-runtime",
|
||||
]
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
//! Supporting types for try-runtime, testing and dry-running commands.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg(feature = "try-runtime")]
|
||||
|
||||
pub use frame_support::traits::TryStateSelect;
|
||||
use frame_support::weights::Weight;
|
||||
|
||||
@@ -35,6 +35,19 @@ test-dependency-rules:
|
||||
script:
|
||||
- ./scripts/ci/gitlab/ensure-deps.sh
|
||||
|
||||
test-rust-features:
|
||||
stage: check
|
||||
extends:
|
||||
- .kubernetes-env
|
||||
- .test-refs-no-trigger-prs-only
|
||||
allow_failure: true
|
||||
script:
|
||||
- git clone
|
||||
--depth=1
|
||||
--branch="$PIPELINE_SCRIPTS_TAG"
|
||||
https://github.com/paritytech/pipeline-scripts
|
||||
- bash ./pipeline-scripts/rust-features.sh .
|
||||
|
||||
test-prometheus-alerting-rules:
|
||||
stage: check
|
||||
extends: .kubernetes-env
|
||||
@@ -51,4 +64,3 @@ test-prometheus-alerting-rules:
|
||||
- promtool check rules ./scripts/ci/monitoring/alerting-rules/alerting-rules.yaml
|
||||
- cat ./scripts/ci/monitoring/alerting-rules/alerting-rules.yaml |
|
||||
promtool test rules ./scripts/ci/monitoring/alerting-rules/alerting-rule-tests.yaml
|
||||
|
||||
|
||||
@@ -31,8 +31,13 @@ sp-runtime = { version = "6.0.0", path = "../../../../primitives/runtime" }
|
||||
sp-state-machine = { version = "0.12.0", path = "../../../../primitives/state-machine" }
|
||||
sp-version = { version = "5.0.0", path = "../../../../primitives/version" }
|
||||
sp-weights = { version = "4.0.0", path = "../../../../primitives/weights" }
|
||||
frame-try-runtime = { path = "../../../../frame/try-runtime" }
|
||||
frame-try-runtime = { optional = true, path = "../../../../frame/try-runtime" }
|
||||
substrate-rpc-client = { path = "../../rpc/client" }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = "1.17.0"
|
||||
|
||||
[features]
|
||||
try-runtime = [
|
||||
"frame-try-runtime/try-runtime",
|
||||
]
|
||||
|
||||
@@ -265,6 +265,8 @@
|
||||
//! -s snap \
|
||||
//! ```
|
||||
|
||||
#![cfg(feature = "try-runtime")]
|
||||
|
||||
use parity_scale_codec::Decode;
|
||||
use remote_externalities::{
|
||||
Builder, Mode, OfflineConfig, OnlineConfig, SnapshotConfig, TestExternalities,
|
||||
|
||||
Reference in New Issue
Block a user