mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 17:08:00 +00:00
db3fd68726
Makes SPs first class citizens along with the relay chains in the context of our CI runtime upgrade checks. ## Code changes - Sets missing current storage version in `uniques` pallet - Adds multisig V1 migration to run where it was missing - Removes executed migration whos pre/post hooks were failing from collectives runtime - Initializes storage versions for SP pallets added after genesis - Originally I was going to wait for https://github.com/paritytech/polkadot-sdk/pull/1297 to be merged so this wouldn't need to be done manually, but it doesn't seem like it'll be merged any time soon so I've decided to set them manually to unblock this ## CI changes - Removed dependency of `westend` runtime upgrades being complete prior to other ones running. I assume it is supposed to cache the `try-runtime` build for a performance benefit, but it seems it wasn't working. Maybe someone from the CI team can look into this or explain why it needs to be there? - Adds check-runtime-migration jobs for Parity asset-hubs, bridge-hubs and contract chains - Updated VARIABLES to accomodate the `kusama-runtime` package being renamed to `staging-kusama-runtime` in https://github.com/paritytech/polkadot-sdk/pull/1241 - Added `EXTRA_ARGS` variable to `check-runtime-migration`, and set `--no-weight-warnings` to the relay chain runtime upgrade checks (relay chains don't have weight restrictions).
209 lines
6.8 KiB
YAML
209 lines
6.8 KiB
YAML
cargo-clippy:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
- .pipeline-stopper-artifacts
|
|
script:
|
|
- SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --all-targets --locked --workspace
|
|
|
|
check-try-runtime:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
script:
|
|
- time cargo check --locked --all --features try-runtime
|
|
# this is taken from cumulus
|
|
# Check that parachain-template will compile with `try-runtime` feature flag.
|
|
- time cargo check --locked -p parachain-template-node --features try-runtime
|
|
# add after https://github.com/paritytech/substrate/pull/14502 is merged
|
|
# experimental code may rely on try-runtime and vice-versa
|
|
- time cargo check --locked --all --features try-runtime,experimental
|
|
|
|
cargo-fmt-manifest:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .common-refs
|
|
script:
|
|
- cargo install zepter --locked --version 0.11.0 -q -f --no-default-features && zepter --version
|
|
- echo "👉 Hello developer! If you see this CI check failing then it means that one of the your changes in a Cargo.toml file introduced ill-formatted or unsorted features. Please take a look at 'docs/STYLE_GUIDE.md#manifest-formatting' to find out more."
|
|
- zepter format features --check
|
|
allow_failure: true # Experimental
|
|
|
|
# FIXME
|
|
.cargo-deny-licenses:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .test-pr-refs
|
|
variables:
|
|
CARGO_DENY_CMD: "cargo deny --all-features check licenses -c ./substrate/scripts/ci/deny.toml"
|
|
script:
|
|
- $CARGO_DENY_CMD --hide-inclusion-graph
|
|
after_script:
|
|
- echo "___The complete log is in the artifacts___"
|
|
- $CARGO_DENY_CMD 2> deny.log
|
|
- if [ $CI_JOB_STATUS != 'success' ]; then
|
|
echo 'Please check license of your crate or add an exception to scripts/ci/deny.toml';
|
|
fi
|
|
allow_failure: true
|
|
artifacts:
|
|
name: $CI_COMMIT_SHORT_SHA
|
|
expire_in: 3 days
|
|
when: always
|
|
paths:
|
|
- deny.log
|
|
|
|
# from substrate
|
|
# not sure if it's needed in monorepo
|
|
check-dependency-rules:
|
|
stage: check
|
|
extends:
|
|
- .kubernetes-env
|
|
- .test-refs-no-trigger-prs-only
|
|
variables:
|
|
CI_IMAGE: "paritytech/tools:latest"
|
|
allow_failure: true
|
|
script:
|
|
- cd substrate/
|
|
- ../.gitlab/ensure-deps.sh
|
|
|
|
test-rust-features:
|
|
stage: check
|
|
extends:
|
|
- .kubernetes-env
|
|
- .test-refs-no-trigger-prs-only
|
|
script:
|
|
- git clone
|
|
--depth=1
|
|
--branch="master"
|
|
https://github.com/paritytech/pipeline-scripts
|
|
- bash ./pipeline-scripts/rust-features.sh .
|
|
|
|
job-starter:
|
|
stage: check
|
|
image: paritytech/tools:latest
|
|
extends:
|
|
- .kubernetes-env
|
|
- .common-refs
|
|
allow_failure: true
|
|
script:
|
|
- echo ok
|
|
|
|
test-rust-feature-propagation:
|
|
stage: check
|
|
extends:
|
|
- .kubernetes-env
|
|
- .test-pr-refs
|
|
script:
|
|
- cargo install --locked --version 0.11.1 -q -f zepter && zepter --version
|
|
- echo "👉 Hello developer! If you see this CI check failing then it means that one of the crates is missing a feature for one of its dependencies. The output below tells you which feature needs to be added for which dependency to which crate. You can do this by modifying the Cargo.toml file. For more context see the MR where this check was introduced https://github.com/paritytech/substrate/pull/14660"
|
|
- zepter lint propagate-feature --feature try-runtime --left-side-feature-missing=ignore --workspace --feature-enables-dep="try-runtime:frame-try-runtime" --locked
|
|
- zepter lint propagate-feature --feature runtime-benchmarks --left-side-feature-missing=ignore --workspace --feature-enables-dep="runtime-benchmarks:frame-benchmarking" --locked
|
|
- zepter lint propagate-feature --feature std --left-side-feature-missing=ignore --workspace --locked
|
|
|
|
# More info can be found here: https://github.com/paritytech/polkadot/pull/5865
|
|
.check-runtime-migration:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .test-pr-refs
|
|
script:
|
|
- |
|
|
export RUST_LOG=remote-ext=debug,runtime=debug
|
|
echo "---------- Installing try-runtime-cli ----------"
|
|
time cargo install --locked --git https://github.com/paritytech/try-runtime-cli --tag v0.3.0
|
|
echo "---------- Building ${PACKAGE} runtime ----------"
|
|
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
|
|
echo "---------- Executing `on-runtime-upgrade` for ${NETWORK} ----------"
|
|
time try-runtime \
|
|
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
|
|
on-runtime-upgrade --checks=pre-and-post ${EXTRA_ARGS} live --uri ${URI}
|
|
|
|
# Check runtime migrations for Parity managed relay chains
|
|
check-runtime-migration-westend:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .test-pr-refs
|
|
- .check-runtime-migration
|
|
variables:
|
|
NETWORK: "westend"
|
|
PACKAGE: "westend-runtime"
|
|
WASM: "westend_runtime.compact.compressed.wasm"
|
|
URI: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
|
|
EXTRA_ARGS: "--no-weight-warnings"
|
|
|
|
check-runtime-migration-rococo:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .test-pr-refs
|
|
- .check-runtime-migration
|
|
variables:
|
|
NETWORK: "rococo"
|
|
PACKAGE: "rococo-runtime"
|
|
WASM: "rococo_runtime.compact.compressed.wasm"
|
|
URI: "wss://rococo-try-runtime-node.parity-chains.parity.io:443"
|
|
EXTRA_ARGS: "--no-weight-warnings"
|
|
|
|
# Check runtime migrations for Parity managed asset hub chains
|
|
check-runtime-migration-asset-hub-westend:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .test-pr-refs
|
|
- .check-runtime-migration
|
|
variables:
|
|
NETWORK: "asset-hub-westend"
|
|
PACKAGE: "asset-hub-westend-runtime"
|
|
WASM: "asset_hub_westend_runtime.compact.compressed.wasm"
|
|
URI: "wss://westend-asset-hub-rpc.polkadot.io:443"
|
|
|
|
check-runtime-migration-bridge-hub-rococo:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .test-pr-refs
|
|
- .check-runtime-migration
|
|
variables:
|
|
NETWORK: "bridge-hub-rococo"
|
|
PACKAGE: "bridge-hub-rococo-runtime"
|
|
WASM: "bridge_hub_rococo_runtime.compact.compressed.wasm"
|
|
URI: "wss://rococo-bridge-hub-rpc.polkadot.io:443"
|
|
|
|
# Check runtime migrations for Parity managed contract chains
|
|
check-runtime-migration-contracts-rococo:
|
|
stage: check
|
|
extends:
|
|
- .docker-env
|
|
- .test-pr-refs
|
|
- .check-runtime-migration
|
|
variables:
|
|
NETWORK: "contracts-rococo"
|
|
PACKAGE: "contracts-rococo-runtime"
|
|
WASM: "contracts_rococo_runtime.compact.compressed.wasm"
|
|
URI: "wss://rococo-contracts-rpc.polkadot.io:443"
|
|
|
|
find-fail-ci-phrase:
|
|
stage: check
|
|
variables:
|
|
CI_IMAGE: "paritytech/tools:latest"
|
|
ASSERT_REGEX: "FAIL-CI"
|
|
GIT_DEPTH: 1
|
|
extends:
|
|
- .kubernetes-env
|
|
- .test-pr-refs
|
|
script:
|
|
- set +e
|
|
- rg --line-number --hidden --type rust --glob '!{.git,target}' "$ASSERT_REGEX" .; exit_status=$?
|
|
- if [ $exit_status -eq 0 ]; then
|
|
echo "$ASSERT_REGEX was found, exiting with 1";
|
|
exit 1;
|
|
else
|
|
echo "No $ASSERT_REGEX was found, exiting with 0";
|
|
exit 0;
|
|
fi
|