fix ci env (#1394) #132
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
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: | |
- { name: astar, endpoint: ASTAR_RUNTIME_ENDPOINT } | |
- { name: shiden, endpoint: SHIDEN_RUNTIME_ENDPOINT } | |
- { name: shibuya, endpoint: SHIBUYA_RUNTIME_ENDPOINT } | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.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/runtime') }} | |
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.name }} runtime | |
run: cargo build --release --locked --package ${{ matrix.runtime.name }}-runtime --features try-runtime | |
- name: Run ${{ matrix.runtime.name }} runtime checks | |
timeout-minutes: 60 | |
env: | |
ENDPOINT: ${{ secrets[matrix.runtime.endpoint] }} | |
run: | | |
PACKAGE_NAME=${{ matrix.runtime.name }}-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 try-runtime -c ${{ matrix.runtime.name }} -e ${{ env.ENDPOINT }} --import-storage .github/try-runtime-storage.yml --checks All --runtime $RUNTIME_BLOB_PATH ${{ env.EXTRA_ARGS }} |