Skip to content

Commit

Permalink
CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsso committed Jun 20, 2023
1 parent 5a6dbc0 commit cfa70bf
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
stable: stable
toolchain: stable
target: wasm32-unknown-unknown
try-runtime-chain: dev
try-runtime-uri: wss://eden-rpc.dwellir.com:443
Expand All @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.stable }}
toolchain: ${{ env.toolchain }}
components: rustfmt, clippy
target: ${{ env.target }}
- name: Rustfmt Check
Expand All @@ -31,7 +31,7 @@ jobs:
uses: actions-rs-plus/clippy-check@v2
with:
args: --all-features -- -A clippy::type_complexity -A clippy::identity_op -A clippy::boxed_local -D dead_code
toolchain: ${{ env.stable }}
toolchain: ${{ env.toolchain }}

tests:
runs-on: ubuntu-latest-8-cores
Expand All @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.stable }}
toolchain: ${{ env.toolchain }}
target: ${{ env.target }}
- name: Install protobuf-compiler
run: |
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.stable }}
toolchain: ${{ env.toolchain }}
target: ${{ env.target }}
- name: Install protobuf-compiler
run: |
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
"method": "system_version",
"params": [],
"id": 1
}' | jq '{"result"}[]' >> $GITHUB_OUTPUT
}' | jq '{"result"}[]'| sed 's/^"/"eden-/' >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
id: get_version
- name: Install protobuf-compiler
Expand All @@ -120,7 +120,7 @@ jobs:
- name: Install Rust stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.stable }}
toolchain: ${{ env.toolchain }}
target: ${{ env.target }}
- name: Cache a dir
uses: actions/cache@v3
Expand All @@ -137,12 +137,7 @@ jobs:
install -d snapshots
date > snapshots/created_at
./target/release/nodle-parachain try-runtime --runtime existing -lruntime=debug --chain ${{ env.try-runtime-chain }} create-snapshot "snapshots/eden-snapshot-full" -u ${{ env.try-runtime-uri}}
- name: Run Migration on new snapshot
if: steps.cachedir.outputs.cache-hit != 'true'
run: |
./target/release/nodle-parachain try-runtime --runtime target/release/wbuild/runtime-eden/runtime_eden.wasm -lruntime=debug --chain ${{ env.try-runtime-chain }} on-runtime-upgrade --checks=all snap -s snapshots/eden-snapshot-full
- name: Try runtime reuse snap
if: steps.cachedir.outputs.cache-hit == 'true'
run: |
cat snapshots/created_at
./target/release/nodle-parachain try-runtime --runtime target/release/wbuild/runtime-eden/runtime_eden.wasm --chain ${{ env.try-runtime-chain }} on-runtime-upgrade --checks=all snap --snapshot-path="snapshots/eden-snapshot-full"
./target/release/nodle-parachain try-runtime --runtime target/release/wbuild/runtime-eden/runtime_eden.wasm -lruntime=debug --chain ${{ env.try-runtime-chain }} on-runtime-upgrade --checks=all snap -s snapshots/eden-snapshot-full

0 comments on commit cfa70bf

Please sign in to comment.