From 0516a7e3441933dc98281aebefbb9ca599de3a3f Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 6 Jun 2019 12:11:07 +0200 Subject: [PATCH 1/5] Require --locked when building runtime --- core/executor/wasm/build.sh | 2 +- core/test-runtime/wasm/build.sh | 2 +- node-template/runtime/wasm/build.sh | 2 +- node/runtime/wasm/build.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/executor/wasm/build.sh b/core/executor/wasm/build.sh index c23ac076e210a..c888398d35eba 100755 --- a/core/executor/wasm/build.sh +++ b/core/executor/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release --locked for i in test do wasm-gc target/wasm32-unknown-unknown/release/runtime_$i.wasm target/wasm32-unknown-unknown/release/runtime_$i.compact.wasm diff --git a/core/test-runtime/wasm/build.sh b/core/test-runtime/wasm/build.sh index 635532babf3e8..d1b866f8b75dd 100755 --- a/core/test-runtime/wasm/build.sh +++ b/core/test-runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release --locked for i in substrate_test_runtime do wasm-gc "target/wasm32-unknown-unknown/release/$i.wasm" "target/wasm32-unknown-unknown/release/$i.compact.wasm" diff --git a/node-template/runtime/wasm/build.sh b/node-template/runtime/wasm/build.sh index f5761cbb1e770..a852c65f1a625 100755 --- a/node-template/runtime/wasm/build.sh +++ b/node-template/runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release --locked for i in node_template_runtime_wasm do wasm-gc target/wasm32-unknown-unknown/release/$i.wasm target/wasm32-unknown-unknown/release/$i.compact.wasm diff --git a/node/runtime/wasm/build.sh b/node/runtime/wasm/build.sh index f0b7c961bda7b..59add4ec4d788 100755 --- a/node/runtime/wasm/build.sh +++ b/node/runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release --locked for i in node_runtime do wasm-gc target/wasm32-unknown-unknown/release/$i.wasm target/wasm32-unknown-unknown/release/$i.compact.wasm From 2ebf893e7222fb9913d3baba145fe92fa3a77e22 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 6 Jun 2019 12:20:20 +0200 Subject: [PATCH 2/5] Update locks --- core/test-runtime/wasm/Cargo.lock | 14 +++++++------- node-template/runtime/wasm/Cargo.lock | 12 ++++++------ node/runtime/wasm/Cargo.lock | 12 ++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index 8763845ab7824..ebf96f3fa635b 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -2474,7 +2474,7 @@ dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 2.0.0", "sr-primitives 2.0.0", "sr-std 2.0.0", @@ -2531,7 +2531,7 @@ dependencies = [ "libp2p 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", "sr-version 2.0.0", @@ -2547,7 +2547,7 @@ dependencies = [ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "substrate-client 2.0.0", "substrate-consensus-common 2.0.0", @@ -2566,7 +2566,7 @@ dependencies = [ "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 2.0.0", "sr-version 2.0.0", "substrate-panic-handler 2.0.0", @@ -2583,7 +2583,7 @@ name = "substrate-inherents" version = "2.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", ] @@ -2659,7 +2659,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 2.0.0", "substrate-primitives 2.0.0", "substrate-trie 2.0.0", @@ -2673,7 +2673,7 @@ version = "2.0.0" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/node-template/runtime/wasm/Cargo.lock b/node-template/runtime/wasm/Cargo.lock index 2dc001522c892..ec014da1b98cd 100644 --- a/node-template/runtime/wasm/Cargo.lock +++ b/node-template/runtime/wasm/Cargo.lock @@ -2627,7 +2627,7 @@ dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 2.0.0", "sr-primitives 2.0.0", "sr-std 2.0.0", @@ -2674,7 +2674,7 @@ dependencies = [ "libp2p 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", "sr-version 2.0.0", @@ -2693,7 +2693,7 @@ dependencies = [ "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 2.0.0", "sr-version 2.0.0", "substrate-panic-handler 2.0.0", @@ -2710,7 +2710,7 @@ name = "substrate-inherents" version = "2.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", ] @@ -2786,7 +2786,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 2.0.0", "substrate-primitives 2.0.0", "substrate-trie 2.0.0", @@ -2800,7 +2800,7 @@ version = "2.0.0" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/node/runtime/wasm/Cargo.lock b/node/runtime/wasm/Cargo.lock index 8ec68521c27a1..d72146ad03e01 100644 --- a/node/runtime/wasm/Cargo.lock +++ b/node/runtime/wasm/Cargo.lock @@ -2762,7 +2762,7 @@ dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 2.0.0", "sr-primitives 2.0.0", "sr-std 2.0.0", @@ -2809,7 +2809,7 @@ dependencies = [ "libp2p 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", "sr-version 2.0.0", @@ -2828,7 +2828,7 @@ dependencies = [ "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 2.0.0", "sr-version 2.0.0", "substrate-panic-handler 2.0.0", @@ -2856,7 +2856,7 @@ name = "substrate-inherents" version = "2.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", ] @@ -2932,7 +2932,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 2.0.0", "substrate-primitives 2.0.0", "substrate-trie 2.0.0", @@ -2946,7 +2946,7 @@ version = "2.0.0" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", From 7c683d73fc69279a906c59d422040b8b6f498ccc Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 6 Jun 2019 12:28:43 +0200 Subject: [PATCH 3/5] Do it in a different way --- .gitlab-ci.yml | 8 ++++---- core/executor/wasm/build.sh | 2 +- core/test-runtime/wasm/Cargo.lock | 14 +++++++------- core/test-runtime/wasm/build.sh | 2 +- node-template/runtime/wasm/build.sh | 2 +- node/runtime/wasm/build.sh | 2 +- scripts/build.sh | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b82a3f139240d..c0b088de22576 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,7 +92,7 @@ test-linux-stable: &test variables: - $DEPLOY_TAG script: - - ./scripts/build.sh + - CARGO_BUILD_EXTRA_OPTIONS=--locked ./scripts/build.sh - time cargo test --all --release --verbose --locked - sccache -s @@ -117,7 +117,7 @@ test-linux-stable-int: &test - $DEPLOY_TAG before_script: - sccache -s - - ./scripts/build.sh + - CARGO_BUILD_EXTRA_OPTIONS=--locked ./scripts/build.sh script: - time RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace cargo test -p node-cli --release --verbose --locked -- --ignored --test-threads=1 - sccache -s @@ -172,7 +172,7 @@ build-linux-release: tags: - linux-docker script: - - ./scripts/build.sh + - CARGO_BUILD_EXTRA_OPTIONS=--locked ./scripts/build.sh - time cargo build --release --verbose - mkdir -p ./artifacts - mv ./target/release/substrate ./artifacts/. @@ -204,7 +204,7 @@ build-rust-doc-release: tags: - linux-docker script: - - ./scripts/build.sh + - CARGO_BUILD_EXTRA_OPTIONS=--locked ./scripts/build.sh - rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds - time cargo +nightly doc --release --all --verbose - cp -R ./target/doc ./crate-docs diff --git a/core/executor/wasm/build.sh b/core/executor/wasm/build.sh index c888398d35eba..2188fecda19d3 100755 --- a/core/executor/wasm/build.sh +++ b/core/executor/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release --locked +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS for i in test do wasm-gc target/wasm32-unknown-unknown/release/runtime_$i.wasm target/wasm32-unknown-unknown/release/runtime_$i.compact.wasm diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index ebf96f3fa635b..8763845ab7824 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -2474,7 +2474,7 @@ dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 2.0.0", "sr-primitives 2.0.0", "sr-std 2.0.0", @@ -2531,7 +2531,7 @@ dependencies = [ "libp2p 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", "sr-version 2.0.0", @@ -2547,7 +2547,7 @@ dependencies = [ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "substrate-client 2.0.0", "substrate-consensus-common 2.0.0", @@ -2566,7 +2566,7 @@ dependencies = [ "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 2.0.0", "sr-version 2.0.0", "substrate-panic-handler 2.0.0", @@ -2583,7 +2583,7 @@ name = "substrate-inherents" version = "2.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", ] @@ -2659,7 +2659,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 2.0.0", "substrate-primitives 2.0.0", "substrate-trie 2.0.0", @@ -2673,7 +2673,7 @@ version = "2.0.0" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/core/test-runtime/wasm/build.sh b/core/test-runtime/wasm/build.sh index d1b866f8b75dd..6a2c594a3c058 100755 --- a/core/test-runtime/wasm/build.sh +++ b/core/test-runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release --locked +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS for i in substrate_test_runtime do wasm-gc "target/wasm32-unknown-unknown/release/$i.wasm" "target/wasm32-unknown-unknown/release/$i.compact.wasm" diff --git a/node-template/runtime/wasm/build.sh b/node-template/runtime/wasm/build.sh index a852c65f1a625..587fb1b6e1b5a 100755 --- a/node-template/runtime/wasm/build.sh +++ b/node-template/runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release --locked +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS for i in node_template_runtime_wasm do wasm-gc target/wasm32-unknown-unknown/release/$i.wasm target/wasm32-unknown-unknown/release/$i.compact.wasm diff --git a/node/runtime/wasm/build.sh b/node/runtime/wasm/build.sh index 59add4ec4d788..11044e9cb2446 100755 --- a/node/runtime/wasm/build.sh +++ b/node/runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release --locked +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS for i in node_runtime do wasm-gc target/wasm32-unknown-unknown/release/$i.wasm target/wasm32-unknown-unknown/release/$i.compact.wasm diff --git a/scripts/build.sh b/scripts/build.sh index 46bc74b7a94f6..ff9d115c0c849 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -19,7 +19,7 @@ do echo "*** Building wasm binaries in $SRC" cd "$PROJECT_ROOT/$SRC" - ./build.sh + ./build.sh $CARGO_BUILD_EXTRA_OPTIONS cd - >> /dev/null done From 04faee1e7c44e999c8997996494315621ed2f8a5 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 6 Jun 2019 13:39:57 +0200 Subject: [PATCH 4/5] Accidentally reverted Cargo.lock --- core/test-runtime/wasm/Cargo.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/test-runtime/wasm/Cargo.lock b/core/test-runtime/wasm/Cargo.lock index 8763845ab7824..ebf96f3fa635b 100644 --- a/core/test-runtime/wasm/Cargo.lock +++ b/core/test-runtime/wasm/Cargo.lock @@ -2474,7 +2474,7 @@ dependencies = [ "kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-api-macros 2.0.0", "sr-primitives 2.0.0", "sr-std 2.0.0", @@ -2531,7 +2531,7 @@ dependencies = [ "libp2p 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", "sr-version 2.0.0", @@ -2547,7 +2547,7 @@ dependencies = [ "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "substrate-client 2.0.0", "substrate-consensus-common 2.0.0", @@ -2566,7 +2566,7 @@ dependencies = [ "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 2.0.0", "sr-version 2.0.0", "substrate-panic-handler 2.0.0", @@ -2583,7 +2583,7 @@ name = "substrate-inherents" version = "2.0.0" dependencies = [ "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 2.0.0", "sr-std 2.0.0", ] @@ -2659,7 +2659,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-panic-handler 2.0.0", "substrate-primitives 2.0.0", "substrate-trie 2.0.0", @@ -2673,7 +2673,7 @@ version = "2.0.0" dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", From a28635fb67c8997114ecb747b6461043e0b5c730 Mon Sep 17 00:00:00 2001 From: gabriel Date: Thu, 6 Jun 2019 13:55:36 +0200 Subject: [PATCH 5/5] pass on arguments in build.sh scripts --- .gitlab-ci.yml | 8 ++++---- core/executor/wasm/build.sh | 2 +- core/test-runtime/wasm/build.sh | 2 +- node-template/runtime/wasm/build.sh | 2 +- node/runtime/wasm/build.sh | 2 +- scripts/build.sh | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0b088de22576..ffe0de9cd5b54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,7 +92,7 @@ test-linux-stable: &test variables: - $DEPLOY_TAG script: - - CARGO_BUILD_EXTRA_OPTIONS=--locked ./scripts/build.sh + - ./scripts/build.sh --locked - time cargo test --all --release --verbose --locked - sccache -s @@ -117,7 +117,7 @@ test-linux-stable-int: &test - $DEPLOY_TAG before_script: - sccache -s - - CARGO_BUILD_EXTRA_OPTIONS=--locked ./scripts/build.sh + - ./scripts/build.sh --locked script: - time RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace cargo test -p node-cli --release --verbose --locked -- --ignored --test-threads=1 - sccache -s @@ -172,7 +172,7 @@ build-linux-release: tags: - linux-docker script: - - CARGO_BUILD_EXTRA_OPTIONS=--locked ./scripts/build.sh + - ./scripts/build.sh --locked - time cargo build --release --verbose - mkdir -p ./artifacts - mv ./target/release/substrate ./artifacts/. @@ -204,7 +204,7 @@ build-rust-doc-release: tags: - linux-docker script: - - CARGO_BUILD_EXTRA_OPTIONS=--locked ./scripts/build.sh + - ./scripts/build.sh --locked - rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds - time cargo +nightly doc --release --all --verbose - cp -R ./target/doc ./crate-docs diff --git a/core/executor/wasm/build.sh b/core/executor/wasm/build.sh index 2188fecda19d3..fe2faeec6204c 100755 --- a/core/executor/wasm/build.sh +++ b/core/executor/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $@ for i in test do wasm-gc target/wasm32-unknown-unknown/release/runtime_$i.wasm target/wasm32-unknown-unknown/release/runtime_$i.compact.wasm diff --git a/core/test-runtime/wasm/build.sh b/core/test-runtime/wasm/build.sh index 6a2c594a3c058..0529a974ffe71 100755 --- a/core/test-runtime/wasm/build.sh +++ b/core/test-runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $@ for i in substrate_test_runtime do wasm-gc "target/wasm32-unknown-unknown/release/$i.wasm" "target/wasm32-unknown-unknown/release/$i.compact.wasm" diff --git a/node-template/runtime/wasm/build.sh b/node-template/runtime/wasm/build.sh index 587fb1b6e1b5a..566e5de35d8c8 100755 --- a/node-template/runtime/wasm/build.sh +++ b/node-template/runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $@ for i in node_template_runtime_wasm do wasm-gc target/wasm32-unknown-unknown/release/$i.wasm target/wasm32-unknown-unknown/release/$i.compact.wasm diff --git a/node/runtime/wasm/build.sh b/node/runtime/wasm/build.sh index 11044e9cb2446..9a9f412bfcf16 100755 --- a/node/runtime/wasm/build.sh +++ b/node/runtime/wasm/build.sh @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then else CARGO_CMD="cargo +nightly" fi -CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS +CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $@ for i in node_runtime do wasm-gc target/wasm32-unknown-unknown/release/$i.wasm target/wasm32-unknown-unknown/release/$i.compact.wasm diff --git a/scripts/build.sh b/scripts/build.sh index ff9d115c0c849..8b3557159b5ce 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -19,7 +19,7 @@ do echo "*** Building wasm binaries in $SRC" cd "$PROJECT_ROOT/$SRC" - ./build.sh $CARGO_BUILD_EXTRA_OPTIONS + ./build.sh $@ cd - >> /dev/null done