-
Notifications
You must be signed in to change notification settings - Fork 19
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
#1824: try-runtime ci checks: Migrations #2023
Changes from 23 commits
8ce12e3
3325528
f0aece8
2d85190
3aacf6e
e65a14f
c50636c
8f4e5fe
6de859b
a371101
b28ebdb
63fe220
b618895
77834b4
e8853fd
6bd531b
a70a287
0fa35d1
ef48c8b
7c7f38a
6294d2a
00016d7
72fe100
8e1ed4b
386fa52
81d679f
3067dff
56acf55
f55099f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Check Migrations on Paseo | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- labeled | ||
workflow_dispatch: | ||
inputs: | ||
runtime-package: | ||
saraswatpuneet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
description: 'Runtime package to check migrations for' | ||
required: true | ||
default: 'frequency-runtime' | ||
runtime-uri: | ||
description: 'URI of the runtime to check migrations for' | ||
required: true | ||
default: 'wss://0.rpc.testnet.amplica.io:443' | ||
saraswatpuneet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
jobs: | ||
check-migrations: | ||
if: contains(github.event.pull_request.labels.*.name, 'change/storage-migration') | ||
saraswatpuneet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name: Check Migrations on Paseo | ||
continue-on-error: false | ||
runs-on: ubicloud-standard-8 | ||
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.3.1 | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
saraswatpuneet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Run Check Migrations Action | ||
uses: ./.github/workflows/common/try-runtime-migrations | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
runtime-package: "frequency-runtime" | ||
runtime-uri: "wss://0.rpc.testnet.amplica.io:443" | ||
saraswatpuneet marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: "Check Migrations Paseo" | ||
saraswatpuneet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
description: "An action to check runtime migrations" | ||
inputs: | ||
github-token: | ||
description: "GitHub token" | ||
required: true | ||
runtime-package: | ||
description: "The package name of the runtime" | ||
required: true | ||
runtime-uri: | ||
description: "The URI of the runtime" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
saraswatpuneet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Install required packages | ||
run: | | ||
apt-get update | ||
apt install -y protobuf-compiler libclang-dev clang cmake unzip | ||
shell: bash | ||
|
||
- name: Run runtime checks | ||
uses: paritytech/try-runtime-gha@v0.1.0 | ||
with: | ||
runtime-package: ${{ inputs.runtime-package }} | ||
node-uri: ${{ inputs.runtime-uri }} | ||
checks: "pre-and-post" | ||
extra-args: "--disable-spec-version-check --no-weight-warnings" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,6 +160,9 @@ lto = true | |
codegen-units = 1 | ||
strip = true | ||
|
||
[profile.production] | ||
inherits = "release" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The gh action |
||
# Faster build for bench-dev | ||
[profile.bench-dev] | ||
inherits = "release" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -282,41 +282,36 @@ e2e-tests-testnet-paseo: | |
e2e-tests-paseo-local: | ||
./scripts/run_e2e_tests.sh -c paseo_local | ||
|
||
.PHONY: try-runtime-create-snapshot-rococo, try-runtime-create-snapshot-mainnet, try-runtime-upgrade-rococo, try-runtime-upgrade-mainnet, try-runtime-use-snapshot-rococo, try-runtime-use-snapshot-mainnet, try-runtime-create-snapshot-paseo-testnet, try-runtime-use-snapshot-paseo-testnet, try-runtime-upgrade-paseo-testnet | ||
try-runtime-create-snapshot-rococo: | ||
try-runtime create-snapshot --uri wss://rpc.rococo.frequency.xyz:443 rococo-all-pallets.state | ||
check-try-runtime-installed: | ||
@which try-runtime > /dev/null || (echo "try-runtime is not installed. Please install it" && exit 1) | ||
.PHONY: try-runtime-create-snapshot-mainnet, try-runtime-upgrade-mainnet, try-runtime-use-snapshot-mainnet, try-runtime-create-snapshot-paseo-testnet, try-runtime-use-snapshot-paseo-testnet, try-runtime-upgrade-paseo-testnet | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed rococo related try-runtime stuff |
||
try-runtime-create-snapshot-paseo-testnet: | ||
try-runtime-create-snapshot-paseo-testnet: check-try-runtime-installed | ||
try-runtime create-snapshot --uri wss://0.rpc.testnet.amplica.io:443 testnet-paseo-all-pallets.state | ||
|
||
# mainnet snapshot takes as many as 24 hours to complete | ||
try-runtime-create-snapshot-mainnet: | ||
try-runtime-create-snapshot-mainnet: check-try-runtime-installed | ||
try-runtime create-snapshot --uri wss://1.rpc.frequency.xyz:443 mainnet-all-pallets.state | ||
|
||
try-runtime-upgrade-rococo: | ||
cargo build --release --features frequency-testnet,try-runtime && \ | ||
try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade live --uri wss://rpc.rococo.frequency.xyz:443 | ||
|
||
try-runtime-upgrade-paseo-testnet: | ||
try-runtime-upgrade-paseo-testnet: check-try-runtime-installed | ||
cargo build --release --features frequency-testnet,try-runtime && \ | ||
try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade live --uri wss://0.rpc.testnet.amplica.io:443 | ||
|
||
try-runtime-upgrade-mainnet: | ||
try-runtime-upgrade-mainnet: check-try-runtime-installed | ||
cargo build --release --features frequency,try-runtime && \ | ||
try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade live --uri wss://1.rpc.frequency.xyz:443 | ||
|
||
try-runtime-use-snapshot-rococo: | ||
cargo build --release --features frequency-testnet,try-runtime && \ | ||
try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade snap --path rococo-all-pallets.state | ||
|
||
try-runtime-use-snapshot-paseo-testnet: | ||
try-runtime-use-snapshot-paseo-testnet: check-try-runtime-installed | ||
cargo build --release --features frequency-testnet,try-runtime && \ | ||
try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade snap --path testnet-paseo-all-pallets.state | ||
|
||
try-runtime-use-snapshot-mainnet: | ||
try-runtime-use-snapshot-mainnet: check-try-runtime-installed | ||
cargo build --release --features frequency,try-runtime && \ | ||
try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade snap --path mainnet-all-pallets.state | ||
|
||
try-runtime-check-migrations-paseo-testnet: check-try-runtime-installed | ||
cargo build --release --features frequency-testnet,try-runtime -q --locked && \ | ||
try-runtime --runtime ./target/release/wbuild/frequency-runtime/frequency_runtime.wasm on-runtime-upgrade --checks="pre-and-post" --disable-spec-version-check --no-weight-warnings live --uri wss://0.rpc.testnet.amplica.io:443 | ||
# Pull the Polkadot version from the polkadot-cli package in the Cargo.lock file. | ||
# This will break if the lock file format changes | ||
POLKADOT_VERSION=$(shell awk -F "=" '/name = "polkadot-cli"/,/version = ".*"/{ print $2 }' Cargo.lock | tail -n 1 | cut -d " " -f 3 | tr -d \") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Triggers the workflow when a PR is labeled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any label applied to the PR will trigger the workflow? Nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below we check for two conditions
So lable should be
change/storage-migration
for the job to be triggered