Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: introducing fast-check feature #2205

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,11 @@ try-runtime = [
tee-dev = [
"rococo-parachain-runtime/tee-dev",
]

# bypasses wasm builds for cargo checks
# for IDE only, DO NOT ENABLE ON RELEASE
fast-check = [
"litentry-parachain-runtime/fast-check",
"litmus-parachain-runtime/fast-check",
"rococo-parachain-runtime/fast-check",
]
1 change: 1 addition & 0 deletions runtime/litentry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran

[features]
default = ["std"]
fast-check = []
fast-runtime = []
runtime-benchmarks = [
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
Expand Down
3 changes: 3 additions & 0 deletions runtime/litentry/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use substrate_wasm_builder::WasmBuilder;

fn main() {
if cfg!(feature = "fast-check") {
return
}
WasmBuilder::new()
.with_current_project()
.export_heap_base()
Expand Down
4 changes: 4 additions & 0 deletions runtime/litentry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin};

// Make the WASM binary available.
#[cfg(feature = "std")]
#[cfg(not(feature = "fast-check"))]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));

#[cfg(feature = "fast-check")]
pub const WASM_BINARY: Option<&[u8]> = None;

pub mod asset_config;
pub mod constants;
pub mod weights;
Expand Down
5 changes: 2 additions & 3 deletions runtime/litmus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran

[features]
default = ["std"]
fast-check = []
fast-runtime = []
runtime-benchmarks = [
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
Expand All @@ -122,9 +123,7 @@ runtime-benchmarks = [
"frame-system/runtime-benchmarks",
"pallet-asset-manager/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-bounties/runtime-benchmarks",
# This module returned an error when ran the benchmark, temporarily chose to comment it out
# "pallet-collator-selection/runtime-benchmarks",
"pallet-bounties/runtime-benchmarks", # This module returned an error when ran the benchmark, temporarily chose to comment it out # "pallet-collator-selection/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
Expand Down
3 changes: 3 additions & 0 deletions runtime/litmus/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use substrate_wasm_builder::WasmBuilder;

fn main() {
if cfg!(feature = "fast-check") {
return
}
WasmBuilder::new()
.with_current_project()
.export_heap_base()
Expand Down
4 changes: 4 additions & 0 deletions runtime/litmus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin};

// Make the WASM binary available.
#[cfg(feature = "std")]
#[cfg(not(feature = "fast-check"))]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));

#[cfg(feature = "fast-check")]
pub const WASM_BINARY: Option<&[u8]> = None;

pub mod asset_config;
pub mod constants;
pub mod migration;
Expand Down
1 change: 1 addition & 0 deletions runtime/rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", bran

[features]
default = ["std"]
fast-check = []
fast-runtime = []
runtime-benchmarks = [
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
Expand Down
3 changes: 3 additions & 0 deletions runtime/rococo/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use substrate_wasm_builder::WasmBuilder;

fn main() {
if cfg!(feature = "fast-check") {
return
}
WasmBuilder::new()
.with_current_project()
.export_heap_base()
Expand Down
4 changes: 4 additions & 0 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ use pallet_evm::{
};
// Make the WASM binary available.
#[cfg(feature = "std")]
#[cfg(not(feature = "fast-check"))]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));

#[cfg(feature = "fast-check")]
pub const WASM_BINARY: Option<&[u8]> = None;

pub mod asset_config;
pub mod constants;
#[cfg(test)]
Expand Down
Loading