Skip to content

Commit

Permalink
Merge branch 'paritytech:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
balqaasem authored Apr 21, 2022
2 parents b59ef63 + 6091c6b commit 2bcaa53
Show file tree
Hide file tree
Showing 245 changed files with 3,980 additions and 1,558 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-custom-review.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check reviews
name: Assign reviewers

on:
pull_request:
Expand Down
50 changes: 20 additions & 30 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ variables: &default-vars
CI_IMAGE: "paritytech/ci-linux:production"

default:
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
- api_failure
interruptible: true
cache: {}

.collect-artifacts: &collect-artifacts
Expand All @@ -60,13 +67,6 @@ default:
- artifacts/

.kubernetes-env: &kubernetes-env
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
- api_failure
interruptible: true
tags:
- kubernetes-parity-build

Expand All @@ -81,13 +81,6 @@ default:
image: "${CI_IMAGE}"
before_script:
- *rust-info-script
retry:
max: 2
when:
- runner_system_failure
- unknown_failure
- api_failure
interruptible: true
tags:
- linux-docker

Expand Down Expand Up @@ -170,21 +163,6 @@ default:
| tee ./artifacts/benches/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA/::trie::read::small.json'
- sccache -s

.build-linux-substrate-script: &build-linux-substrate-script
- WASM_BUILD_NO_COLOR=1 time cargo build --release --verbose
- mv ./target/release/substrate ./artifacts/substrate/.
- echo -n "Substrate version = "
- if [ "${CI_COMMIT_TAG}" ]; then
echo "${CI_COMMIT_TAG}" | tee ./artifacts/substrate/VERSION;
else
./artifacts/substrate/substrate --version |
sed -n -E 's/^substrate ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p' |
tee ./artifacts/substrate/VERSION;
fi
- sha256sum ./artifacts/substrate/substrate | tee ./artifacts/substrate/substrate.sha256
- cp -r ./scripts/ci/docker/substrate.Dockerfile ./artifacts/substrate/
- sccache -s


#### stage: .pre

Expand Down Expand Up @@ -381,6 +359,8 @@ test-linux-stable: &test-linux
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
RUST_BACKTRACE: 1
WASM_BUILD_NO_COLOR: 1
# Ensure we run the UI tests.
RUN_UI_TESTS: 1
script:
# this job runs all tests in former runtime-benchmarks, frame-staking and wasmtime tests
- time cargo test --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path ./bin/node/cli/Cargo.toml
Expand Down Expand Up @@ -523,7 +503,17 @@ build-linux-substrate:
before_script:
- mkdir -p ./artifacts/substrate/
script:
- *build-linux-substrate-script
- WASM_BUILD_NO_COLOR=1 time cargo build --release --verbose
- mv ./target/release/substrate ./artifacts/substrate/.
- echo -n "Substrate version = "
- if [ "${CI_COMMIT_TAG}" ]; then
echo "${CI_COMMIT_TAG}" | tee ./artifacts/substrate/VERSION;
else
./artifacts/substrate/substrate --version |
cut -d ' ' -f 2 | tee ./artifacts/substrate/VERSION;
fi
- sha256sum ./artifacts/substrate/substrate | tee ./artifacts/substrate/substrate.sha256
- cp -r ./scripts/ci/docker/substrate.Dockerfile ./artifacts/substrate/
- printf '\n# building node-template\n\n'
- ./scripts/ci/node-template-release.sh ./artifacts/substrate/substrate-node-template.tar.gz

Expand Down
42 changes: 42 additions & 0 deletions .maintain/update-rust-stable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
#
# Script for updating the UI tests for a new rust stable version.
#
# It needs to be called like this:
#
# update-rust-stable.sh 1.61
#
# This will run all UI tests with the rust stable 1.61. The script
# requires that rustup is installed.
set -e

if [ "$#" -ne 1 ]; then
echo "Please specify the rust version to use. E.g. update-rust-stable.sh 1.61"
exit
fi

RUST_VERSION=$1

if ! command -v rustup &> /dev/null
then
echo "rustup needs to be installed"
exit
fi

rustup install $RUST_VERSION
rustup component add rust-src --toolchain $RUST_VERSION

# Ensure we run the ui tests
export RUN_UI_TESTS=1
# We don't need any wasm files for ui tests
export SKIP_WASM_BUILD=1
# Let trybuild overwrite the .stderr files
export TRYBUILD=overwrite

# Run all the relevant UI tests
#
# Any new UI tests in different crates need to be added here as well.
rustup run $RUST_VERSION cargo test -p sp-runtime-interface ui
rustup run $RUST_VERSION cargo test -p sp-api-test ui
rustup run $RUST_VERSION cargo test -p frame-election-provider-solution-type ui
rustup run $RUST_VERSION cargo test -p frame-support-test ui
Loading

0 comments on commit 2bcaa53

Please sign in to comment.