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

gha check migrations #1254

Merged
merged 6 commits into from
Jun 5, 2024
Merged
Changes from all 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
59 changes: 59 additions & 0 deletions .github/workflows/check-migrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Check Migrations

on:
push:
branches: ["master"]
tags:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check-migrations:
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix:
runtime:
- astar
- shiden
- shibuya
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Install deps
run: sudo apt -y install protobuf-compiler

- name: Install & display rust toolchain
run: rustup show

- name: Check targets are installed correctly
run: rustup target list --installed

- name: Build EXTRA_ARGS
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed since you already check it as the entry condition for the script to run?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's needed. It shouldn't check spec version unless you're releasing. This will run on master or manually triggered to your branch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, thanks!

run: |
EXTRA_FLAGS+="--disable-spec-check"
echo "Disabling the spec check since we are not releasing"
echo "Flags: $EXTRA_FLAGS"
echo "EXTRA_ARGS=$EXTRA_FLAGS" >> $GITHUB_ENV

- name: Build ${{ matrix.runtime }} runtime
run: cargo build --release --locked --package ${{ matrix.runtime }}-runtime --features try-runtime

- name: Run ${{ matrix.runtime }} runtime checks
run: |
PACKAGE_NAME=${{ matrix.runtime }}-runtime
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm
RUNTIME_BLOB_PATH=./target/release/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME

npx @acala-network/chopsticks@beta try-runtime -c ${{ matrix.runtime }} --checks All --runtime $RUNTIME_BLOB_PATH ${{ env.EXTRA_ARGS }}
Loading