This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI job for checking missing migrations and fix the missing `Polka…
…dotXcm` migration for ajuna (#397) * add runtime-migration check (untested) * [CI] use ajuna as endpoint * [CI] add pallet-xcm (aka PolkadotXcm) migration * [para] add deprecation notice for the try runtime command * Readme.md add try-runtime explanation. * [solo-node] fix try-runtime feature flag, and make it compile with solo-node (although it seems it can't be used with the solo node. * remove obsolete try-runtime-cli from dependencies * [para] fix cherry-pick merge * run ci on branch and prs to ajuna-stable * [ajuna-solo] remove try-runtime feature * [CI] disable spec-version-check and idempotency check
- Loading branch information
Showing
10 changed files
with
123 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Check Migrations | ||
|
||
on: | ||
push: | ||
branches: ["develop", "ajuna-stable" ] | ||
pull_request: | ||
branches: ["develop", "ajuna-stable"] | ||
workflow_dispatch: | ||
|
||
# Cancel a currently running workflow from the same PR, branch or tag when a new workflow is | ||
# triggered (ref https://stackoverflow.com/a/72408109) | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
runtime-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
runtime: ${{ steps.runtime.outputs.runtime }} | ||
name: Extract tasks from matrix | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: runtime | ||
run: | | ||
# Filter out runtimes that don't have a URI | ||
TASKS=$(jq '[.[] | select(.uri != null)]' .github/workflows/runtimes-matrix.json) | ||
SKIPPED_TASKS=$(jq '[.[] | select(.uri == null)]' .github/workflows/runtimes-matrix.json) | ||
echo --- Running the following tasks --- | ||
echo $TASKS | ||
echo --- Skipping the following tasks due to not having a uri field --- | ||
echo $SKIPPED_TASKS | ||
# Strip whitespace from Tasks now that we've logged it | ||
TASKS=$(echo $TASKS | jq -c .) | ||
echo "runtime=$TASKS" >> $GITHUB_OUTPUT | ||
check-migrations: | ||
needs: [runtime-matrix] | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download try-runtime-cli | ||
run: | | ||
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.2/try-runtime-x86_64-unknown-linux-musl -o try-runtime | ||
chmod +x ./try-runtime | ||
- 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 ${{ matrix.runtime.name }} | ||
run: | | ||
cargo build --release -p ${{ matrix.runtime.package }} --features try-runtime -q --locked | ||
- name: Check migrations | ||
# Todo: enable spec-version-check dynamically if we are releasing | ||
run: | | ||
PACKAGE_NAME=${{ matrix.runtime.package }} | ||
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm | ||
RUNTIME_BLOB_PATH=./target/release/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME | ||
./try-runtime \ | ||
--runtime $RUNTIME_BLOB_PATH \ | ||
on-runtime-upgrade --checks=pre-and-post \ | ||
--disable-spec-version-check --disable-idempotency-checks \ | ||
live --uri ${{ matrix.runtime.uri }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
"name": "ajuna", | ||
"package": "ajuna-runtime", | ||
"path": "runtime/ajuna-runtime", | ||
"uri": "wss://rpc-parachain.ajuna.network:443" | ||
} | ||
] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters