diff --git a/.github/workflows/check-runtime-migration.yml b/.github/workflows/check-runtime-migration.yml index b8962f0e07ad..b93a07bf61f1 100644 --- a/.github/workflows/check-runtime-migration.yml +++ b/.github/workflows/check-runtime-migration.yml @@ -8,7 +8,7 @@ on: types: [opened, synchronize, reopened, ready_for_review] # Take a snapshot at 5am when most SDK devs are not working. schedule: - - cron: '0 5 * * *' + - cron: "0 5 * * *" merge_group: workflow_dispatch: @@ -24,14 +24,25 @@ jobs: runs-on: ubuntu-latest outputs: IMAGE: ${{ steps.set_image.outputs.IMAGE }} + RUNNER: ${{ steps.set_runner.outputs.RUNNER }} steps: - name: Checkout uses: actions/checkout@v4 - id: set_image run: cat .github/env >> $GITHUB_OUTPUT - # rococo and westend are disabled for now (no access to parity-chains.parity.io) + # By default we use spot machines that can be terminated at any time. + # Merge queues use persistent runners to avoid kicking off from queue when the runner is terminated. + - id: set_runner + run: | + # Run merge queues on persistent runners + if [[ $GITHUB_REF_NAME == *"gh-readonly-queue"* ]]; then + echo "RUNNER=arc-runners-polkadot-sdk-beefy-persistent" >> $GITHUB_OUTPUT + else + echo "RUNNER=arc-runners-polkadot-sdk-beefy" >> $GITHUB_OUTPUT + fi + # More info can be found here: https://github.com/paritytech/polkadot/pull/5865 check-runtime-migration: - runs-on: arc-runners-polkadot-sdk-beefy + runs-on: ${{ needs.set-image.outputs.RUNNER }} # We need to set this to rather long to allow the snapshot to be created, but the average time # should be much lower. timeout-minutes: 60 @@ -41,9 +52,10 @@ jobs: strategy: fail-fast: false matrix: - network: [ - # westend, - # rococo, + network: + [ + westend, + rococo, asset-hub-westend, asset-hub-rococo, bridge-hub-westend, @@ -53,18 +65,18 @@ jobs: coretime-rococo, ] include: - # - network: westend - # package: westend-runtime - # wasm: westend_runtime.compact.compressed.wasm - # uri: "wss://try-runtime-westend.polkadot.io:443" - # subcommand_extra_args: "--no-weight-warnings" - # command_extra_args: "" - # - network: rococo - # package: rococo-runtime - # wasm: rococo_runtime.compact.compressed.wasm - # uri: "wss://try-runtime-rococo.polkadot.io:443" - # subcommand_extra_args: "--no-weight-warnings" - # command_extra_args: "" + - network: westend + package: westend-runtime + wasm: westend_runtime.compact.compressed.wasm + uri: "wss://try-runtime-westend.polkadot.io:443" + subcommand_extra_args: "--no-weight-warnings" + command_extra_args: "" + - network: rococo + package: rococo-runtime + wasm: rococo_runtime.compact.compressed.wasm + uri: "wss://try-runtime-rococo.polkadot.io:443" + subcommand_extra_args: "--no-weight-warnings" + command_extra_args: "" - network: asset-hub-westend package: asset-hub-westend-runtime wasm: asset_hub_westend_runtime.compact.compressed.wasm @@ -143,3 +155,12 @@ jobs: --runtime ./target/release/wbuild/${{ matrix.package }}/${{ matrix.wasm }} \ on-runtime-upgrade --disable-spec-version-check --checks=all ${{ matrix.subcommand_extra_args }} snap -p snapshot.raw sleep 5 + # name of this job must be unique across all workflows + # otherwise GitHub will mark all these jobs as required + confirm-required-checks-passed: + runs-on: ubuntu-latest + name: All runtime migrations passed + # If any new job gets added, be sure to add it to this array + needs: [check-runtime-migration] + steps: + - run: echo '### Good job! All the checks passed 🚀' >> $GITHUB_STEP_SUMMARY diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c51d0ce5627e..56d426218c80 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -374,13 +374,3 @@ cancel-pipeline-build-short-benchmark: extends: .cancel-pipeline-template needs: - job: build-short-benchmark - -cancel-pipeline-check-runtime-migration-rococo: - extends: .cancel-pipeline-template - needs: - - job: check-runtime-migration-rococo - -cancel-pipeline-check-runtime-migration-westend: - extends: .cancel-pipeline-template - needs: - - job: check-runtime-migration-westend diff --git a/.gitlab/pipeline/check.yml b/.gitlab/pipeline/check.yml index 64bef8d6e005..2212c1aeb0a8 100644 --- a/.gitlab/pipeline/check.yml +++ b/.gitlab/pipeline/check.yml @@ -46,52 +46,3 @@ check-toml-format: script: - taplo format --check --config .config/taplo.toml - echo "Please run `taplo format --config .config/taplo.toml` to fix any toml formatting issues" - -# 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 "---------- Downloading try-runtime CLI ----------" - - curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime - - chmod +x ./try-runtime - - echo "Using try-runtime-cli version:" - - ./try-runtime --version - - echo "---------- Building ${PACKAGE} runtime ----------" - - time cargo build --release --locked -p "$PACKAGE" --features try-runtime - - echo "---------- Executing on-runtime-upgrade for ${NETWORK} ----------" - - > - time ./try-runtime ${COMMAND_EXTRA_ARGS} \ - --runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \ - on-runtime-upgrade --disable-spec-version-check --checks=all ${SUBCOMMAND_EXTRA_ARGS} live --uri ${URI} - - sleep 5 - -# 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://try-runtime-westend.polkadot.io:443" - SUBCOMMAND_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://try-runtime-rococo.polkadot.io:443" - SUBCOMMAND_EXTRA_ARGS: "--no-weight-warnings"