From 1c491dde766b74b195a13f25bc129755b9b39e97 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 17 Oct 2023 15:33:35 +1100 Subject: [PATCH 01/25] use prebuilt try-runtime binary --- .gitlab/pipeline/check.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab/pipeline/check.yml b/.gitlab/pipeline/check.yml index 4f92e6c15d2b..7fb0565df0d4 100644 --- a/.gitlab/pipeline/check.yml +++ b/.gitlab/pipeline/check.yml @@ -113,10 +113,15 @@ test-rust-feature-propagation: 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 "---------- Downloading `try-runtime` CLI ----------" + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime.3-x86_64-unknown-linux-gnu -o try-runtime + chmod +x try-runtime + sudo mv try-runtime /usr/local/bin/ + 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" \ From 5001b0fd18e4d69c9df30712cdc97e96e8d8adeb Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 17 Oct 2023 15:42:03 +1100 Subject: [PATCH 02/25] try fix path --- .gitlab/pipeline/check.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab/pipeline/check.yml b/.gitlab/pipeline/check.yml index 7fb0565df0d4..2b745737eeef 100644 --- a/.gitlab/pipeline/check.yml +++ b/.gitlab/pipeline/check.yml @@ -116,14 +116,13 @@ test-rust-feature-propagation: echo "---------- Downloading `try-runtime` CLI ----------" curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime.3-x86_64-unknown-linux-gnu -o try-runtime - chmod +x try-runtime - sudo mv try-runtime /usr/local/bin/ + chmod +x ./try-runtime echo "---------- Building ${PACKAGE} runtime ----------" time cargo build --release --locked -p "$PACKAGE" --features try-runtime echo "---------- Executing `on-runtime-upgrade` for ${NETWORK} ----------" - time try-runtime \ + time ./try-runtime \ --runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \ on-runtime-upgrade --checks=pre-and-post ${EXTRA_ARGS} live --uri ${URI} From 49df553715567c7fa16bd4e7833bc3b17804bf9b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 17 Oct 2023 15:49:06 +1100 Subject: [PATCH 03/25] upgrade glibc --- .gitlab/pipeline/check.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab/pipeline/check.yml b/.gitlab/pipeline/check.yml index 2b745737eeef..0ade6cad67cf 100644 --- a/.gitlab/pipeline/check.yml +++ b/.gitlab/pipeline/check.yml @@ -114,7 +114,14 @@ test-rust-feature-propagation: - | export RUST_LOG=remote-ext=debug,runtime=debug - echo "---------- Downloading `try-runtime` CLI ----------" + echo "---------- Upgrading glibc (required for try-runtime binary) ----------" + # Add the repository containing glibc + add-apt-repository ppa:ubuntu-toolchain-r/test -y + apt-get update + # Upgrade glibc + apt-get install -y libc6 + + echo "---------- Downloading try-runtime CLI ----------" curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime.3-x86_64-unknown-linux-gnu -o try-runtime chmod +x ./try-runtime From 567e899e3c52d3b42dc7ce27aa5764db7d74f826 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 17 Oct 2023 15:52:00 +1100 Subject: [PATCH 04/25] remove glibc --- .gitlab/pipeline/check.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.gitlab/pipeline/check.yml b/.gitlab/pipeline/check.yml index 0ade6cad67cf..8266813848d5 100644 --- a/.gitlab/pipeline/check.yml +++ b/.gitlab/pipeline/check.yml @@ -114,13 +114,6 @@ test-rust-feature-propagation: - | export RUST_LOG=remote-ext=debug,runtime=debug - echo "---------- Upgrading glibc (required for try-runtime binary) ----------" - # Add the repository containing glibc - add-apt-repository ppa:ubuntu-toolchain-r/test -y - apt-get update - # Upgrade glibc - apt-get install -y libc6 - echo "---------- Downloading try-runtime CLI ----------" curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime.3-x86_64-unknown-linux-gnu -o try-runtime chmod +x ./try-runtime From 6b6f3d4e88dd2b0a351c4456331f921aa3036c8e Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 18 Oct 2023 11:10:56 +1100 Subject: [PATCH 05/25] use musl binary --- .gitlab/pipeline/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/pipeline/check.yml b/.gitlab/pipeline/check.yml index 8266813848d5..a205cd8c95d3 100644 --- a/.gitlab/pipeline/check.yml +++ b/.gitlab/pipeline/check.yml @@ -115,7 +115,7 @@ test-rust-feature-propagation: 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.3.3/try-runtime.3-x86_64-unknown-linux-gnu -o try-runtime + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime chmod +x ./try-runtime echo "---------- Building ${PACKAGE} runtime ----------" From 623e796c439681cc2fd64a99e2024fc9567e21b6 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 18 Oct 2023 11:29:30 +1100 Subject: [PATCH 06/25] wip try state workflow --- .github/workflows/try-state.yml | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/try-state.yml diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml new file mode 100644 index 000000000000..185ccd9a7b39 --- /dev/null +++ b/.github/workflows/try-state.yml @@ -0,0 +1,58 @@ +# Runs `try-state` on all live runtimes in `polkadot-sdk` +# TODO: Post to a Matrix channel if any fails. + +name: Check try-state +on: + push: + branches: + - liam-try-state-scheduled-checks + schedule: + - cron: "0 * * * *" + +jobs: + check_try_state: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: "3.6.1" + + - name: Add wasm32-unknown-unknown target + run: rustup target add wasm32-unknown-unknown + + - name: Download and set up try-runtime binary + run: | + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime + chmod +x try-runtime + + # TODO: Build all runtimes + + - name: Build Runtimes + run: | + cargo build -r -p westend-runtime --features try-runtime + + - name: Check Westend + run: | + ./try-runtime \ + --runtime ./target/release/wbuild/westend-runtime/westend_runtime.compact.wasm \ + execute-block \ + live --uri wss://westend-rpc.polkadot.io + continue-on-error: true + id: westend_run + + # TODO: Check all runtimes + + # TODO: Post to Matrix if any fails + # - name: Notify Matrix on Failure + # if: steps.westend_run.outcome == 'failure' From 29a446155c223bf16b06fb2722cb4c30b51aa95c Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 18 Oct 2023 12:01:26 +1100 Subject: [PATCH 07/25] check all chains --- .github/workflows/try-state.yml | 50 ++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 185ccd9a7b39..3f59fca282ad 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -40,19 +40,61 @@ jobs: - name: Build Runtimes run: | - cargo build -r -p westend-runtime --features try-runtime + cargo build --features try-runtime \ + -p westend-runtime \ + -p rococo-runtime \ + -p asset-hub-westend-runtime \ + -p bridge-hub-rococo-runtime \ + -p contracts-rococo-runtime - name: Check Westend run: | ./try-runtime \ - --runtime ./target/release/wbuild/westend-runtime/westend_runtime.compact.wasm \ - execute-block \ - live --uri wss://westend-rpc.polkadot.io + --runtime ./target/debug/wbuild/westend-runtime/westend_runtime.wasm \ + execute-block \ + live --uri wss://westend-try-runtime-node.parity-chains.parity.io:443 continue-on-error: true id: westend_run + - name: Check Rococo + run: | + ./try-runtime \ + --runtime ./target/debug/wbuild/rococo-runtime/rococo_runtime.wasm \ + execute-block \ + live --uri wss://rococo-try-runtime-node.parity-chains.parity.io:443 + continue-on-error: true + id: rococo_run + + - name: Check Asset Hub Westend + run: | + ./try-runtime \ + --runtime ./target/debug/wbuild/asset-hub-westend/asset_hub_westend_runtime.wasm \ + execute-block \ + live --uri wss://westend-asset-hub-rpc.polkadot.io:443 + continue-on-error: true + id: asset_hub_westend_run + + - name: Check Bridge Hub Rococo + run: | + ./try-runtime \ + --runtime ./target/debug/wbuild/bridge-hub-rococo/bridge_hub_rococo_runtime.wasm \ + execute-block \ + live --uri wss://rococo-bridge-hub-rpc.polkadot.io:443 + continue-on-error: true + id: brdige_hub_rococo_run + + - name: Check Contracts Rococo + run: | + ./try-runtime \ + --runtime ./target/debug/wbuild/contracts-rococo/contracts_rococo_runtime.wasm \ + execute-block \ + live --uri wss://rococo-contracts-rpc.polkadot.io:443 + continue-on-error: true + id: contracts_rococo_run + # TODO: Check all runtimes # TODO: Post to Matrix if any fails # - name: Notify Matrix on Failure # if: steps.westend_run.outcome == 'failure' + # ... From e06bfc20a2add4dd17d99a08fa96657adeaf2dd6 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 18 Oct 2023 13:51:00 +1100 Subject: [PATCH 08/25] try release build --- .github/workflows/try-state.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 3f59fca282ad..ea63fcc38404 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -40,7 +40,7 @@ jobs: - name: Build Runtimes run: | - cargo build --features try-runtime \ + cargo build --release --features try-runtime \ -p westend-runtime \ -p rococo-runtime \ -p asset-hub-westend-runtime \ @@ -50,7 +50,7 @@ jobs: - name: Check Westend run: | ./try-runtime \ - --runtime ./target/debug/wbuild/westend-runtime/westend_runtime.wasm \ + --runtime ./target/release/wbuild/westend-runtime/westend_runtime.compact.wasm \ execute-block \ live --uri wss://westend-try-runtime-node.parity-chains.parity.io:443 continue-on-error: true @@ -59,7 +59,7 @@ jobs: - name: Check Rococo run: | ./try-runtime \ - --runtime ./target/debug/wbuild/rococo-runtime/rococo_runtime.wasm \ + --runtime ./target/release/wbuild/rococo-runtime/rococo_runtime.compact.wasm \ execute-block \ live --uri wss://rococo-try-runtime-node.parity-chains.parity.io:443 continue-on-error: true @@ -68,7 +68,7 @@ jobs: - name: Check Asset Hub Westend run: | ./try-runtime \ - --runtime ./target/debug/wbuild/asset-hub-westend/asset_hub_westend_runtime.wasm \ + --runtime ./target/release/wbuild/asset-hub-westend/asset_hub_westend_runtime.compact.wasm \ execute-block \ live --uri wss://westend-asset-hub-rpc.polkadot.io:443 continue-on-error: true @@ -77,7 +77,7 @@ jobs: - name: Check Bridge Hub Rococo run: | ./try-runtime \ - --runtime ./target/debug/wbuild/bridge-hub-rococo/bridge_hub_rococo_runtime.wasm \ + --runtime ./target/release/wbuild/bridge-hub-rococo/bridge_hub_rococo_runtime.compact.wasm \ execute-block \ live --uri wss://rococo-bridge-hub-rpc.polkadot.io:443 continue-on-error: true @@ -86,7 +86,7 @@ jobs: - name: Check Contracts Rococo run: | ./try-runtime \ - --runtime ./target/debug/wbuild/contracts-rococo/contracts_rococo_runtime.wasm \ + --runtime ./target/release/wbuild/contracts-rococo/contracts_rococo_runtime.compact.wasm \ execute-block \ live --uri wss://rococo-contracts-rpc.polkadot.io:443 continue-on-error: true From e1deb86aa84ec5645872ddf488b992807865d197 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 19 Oct 2023 13:27:43 +1100 Subject: [PATCH 09/25] fix typos --- .github/workflows/try-state.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index ea63fcc38404..ea8e855761ad 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -68,7 +68,7 @@ jobs: - name: Check Asset Hub Westend run: | ./try-runtime \ - --runtime ./target/release/wbuild/asset-hub-westend/asset_hub_westend_runtime.compact.wasm \ + --runtime ./target/release/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.compact.wasm \ execute-block \ live --uri wss://westend-asset-hub-rpc.polkadot.io:443 continue-on-error: true @@ -77,7 +77,7 @@ jobs: - name: Check Bridge Hub Rococo run: | ./try-runtime \ - --runtime ./target/release/wbuild/bridge-hub-rococo/bridge_hub_rococo_runtime.compact.wasm \ + --runtime ./target/release/wbuild/bridge-hub-rococo-runtime/bridge_hub_rococo_runtime.compact.wasm \ execute-block \ live --uri wss://rococo-bridge-hub-rpc.polkadot.io:443 continue-on-error: true From 3bfc961b5b575b80286393a6fa333a396f794947 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 23 Oct 2023 13:28:41 +1100 Subject: [PATCH 10/25] wip use runtime artefact --- .../workflows/build-and-store-runtimes.yml | 58 +++++++++++++++++++ .github/workflows/try-state.yml | 24 +++++--- 2 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build-and-store-runtimes.yml diff --git a/.github/workflows/build-and-store-runtimes.yml b/.github/workflows/build-and-store-runtimes.yml new file mode 100644 index 000000000000..1902e42d71f6 --- /dev/null +++ b/.github/workflows/build-and-store-runtimes.yml @@ -0,0 +1,58 @@ +name: Build Runtimes and Store Artifacts + +on: + push: + branches: + # - master + - liam-try-state-scheduled-checks + +jobs: + build_and_store: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Free space on the runner + run: | + df -h + sudo apt -y autoremove --purge + sudo apt -y autoclean + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + df -h + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + version: "3.6.1" + + - name: Add wasm32-unknown-unknown target + run: rustup target add wasm32-unknown-unknown + + - name: Build Runtimes with try-runtime + run: | + cargo build --release --features try-runtime \ + -p westend-runtime \ + -p rococo-runtime \ + -p asset-hub-westend-runtime \ + -p bridge-hub-rococo-runtime \ + -p contracts-rococo-runtime + + - name: Archive runtime binaries + uses: actions/upload-artifact@v2 + with: + name: runtimes-try-runtime + path: ./target/release/wbuild/**/*.compact.compressed.wasm + + # If in the future we want runtimes without try-runtime, we can build them here and store + # them as well. diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index ea8e855761ad..ac6254b7e10c 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -36,16 +36,22 @@ jobs: curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime chmod +x try-runtime - # TODO: Build all runtimes + - name: Download runtime artifacts + uses: actions/download-artifact@v2 + with: + name: runtimes-try-runtime - - name: Build Runtimes - run: | - cargo build --release --features try-runtime \ - -p westend-runtime \ - -p rococo-runtime \ - -p asset-hub-westend-runtime \ - -p bridge-hub-rococo-runtime \ - -p contracts-rococo-runtime + - name: Display structure of downloaded files + run: ls -R + + # - name: Build Runtimes + # run: | + # cargo build --release --features try-runtime \ + # -p westend-runtime \ + # -p rococo-runtime \ + # -p asset-hub-westend-runtime \ + # -p bridge-hub-rococo-runtime \ + # -p contracts-rococo-runtime - name: Check Westend run: | From bbbc5cf671aab151a0048cd4aa4995fd68ff9e8b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 23 Oct 2023 13:30:18 +1100 Subject: [PATCH 11/25] wip only build westend --- .github/workflows/build-and-store-runtimes.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-store-runtimes.yml b/.github/workflows/build-and-store-runtimes.yml index 1902e42d71f6..51c44f20446e 100644 --- a/.github/workflows/build-and-store-runtimes.yml +++ b/.github/workflows/build-and-store-runtimes.yml @@ -42,11 +42,7 @@ jobs: - name: Build Runtimes with try-runtime run: | cargo build --release --features try-runtime \ - -p westend-runtime \ - -p rococo-runtime \ - -p asset-hub-westend-runtime \ - -p bridge-hub-rococo-runtime \ - -p contracts-rococo-runtime + -p westend-runtime - name: Archive runtime binaries uses: actions/upload-artifact@v2 @@ -56,3 +52,10 @@ jobs: # If in the future we want runtimes without try-runtime, we can build them here and store # them as well. + + # cargo build --release --features try-runtime \ + # -p westend-runtime \ + # -p rococo-runtime \ + # -p asset-hub-westend-runtime \ + # -p bridge-hub-rococo-runtime \ + # -p contracts-rococo-runtime \ No newline at end of file From b4028da22b7464ea8e9a2b1dcc29ef457ad4d349 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 20:04:10 +1100 Subject: [PATCH 12/25] use pre-built runtime artefacts --- .../workflows/build-and-store-runtimes.yml | 61 ----------- .github/workflows/try-state.yml | 101 ++++-------------- 2 files changed, 22 insertions(+), 140 deletions(-) delete mode 100644 .github/workflows/build-and-store-runtimes.yml diff --git a/.github/workflows/build-and-store-runtimes.yml b/.github/workflows/build-and-store-runtimes.yml deleted file mode 100644 index 51c44f20446e..000000000000 --- a/.github/workflows/build-and-store-runtimes.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Build Runtimes and Store Artifacts - -on: - push: - branches: - # - master - - liam-try-state-scheduled-checks - -jobs: - build_and_store: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Free space on the runner - run: | - df -h - sudo apt -y autoremove --purge - sudo apt -y autoclean - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - df -h - - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Install Protoc - uses: arduino/setup-protoc@v1 - with: - version: "3.6.1" - - - name: Add wasm32-unknown-unknown target - run: rustup target add wasm32-unknown-unknown - - - name: Build Runtimes with try-runtime - run: | - cargo build --release --features try-runtime \ - -p westend-runtime - - - name: Archive runtime binaries - uses: actions/upload-artifact@v2 - with: - name: runtimes-try-runtime - path: ./target/release/wbuild/**/*.compact.compressed.wasm - - # If in the future we want runtimes without try-runtime, we can build them here and store - # them as well. - - # cargo build --release --features try-runtime \ - # -p westend-runtime \ - # -p rococo-runtime \ - # -p asset-hub-westend-runtime \ - # -p bridge-hub-rococo-runtime \ - # -p contracts-rococo-runtime \ No newline at end of file diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index ac6254b7e10c..5c13341a83c1 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -1,5 +1,4 @@ # Runs `try-state` on all live runtimes in `polkadot-sdk` -# TODO: Post to a Matrix channel if any fails. name: Check try-state on: @@ -7,100 +6,44 @@ on: branches: - liam-try-state-scheduled-checks schedule: - - cron: "0 * * * *" + # run once per day at midnight + - cron: "0 0 * * *" + +env: + # TODO: Replace this with paritytech/polkadot-sdk 'latest' release URL once 1.3.0 is published + # with all runtime blobs. + RUNTIME_BASE_URL: https://github.com/liamaharon/polkadot-sdk/releases/download/polkadot-v1.2.0-with-runtime-builds-fixed.3 jobs: check_try_state: + strategy: + matrix: + runtime: + - { file_name: DEV_DEBUG_BUILD__westend_runtime.compact.compressed.wasm, rpc: wss://westend-try-runtime-node.parity-chains.parity.io:443 } + - { file_name: DEV_DEBUG_BUILD__rococo_runtime.compact.compressed.wasm, rpc: wss://rococo-try-runtime-node.parity-chains.parity.io:443 } + - { file_name: DEV_DEBUG_BUILD__asset_hub_westend_runtime.compact.compressed.wasm, rpc: wss://westend-asset-hub-rpc.polkadot.io:443 } + - { file_name: DEV_DEBUG_BUILD__bridge_hub_rococo_runtime.compact.compressed.wasm, rpc: wss://rococo-brdige-hub-rpc.polkadot.io:443 } + - { file_name: DEV_DEBUG_BUILD__contracts_rococo_runtime.compact.compressed.wasm, rpc: wss://rococo-contracts-rpc.polkadot.io:443 } runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: Install Protoc - uses: arduino/setup-protoc@v1 - with: - version: "3.6.1" - - - name: Add wasm32-unknown-unknown target - run: rustup target add wasm32-unknown-unknown - - name: Download and set up try-runtime binary run: | - curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime chmod +x try-runtime - - name: Download runtime artifacts - uses: actions/download-artifact@v2 - with: - name: runtimes-try-runtime - - - name: Display structure of downloaded files - run: ls -R - - # - name: Build Runtimes - # run: | - # cargo build --release --features try-runtime \ - # -p westend-runtime \ - # -p rococo-runtime \ - # -p asset-hub-westend-runtime \ - # -p bridge-hub-rococo-runtime \ - # -p contracts-rococo-runtime - - - name: Check Westend - run: | - ./try-runtime \ - --runtime ./target/release/wbuild/westend-runtime/westend_runtime.compact.wasm \ - execute-block \ - live --uri wss://westend-try-runtime-node.parity-chains.parity.io:443 - continue-on-error: true - id: westend_run - - - name: Check Rococo - run: | - ./try-runtime \ - --runtime ./target/release/wbuild/rococo-runtime/rococo_runtime.compact.wasm \ - execute-block \ - live --uri wss://rococo-try-runtime-node.parity-chains.parity.io:443 - continue-on-error: true - id: rococo_run - - - name: Check Asset Hub Westend - run: | - ./try-runtime \ - --runtime ./target/release/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.compact.wasm \ - execute-block \ - live --uri wss://westend-asset-hub-rpc.polkadot.io:443 - continue-on-error: true - id: asset_hub_westend_run - - - name: Check Bridge Hub Rococo - run: | - ./try-runtime \ - --runtime ./target/release/wbuild/bridge-hub-rococo-runtime/bridge_hub_rococo_runtime.compact.wasm \ - execute-block \ - live --uri wss://rococo-bridge-hub-rpc.polkadot.io:443 - continue-on-error: true - id: brdige_hub_rococo_run + - name: Download runtime blob + run: | + curl -sL ${{ env.RUNTIME_BASE_URL }}/${{ matrix.runtime.file_name }} - - name: Check Contracts Rococo + - name: Check state run: | ./try-runtime \ - --runtime ./target/release/wbuild/contracts-rococo/contracts_rococo_runtime.compact.wasm \ + --runtime ./${{ matrix.runtime.file_name }} \ execute-block \ - live --uri wss://rococo-contracts-rpc.polkadot.io:443 + live --uri ${{ matrix.runtime.rpc }} continue-on-error: true - id: contracts_rococo_run - - # TODO: Check all runtimes # TODO: Post to Matrix if any fails - # - name: Notify Matrix on Failure - # if: steps.westend_run.outcome == 'failure' - # ... From e476e29f844b84606f83478749d78e88a2d5e7a0 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 20:07:57 +1100 Subject: [PATCH 13/25] surround with double quotes --- .github/workflows/try-state.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 5c13341a83c1..1bc773bfb2d6 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -19,11 +19,11 @@ jobs: strategy: matrix: runtime: - - { file_name: DEV_DEBUG_BUILD__westend_runtime.compact.compressed.wasm, rpc: wss://westend-try-runtime-node.parity-chains.parity.io:443 } - - { file_name: DEV_DEBUG_BUILD__rococo_runtime.compact.compressed.wasm, rpc: wss://rococo-try-runtime-node.parity-chains.parity.io:443 } - - { file_name: DEV_DEBUG_BUILD__asset_hub_westend_runtime.compact.compressed.wasm, rpc: wss://westend-asset-hub-rpc.polkadot.io:443 } - - { file_name: DEV_DEBUG_BUILD__bridge_hub_rococo_runtime.compact.compressed.wasm, rpc: wss://rococo-brdige-hub-rpc.polkadot.io:443 } - - { file_name: DEV_DEBUG_BUILD__contracts_rococo_runtime.compact.compressed.wasm, rpc: wss://rococo-contracts-rpc.polkadot.io:443 } + - { file_name: DEV_DEBUG_BUILD__westend_runtime.compact.compressed.wasm, rpc: "wss://westend-try-runtime-node.parity-chains.parity.io:443" } + - { file_name: DEV_DEBUG_BUILD__rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-try-runtime-node.parity-chains.parity.io:443" } + - { file_name: DEV_DEBUG_BUILD__asset_hub_westend_runtime.compact.compressed.wasm, rpc: "wss://westend-asset-hub-rpc.polkadot.io:443" } + - { file_name: DEV_DEBUG_BUILD__bridge_hub_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-brdige-hub-rpc.polkadot.io:443" } + - { file_name: DEV_DEBUG_BUILD__contracts_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-contracts-rpc.polkadot.io:443" } runs-on: ubuntu-latest steps: - name: Checkout repository From c8952dd4f5eb5e941e0e3d3be623cbb67a05ca36 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 20:09:19 +1100 Subject: [PATCH 14/25] debug --- .github/workflows/try-state.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 1bc773bfb2d6..2f9b7d86fcf9 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -38,12 +38,14 @@ jobs: run: | curl -sL ${{ env.RUNTIME_BASE_URL }}/${{ matrix.runtime.file_name }} + - name: Display structure of downloaded files + run: ls -R + - name: Check state run: | ./try-runtime \ --runtime ./${{ matrix.runtime.file_name }} \ execute-block \ live --uri ${{ matrix.runtime.rpc }} - continue-on-error: true # TODO: Post to Matrix if any fails From 6b27f9c281343e4e698c1ce0d88ec511747daa64 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 20:10:54 +1100 Subject: [PATCH 15/25] fix version --- .github/workflows/try-state.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 2f9b7d86fcf9..0be33a862fa7 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -31,7 +31,7 @@ jobs: - name: Download and set up try-runtime binary run: | - curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.4/try-runtime-x86_64-unknown-linux-musl -o try-runtime + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime chmod +x try-runtime - name: Download runtime blob From f516d17bc41de36889e3de222fb74d4018a9bc45 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 20:14:24 +1100 Subject: [PATCH 16/25] try fix name --- .github/workflows/try-state.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 0be33a862fa7..c371b35d4597 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -19,11 +19,11 @@ jobs: strategy: matrix: runtime: - - { file_name: DEV_DEBUG_BUILD__westend_runtime.compact.compressed.wasm, rpc: "wss://westend-try-runtime-node.parity-chains.parity.io:443" } - - { file_name: DEV_DEBUG_BUILD__rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-try-runtime-node.parity-chains.parity.io:443" } - - { file_name: DEV_DEBUG_BUILD__asset_hub_westend_runtime.compact.compressed.wasm, rpc: "wss://westend-asset-hub-rpc.polkadot.io:443" } - - { file_name: DEV_DEBUG_BUILD__bridge_hub_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-brdige-hub-rpc.polkadot.io:443" } - - { file_name: DEV_DEBUG_BUILD__contracts_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-contracts-rpc.polkadot.io:443" } + - { name: westend, file_name: DEV_DEBUG_BUILD__westend_runtime.compact.compressed.wasm, rpc: "wss://westend-try-runtime-node.parity-chains.parity.io:443" } + - { name: rococo, file_name: DEV_DEBUG_BUILD__rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-try-runtime-node.parity-chains.parity.io:443" } + - { name: westend_asset_hub, file_name: DEV_DEBUG_BUILD__asset_hub_westend_runtime.compact.compressed.wasm, rpc: "wss://westend-asset-hub-rpc.polkadot.io:443" } + - { name: rococo_bridge_hub, file_name: DEV_DEBUG_BUILD__bridge_hub_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-brdige-hub-rpc.polkadot.io:443" } + - { name: rococo_contracts, file_name: DEV_DEBUG_BUILD__contracts_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-contracts-rpc.polkadot.io:443" } runs-on: ubuntu-latest steps: - name: Checkout repository @@ -36,7 +36,7 @@ jobs: - name: Download runtime blob run: | - curl -sL ${{ env.RUNTIME_BASE_URL }}/${{ matrix.runtime.file_name }} + curl -sL ${{ env.RUNTIME_BASE_URL }}/${{ matrix.runtime.file_name }} -o ${{ matrix.runtime.name }} - name: Display structure of downloaded files run: ls -R @@ -44,7 +44,7 @@ jobs: - name: Check state run: | ./try-runtime \ - --runtime ./${{ matrix.runtime.file_name }} \ + --runtime ./${{ matrix.runtime.name }} \ execute-block \ live --uri ${{ matrix.runtime.rpc }} From db16447a5c423c77e6e04efb649c5bee6f905fbc Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 20:16:38 +1100 Subject: [PATCH 17/25] fix typo --- .github/workflows/try-state.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index c371b35d4597..817601c8f271 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -22,7 +22,7 @@ jobs: - { name: westend, file_name: DEV_DEBUG_BUILD__westend_runtime.compact.compressed.wasm, rpc: "wss://westend-try-runtime-node.parity-chains.parity.io:443" } - { name: rococo, file_name: DEV_DEBUG_BUILD__rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-try-runtime-node.parity-chains.parity.io:443" } - { name: westend_asset_hub, file_name: DEV_DEBUG_BUILD__asset_hub_westend_runtime.compact.compressed.wasm, rpc: "wss://westend-asset-hub-rpc.polkadot.io:443" } - - { name: rococo_bridge_hub, file_name: DEV_DEBUG_BUILD__bridge_hub_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-brdige-hub-rpc.polkadot.io:443" } + - { name: rococo_bridge_hub, file_name: DEV_DEBUG_BUILD__bridge_hub_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-bridge-hub-rpc.polkadot.io:443" } - { name: rococo_contracts, file_name: DEV_DEBUG_BUILD__contracts_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-contracts-rpc.polkadot.io:443" } runs-on: ubuntu-latest steps: From dc7f9457ed37e369af20f1a6ae82b08f275356fa Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 22:14:35 +1100 Subject: [PATCH 18/25] use latest try-runtime --- .github/workflows/try-state.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 817601c8f271..87c14ac93ca7 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -31,7 +31,7 @@ jobs: - name: Download and set up try-runtime binary run: | - curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.5/try-runtime-x86_64-unknown-linux-musl -o try-runtime chmod +x try-runtime - name: Download runtime blob From 42f6a8b371a5e3f816177a13658b94142a73d949 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 22:36:20 +1100 Subject: [PATCH 19/25] test matrix message --- .github/workflows/try-state.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 87c14ac93ca7..18c8ff698d39 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -41,6 +41,10 @@ jobs: - name: Display structure of downloaded files run: ls -R + - name: Get Day of the Week + run: | + + - name: Check state run: | ./try-runtime \ @@ -48,4 +52,12 @@ jobs: execute-block \ live --uri ${{ matrix.runtime.rpc }} - # TODO: Post to Matrix if any fails + - name: Send Test Matrix message + # if: steps.get-output.outputs.OUTCOME >= matrix.channel.threshold + uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 + with: + room_id: "!nbOkFmINBdBqqrfQYH:parity.io" + access_token: ${{ secrets.MATRIX_V2_ACCESS_TOKEN }} + server: m.parity.io + message: | + @room This is a test From dee649eb2cb04082ea2a4719028177242b24a47f Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 22:38:49 +1100 Subject: [PATCH 20/25] matrix room test --- .github/workflows/try-state.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 18c8ff698d39..e429883ffc29 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -28,8 +28,18 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + + - name: Send Test Matrix message + # if: steps.get-output.outputs.OUTCOME >= matrix.channel.threshold + uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 + with: + room_id: "!nbOkFmINBdBqqrfQYH:parity.io" + access_token: ${{ secrets.MATRIX_V2_ACCESS_TOKEN }} + server: m.parity.io + message: | + @room This is a test - - name: Download and set up try-runtime binary + - name: Download and set up try-runtime binary run: | curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.5/try-runtime-x86_64-unknown-linux-musl -o try-runtime chmod +x try-runtime @@ -41,23 +51,9 @@ jobs: - name: Display structure of downloaded files run: ls -R - - name: Get Day of the Week - run: | - - - name: Check state run: | ./try-runtime \ --runtime ./${{ matrix.runtime.name }} \ execute-block \ live --uri ${{ matrix.runtime.rpc }} - - - name: Send Test Matrix message - # if: steps.get-output.outputs.OUTCOME >= matrix.channel.threshold - uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 - with: - room_id: "!nbOkFmINBdBqqrfQYH:parity.io" - access_token: ${{ secrets.MATRIX_V2_ACCESS_TOKEN }} - server: m.parity.io - message: | - @room This is a test From fdbba0683f66e79b20f963425f06ddc3ca8a74af Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 30 Oct 2023 22:56:55 +1100 Subject: [PATCH 21/25] move matrix room id to env var --- .github/workflows/try-state.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index e429883ffc29..b6cc763d3867 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -13,6 +13,7 @@ env: # TODO: Replace this with paritytech/polkadot-sdk 'latest' release URL once 1.3.0 is published # with all runtime blobs. RUNTIME_BASE_URL: https://github.com/liamaharon/polkadot-sdk/releases/download/polkadot-v1.2.0-with-runtime-builds-fixed.3 + MATRIX_ROOM_ID: "!nbOkFmINBdBqqrfQYH:parity.io" jobs: check_try_state: @@ -33,7 +34,7 @@ jobs: # if: steps.get-output.outputs.OUTCOME >= matrix.channel.threshold uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 with: - room_id: "!nbOkFmINBdBqqrfQYH:parity.io" + room_id: ${{ env.MATRIX_ROOM_ID }} access_token: ${{ secrets.MATRIX_V2_ACCESS_TOKEN }} server: m.parity.io message: | From 696480ee22a31478f590ebc8a630f2ee4b8669cb Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 8 Nov 2023 13:40:34 +0400 Subject: [PATCH 22/25] use bot secret --- .github/workflows/try-state.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index b6cc763d3867..793033ca0628 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -35,10 +35,10 @@ jobs: uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 with: room_id: ${{ env.MATRIX_ROOM_ID }} - access_token: ${{ secrets.MATRIX_V2_ACCESS_TOKEN }} + access_token: ${{ secrets.MATRIX_TRY_RUNTIME_BOT_TOKEN }} server: m.parity.io message: | - @room This is a test + @room Hello GHA - name: Download and set up try-runtime binary run: | From a77739b3b7ccd3ff93606575907a864e7766ce6c Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 8 Nov 2023 13:47:22 +0400 Subject: [PATCH 23/25] set up matrix alert --- .github/workflows/try-state.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 793033ca0628..f1fbc5787cba 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -30,16 +30,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Send Test Matrix message - # if: steps.get-output.outputs.OUTCOME >= matrix.channel.threshold - uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 - with: - room_id: ${{ env.MATRIX_ROOM_ID }} - access_token: ${{ secrets.MATRIX_TRY_RUNTIME_BOT_TOKEN }} - server: m.parity.io - message: | - @room Hello GHA - - name: Download and set up try-runtime binary run: | curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.5/try-runtime-x86_64-unknown-linux-musl -o try-runtime @@ -53,8 +43,19 @@ jobs: run: ls -R - name: Check state + continue-on-error: true run: | ./try-runtime \ --runtime ./${{ matrix.runtime.name }} \ execute-block \ live --uri ${{ matrix.runtime.rpc }} + + - name: Send Matrix Alert + if: ${{ steps.check_state.outcome == 'failure' }} + uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 + with: + room_id: ${{ env.MATRIX_ROOM_ID }} + access_token: ${{ secrets.MATRIX_TRY_RUNTIME_BOT_TOKEN }} + server: m.parity.io + message: | + @room Problem executing try-state for runtime ${{ matrix.runtime.name }}. Check the details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} From 53b4a47d042a2960a62f93be5855744ba5cf5c21 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 8 Nov 2023 13:54:24 +0400 Subject: [PATCH 24/25] fix id --- .github/workflows/try-state.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index f1fbc5787cba..1476526920bf 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -43,6 +43,7 @@ jobs: run: ls -R - name: Check state + id: check_state continue-on-error: true run: | ./try-runtime \ From ff15f18a9fc297659d68d042c70167b544d9e9dd Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 10 Nov 2023 16:33:06 +0400 Subject: [PATCH 25/25] Use try-runtime v0.4.0 --- .github/workflows/try-state.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/try-state.yml b/.github/workflows/try-state.yml index 1476526920bf..7c5b8740e839 100644 --- a/.github/workflows/try-state.yml +++ b/.github/workflows/try-state.yml @@ -32,7 +32,7 @@ jobs: - name: Download and set up try-runtime binary run: | - curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.5/try-runtime-x86_64-unknown-linux-musl -o try-runtime + curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.4.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime chmod +x try-runtime - name: Download runtime blob