Skip to content

Commit

Permalink
Add ci check for parity-publish and fix current check issues (parityt…
Browse files Browse the repository at this point in the history
…ech#1887)

Co-authored-by: Sergejs Kostjucenko <85877331+sergejparity@users.noreply.github.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
  • Loading branch information
3 people authored Oct 31, 2023
1 parent a175f84 commit d56129e
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 23 deletions.
3 changes: 2 additions & 1 deletion substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ repository.workspace = true
authors.workspace = true
edition.workspace = true
version = "1.0.0"
publish = false

# The dependencies are only needed for docs.
[dependencies]
simple-mermaid = { git = "https://github.com/kianenigma/simple-mermaid.git", rev = "e48b187bcfd5cc75111acd9d241f1bd36604344b" }

subkey = { path = "bin/utils/subkey" }
chain-spec-builder = { path = "bin/utils/chain-spec-builder" }
chain-spec-builder = { package = "staging-chain-spec-builder", path = "bin/utils/chain-spec-builder" }

sc-service = { path = "client/service" }
sc-cli = { path = "client/cli" }
Expand Down
8 changes: 4 additions & 4 deletions substrate/bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "node-cli"
name = "staging-node-cli"
version = "3.0.0-dev"
authors.workspace = true
description = "Generic Substrate node implementation in Rust."
Expand Down Expand Up @@ -101,12 +101,12 @@ pallet-im-online = { path = "../../../frame/im-online", default-features = false
kitchensink-runtime = { path = "../runtime" }
node-rpc = { path = "../rpc" }
node-primitives = { path = "../primitives" }
node-executor = { path = "../executor" }
node-executor = { package = "staging-node-executor", path = "../executor" }

# CLI-specific dependencies
sc-cli = { path = "../../../client/cli", optional = true}
frame-benchmarking-cli = { path = "../../../utils/frame/benchmarking-cli", optional = true}
node-inspect = { path = "../inspect", optional = true}
node-inspect = { package = "staging-node-inspect", path = "../inspect", optional = true}
try-runtime-cli = { path = "../../../utils/frame/try-runtime/cli", optional = true}
serde_json = "1.0.107"

Expand Down Expand Up @@ -139,7 +139,7 @@ substrate-cli-test-utils = { path = "../../../test-utils/cli" }
[build-dependencies]
clap = { version = "4.4.6", optional = true }
clap_complete = { version = "4.0.2", optional = true }
node-inspect = { path = "../inspect", optional = true}
node-inspect = { package = "staging-node-inspect", path = "../inspect", optional = true}
frame-benchmarking-cli = { path = "../../../utils/frame/benchmarking-cli", optional = true}
substrate-build-script-utils = { path = "../../../utils/build-script-utils", optional = true}
substrate-frame-cli = { path = "../../../utils/frame/frame-utilities-cli", optional = true}
Expand Down
1 change: 1 addition & 0 deletions substrate/bin/node/cli/benches/block_production.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ use sp_runtime::{
transaction_validity::{InvalidTransaction, TransactionValidityError},
AccountId32, MultiAddress, OpaqueExtrinsic,
};
use staging_node_cli as node_cli;
use tokio::runtime::Handle;

fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
Expand Down
1 change: 1 addition & 0 deletions substrate/bin/node/cli/benches/transaction_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use sc_transaction_pool_api::{TransactionPool as _, TransactionSource, Transacti
use sp_core::{crypto::Pair, sr25519};
use sp_keyring::Sr25519Keyring;
use sp_runtime::OpaqueExtrinsic;
use staging_node_cli as node_cli;
use tokio::runtime::Handle;

fn new_node(tokio_handle: Handle) -> node_cli::service::NewFullBase {
Expand Down
2 changes: 2 additions & 0 deletions substrate/bin/node/cli/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#![warn(missing_docs)]

use staging_node_cli as node_cli;

fn main() -> sc_cli::Result<()> {
node_cli::run()
}
2 changes: 1 addition & 1 deletion substrate/bin/node/executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "node-executor"
name = "staging-node-executor"
version = "3.0.0-dev"
authors.workspace = true
description = "Substrate node implementation in Rust."
Expand Down
1 change: 1 addition & 0 deletions substrate/bin/node/executor/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use sp_core::{
};
use sp_runtime::traits::BlakeTwo256;
use sp_state_machine::TestExternalities as CoreTestExternalities;
use staging_node_executor as node_executor;

criterion_group!(benches, bench_execute_block);
criterion_main!(benches);
Expand Down
1 change: 1 addition & 0 deletions substrate/bin/node/executor/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use node_executor::ExecutorDispatch;
use node_primitives::{BlockNumber, Hash};
use node_testing::keyring::*;
use sp_externalities::Externalities;
use staging_node_executor as node_executor;

pub const TEST_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"test");

Expand Down
3 changes: 1 addition & 2 deletions substrate/bin/node/inspect/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[package]
name = "node-inspect"
name = "staging-node-inspect"
version = "0.9.0-dev"
authors.workspace = true
description = "Substrate node block inspection tool."
edition.workspace = true
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.io"
repository.workspace = true
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion substrate/bin/node/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ futures = "0.3.21"
log = "0.4.17"
tempfile = "3.1.0"
frame-system = { path = "../../../frame/system" }
node-executor = { path = "../executor" }
node-executor = { package = "staging-node-executor", path = "../executor" }
node-primitives = { path = "../primitives" }
kitchensink-runtime = { path = "../runtime" }
pallet-asset-conversion = { path = "../../../frame/asset-conversion" }
Expand Down
5 changes: 2 additions & 3 deletions substrate/bin/utils/chain-spec-builder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[package]
name = "chain-spec-builder"
name = "staging-chain-spec-builder"
version = "2.0.0"
authors.workspace = true
edition.workspace = true
build = "build.rs"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "https://substrate.io"
repository.workspace = true
readme = "README.md"
publish = false

[package.metadata.docs.rs]
Expand All @@ -24,7 +23,7 @@ crate-type = ["rlib"]
ansi_term = "0.12.1"
clap = { version = "4.4.6", features = ["derive"] }
rand = "0.8"
node-cli = { path = "../../node/cli" }
node-cli = { package = "staging-node-cli", path = "../../node/cli" }
sc-chain-spec = { path = "../../../client/chain-spec" }
sc-keystore = { path = "../../../client/keystore" }
sp-core = { path = "../../../primitives/core" }
Expand Down
1 change: 1 addition & 0 deletions substrate/bin/utils/chain-spec-builder/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use clap::Parser;
use node_cli::chain_spec;
use rand::{distributions::Alphanumeric, rngs::OsRng, Rng};
use sp_core::{crypto::Ss58Codec, sr25519};
use staging_chain_spec_builder as chain_spec_builder;
use std::fs;

fn main() -> Result<(), String> {
Expand Down
1 change: 0 additions & 1 deletion substrate/frame/asset-rate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ homepage = "https://substrate.io"
edition.workspace = true
license = "Apache-2.0"
repository.workspace = true
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
1 change: 0 additions & 1 deletion substrate/frame/examples/frame-crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ license = "MIT-0"
homepage = "https://substrate.io"
repository.workspace = true
description = "FRAME example pallet with umbrella crate"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ pub(crate) fn weight_witness_warning(
if dev_mode {
return
}
let CallWeightDef::Immediate(w) = &method.weight else {
return
};
let CallWeightDef::Immediate(w) = &method.weight else { return };

let partial_warning = Warning::new_deprecated("UncheckedWeightWitness")
.old("not check weight witness data")
Expand Down Expand Up @@ -66,9 +64,7 @@ pub(crate) fn weight_constant_warning(
if dev_mode {
return
}
let syn::Expr::Lit(lit) = weight else {
return
};
let syn::Expr::Lit(lit) = weight else { return };

let warning = Warning::new_deprecated("ConstantWeight")
.index(warnings.len())
Expand Down
2 changes: 1 addition & 1 deletion substrate/scripts/ci/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exceptions = [
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "chain-spec-builder" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "mmr-gadget" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "node-bench" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "node-cli" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "staging-node-cli" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "node-inspect" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "node-template-release" },
{ allow = ["GPL-3.0 WITH Classpath-exception-2.0"], name = "node-testing" },
Expand Down
2 changes: 1 addition & 1 deletion substrate/test-utils/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ nix = "0.26.2"
regex = "1.7.3"
tokio = { version = "1.22.0", features = ["full"] }
node-primitives = { path = "../../bin/node/primitives" }
node-cli = { path = "../../bin/node/cli" }
node-cli = { package = "staging-node-cli", path = "../../bin/node/cli" }
sc-cli = { path = "../../client/cli" }
sc-service = { path = "../../client/service" }
futures = "0.3.28"
Expand Down
2 changes: 1 addition & 1 deletion substrate/test-utils/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub fn build_substrate(args: &[&str]) {
// Get the root workspace directory from the CARGO_MANIFEST_DIR environment variable
let mut cmd = Command::new("cargo");

cmd.arg("build").arg("-p=node-cli");
cmd.arg("build").arg("-p=staging-node-cli");

if is_release_build {
cmd.arg("--release");
Expand Down

0 comments on commit d56129e

Please sign in to comment.