Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update try-runtime-cli #463

Merged
merged 18 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 49 additions & 8 deletions .github/workflows/check-migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4

- name: Build EXTRA_ARGS
- name: Build EXTRA_FLAGS
run: |
# When running on relay, we don't need weight checks.
EXTRA_FLAGS=""
Expand All @@ -70,6 +70,8 @@ jobs:
CHECKS="all"
fi

EXTRA_FLAGS+="--blocktime ${{ matrix.runtime.blocktime }}"
ggwpez marked this conversation as resolved.
Show resolved Hide resolved

# Disable the spec version check when we dont want to release.
# The program prints either `1` or `0`.
if [ "$(.github/changelog-processor.py CHANGELOG.md --should-release)" = "0" ]; then
Expand All @@ -82,16 +84,55 @@ jobs:
echo "Flags: $EXTRA_FLAGS"
echo "Checks: $CHECKS"

echo "EXTRA_ARGS=$EXTRA_FLAGS" >> $GITHUB_ENV
echo "EXTRA_FLAGS=$EXTRA_FLAGS" >> $GITHUB_ENV
echo "CHECKS=$CHECKS" >> $GITHUB_ENV

- name: Run ${{ matrix.runtime.name }} Runtime Checks
uses: "paritytech/[email protected]"
- name: Install Protoc
uses: arduino/[email protected]
with:
runtime-package: ${{ matrix.runtime.package }}
node-uri: ${{ matrix.runtime.uri }}
checks: ${{ env.CHECKS }}
extra-args: ${{ env.EXTRA_ARGS }}
version: "3.6.1"

- name: Add wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
shell: bash

- name: Add rust-src component
run: rustup component add rust-src
shell: bash

- name: Run ${{ matrix.runtime.name }} Runtime Checks
#uses: "paritytech/[email protected]"
env:
EXTRA_FLAGS: ${{ env.EXTRA_FLAGS }}
CHECKS: ${{ env.CHECKS }}
# runtime-package: ${{ matrix.runtime.package }}
# node-uri: ${{ matrix.runtime.uri }}
# checks: ${{ env.CHECKS }}
# extra-args: ${{ env.EXTRA_FLAGS }}
run: |
cargo install -q --git https://github.com/liamaharon/try-runtime-cli --branch liam-runtime-upgrade-mbms
ggwpez marked this conversation as resolved.
Show resolved Hide resolved
ggwpez marked this conversation as resolved.
Show resolved Hide resolved

cargo build --profile production -p ${{ matrix.runtime.package }} --features try-runtime -q --locked

PACKAGE_NAME=${{ matrix.runtime.package }}
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm
RUNTIME_BLOB_PATH=./target/production/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME
export RUST_LOG=remote-ext=debug,runtime=debug

echo "Extra args: $EXTRA_FLAGS"

# Store the command in a variable so we can log it
COMMAND="try-runtime \
--runtime $RUNTIME_BLOB_PATH \
on-runtime-upgrade --checks=$CHECKS \
$EXTRA_FLAGS \
live --uri ${{ matrix.runtime.uri }}"

# Echo the command before running it, for debugging purposes
echo "Running command:"
echo "$COMMAND"
eval "$COMMAND"


# This will only run if all the tests in its "needs" array passed.
# Add this as your required job, becuase if the matrix changes size (new things get added)
Expand Down
39 changes: 26 additions & 13 deletions .github/workflows/runtimes-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,88 +4,101 @@
"package": "polkadot-runtime",
"path": "relay/polkadot",
"uri": "wss://try-runtime.polkadot.io:443",
"is_relay": true
"is_relay": true,
"blocktime": 6000
},
{
"name": "kusama",
"package": "staging-kusama-runtime",
"path": "relay/kusama",
"uri": "wss://try-runtime-kusama.polkadot.io:443",
"is_relay": true
"is_relay": true,
"blocktime": 6000
},
{
"name": "glutton-kusama",
"package": "glutton-kusama-runtime",
"path": "system-parachains/gluttons/glutton-kusama",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "asset-hub-kusama",
"package": "asset-hub-kusama-runtime",
"path": "system-parachains/asset-hubs/asset-hub-kusama",
"uri": "wss://kusama-asset-hub-rpc.polkadot.io:443",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "asset-hub-polkadot",
"package": "asset-hub-polkadot-runtime",
"path": "system-parachains/asset-hubs/asset-hub-polkadot",
"uri": "wss://polkadot-asset-hub-rpc.polkadot.io:443",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "bridge-hub-kusama",
"package": "bridge-hub-kusama-runtime",
"path": "system-parachains/bridge-hubs/bridge-hub-kusama",
"uri": "wss://kusama-bridge-hub-rpc.polkadot.io:443",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "bridge-hub-polkadot",
"package": "bridge-hub-polkadot-runtime",
"path": "system-parachains/bridge-hubs/bridge-hub-polkadot",
"uri": "wss://polkadot-bridge-hub-rpc.polkadot.io:443",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "collectives-polkadot",
"package": "collectives-polkadot-runtime",
"path": "system-parachains/collectives/collectives-polkadot",
"uri": "wss://polkadot-collectives-rpc.polkadot.io:443",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "coretime-kusama",
"package": "coretime-kusama-runtime",
"path": "system-parachains/coretime/coretime-kusama",
"uri": "wss://kusama-coretime-rpc.polkadot.io:443",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "coretime-polkadot",
"package": "coretime-polkadot-runtime",
"path": "system-parachains/coretime/coretime-polkadot",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "people-kusama",
"package": "people-kusama-runtime",
"path": "system-parachains/people/people-kusama",
"uri": "wss://kusama-people-rpc.polkadot.io:443",
"is_relay": false
"is_relay": false,
"blocktime": 6000
},
{
"name": "people-polkadot",
"package": "people-polkadot-runtime",
"path": "system-parachains/people/people-polkadot",
"uri": "wss://polkadot-people-rpc.polkadot.io:443",
"is_relay": false
"is_relay": false,
"blocktime": 12000
},
{
"name": "encointer-kusama",
"package": "encointer-kusama-runtime",
"path": "system-parachains/encointer",
"uri": "wss://kusama.api.encointer.org:443",
"is_relay": false
"is_relay": false,
"blocktime": 12000
}
]
Loading