Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 722f3fe

Browse files
authored
Merge branch 'master' into impl-public
2 parents 1ecde51 + 6d00431 commit 722f3fe

File tree

395 files changed

+15653
-7501
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+15653
-7501
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tab_width=4
66
end_of_line=lf
77
charset=utf-8
88
trim_trailing_whitespace=true
9-
max_line_length=120
9+
max_line_length=100
1010
insert_final_newline=true
1111

1212
[*.yml]

.gitlab-ci.yml

+70-10
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ variables:
5151
- /^[0-9]+$/ # PRs
5252
retry:
5353
max: 2
54-
when:
54+
when:
5555
- runner_system_failure
5656
- unknown_failure
5757
- api_failure
@@ -133,7 +133,7 @@ test-linux-stable: &test-linux
133133
variables:
134134
- $DEPLOY_TAG
135135
script:
136-
- time cargo test --all --release --verbose --locked |
136+
- WASM_BUILD_NO_COLOR=1 time cargo test --all --release --verbose --locked |
137137
tee output.log
138138
- sccache -s
139139
after_script:
@@ -159,13 +159,24 @@ test-srml-staking: &test-srml-staking
159159
- $DEPLOY_TAG
160160
script:
161161
- cd srml/staking/
162-
- time cargo test --release --verbose --no-default-features --features std
162+
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --no-default-features --features std
163163
- sccache -s
164164

165-
166-
167-
168-
165+
test-wasmtime: &test-wasmtime
166+
stage: test
167+
<<: *docker-env
168+
variables:
169+
# Enable debug assertions since we are running optimized builds for testing
170+
# but still want to have debug assertions.
171+
RUSTFLAGS: -Cdebug-assertions=y
172+
RUST_BACKTRACE: 1
173+
except:
174+
variables:
175+
- $DEPLOY_TAG
176+
script:
177+
- cd core/executor
178+
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features wasmtime
179+
- sccache -s
169180

170181
test-linux-stable-int:
171182
<<: *test-linux
@@ -177,7 +188,7 @@ test-linux-stable-int:
177188
script:
178189
- echo "___Logs will be partly shown at the end in case of failure.___"
179190
- echo "___Full log will be saved to the job artifacts only in case of failure.___"
180-
- RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace
191+
- WASM_BUILD_NO_COLOR=1 RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace
181192
time cargo test -p node-cli --release --verbose --locked -- --ignored --test-threads=1
182193
&> ${CI_COMMIT_SHORT_SHA}_int_failure.log
183194
- sccache -s
@@ -219,6 +230,26 @@ node-exits:
219230
script:
220231
- ./ci/check_for_exit.sh
221232

233+
234+
test-full-crypto-feature: &test-full-crypto-feature
235+
stage: test
236+
<<: *docker-env
237+
variables:
238+
# Enable debug assertions since we are running optimized builds for testing
239+
# but still want to have debug assertions.
240+
RUSTFLAGS: -Cdebug-assertions=y
241+
RUST_BACKTRACE: 1
242+
except:
243+
variables:
244+
- $DEPLOY_TAG
245+
script:
246+
- cd core/primitives/
247+
- time cargo +nightly build --verbose --no-default-features --features full_crypto
248+
- cd ../application-crypto
249+
- time cargo +nightly build --verbose --no-default-features --features full_crypto
250+
- sccache -s
251+
252+
222253
#### stage: build
223254

224255
build-linux-substrate:
@@ -230,7 +261,7 @@ build-linux-substrate:
230261
variables:
231262
- $DEPLOY_TAG
232263
script:
233-
- time cargo build --release --verbose
264+
- WASM_BUILD_NO_COLOR=1 time cargo build --release --verbose
234265
- mkdir -p ./artifacts/substrate/
235266
- mv ./target/release/substrate ./artifacts/substrate/.
236267
- echo -n "Substrate version = "
@@ -258,7 +289,7 @@ build-linux-subkey:
258289
script:
259290
- cd ./subkey
260291
- BUILD_DUMMY_WASM_BINARY=1 time cargo build --release --verbose
261-
- cd ..
292+
- cd -
262293
- sccache -s
263294
- mkdir -p ./artifacts/subkey
264295
- mv ./target/release/subkey ./artifacts/subkey/.
@@ -307,6 +338,35 @@ check_warnings:
307338
fi
308339
allow_failure: true
309340

341+
# Check whether Polkadot 'master' branch builds using this Substrate commit.
342+
check_polkadot:
343+
stage: build
344+
<<: *docker-env
345+
allow_failure: true
346+
dependencies:
347+
- test-linux-stable
348+
script:
349+
- COMMIT_HASH=$(git rev-parse HEAD)
350+
- SUBSTRATE_PATH=$(pwd)
351+
# Clone the current Polkadot master branch into ./polkadot.
352+
- git clone --depth 1 https://gitlab.parity.io/parity/polkadot.git
353+
- cd polkadot
354+
# Within Polkadot 'master' alter each Cargo.toml that references the
355+
# Substrate 'polkadot-master' branch:
356+
# 1. Replace the 'branch = "polkadot-master"' statements with the rev of our
357+
# commit.
358+
# 2. Replace 'git = "https://.*"' with 'git = "file://.*"' (the local
359+
# checked out Substrate repository one folder above).
360+
# 3. Remove any trailing commas.
361+
- git grep -l "polkadot-master" | grep toml | xargs sed -i "s/branch.*=.*\"polkadot-master\"/rev = \"$COMMIT_HASH\"/; s~https://github.com/paritytech/substrate~file://$SUBSTRATE_PATH~; s/,\s*}/ }/"
362+
# Make sure 'Cargo.lock' matches 'Cargo.toml'. It's enough to update one
363+
# package, others are updated along the way.
364+
- cargo update -p sr-io
365+
# Check whether Polkadot 'master' branch builds with this Substrate commit.
366+
- time cargo check
367+
- cd -
368+
- sccache -s
369+
310370
#### stage: publish
311371

312372
.publish-docker-release: &publish-docker-release

0 commit comments

Comments
 (0)