From cb0af94170e31db95ce0ca5120587ee169390aa5 Mon Sep 17 00:00:00 2001 From: f-gate Date: Mon, 4 Dec 2023 11:49:36 +0000 Subject: [PATCH] try-runtime ci --- .github/workflows/build.yml | 63 ++++++++++++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 039e8965..562a6a40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,8 +34,8 @@ jobs: machine_zone: ${{ env.GCP_ZONE }} ephemeral: true - test-features: - needs: create-runner + cargo-fmt: + needs: create-runner runs-on: ${{ needs.create-runner.outputs.label }} steps: - uses: actions/checkout@v4 @@ -51,15 +51,64 @@ jobs: target: wasm32-unknown-unknown override: true components: rustfmt, clippy - - - name: Install Dependencies - run: sudo apt install protobuf-compiler clang build-essential -y - + - name: 🫠 rustfmt 🫠 uses: actions-rs/cargo@v1 with: command: fmt args: --check + test-features: + needs: create-runner + runs-on: ${{ needs.create-runner.outputs.label }} + steps: + - uses: actions/checkout@v4 + + - name: Set HOME + run: echo "HOME=/home/ubuntu" >> ${GITHUB_ENV} + + - name: Install minimal nightly Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2023-05-22 + target: wasm32-unknown-unknown + override: true + + - name: Install Dependencies + run: sudo apt install protobuf-compiler clang build-essential -y + - name: Run tests with benchmarks - run: cargo test --features runtime-benchmarks \ No newline at end of file + run: cargo test --features runtime-benchmarks + + try-runtime: + needs: create-runner + runs-on: ${{ needs.create-runner.outputs.label }} + steps: + - uses: actions/checkout@v4 + + - name: Set HOME + run: echo "HOME=/home/ubuntu" >> ${GITHUB_ENV} + + - name: Install minimal nightly Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2023-05-22 + target: wasm32-unknown-unknown + override: true + + - name: Install Dependencies + run: sudo apt install protobuf-compiler clang build-essential -y + + - name: Install try-runtime cli + run: cargo install --git https://github.com/paritytech/try-runtime-cli --locked + + - name: build with try-runtime + run: cargo build --release --features try-runtime + + - name: try-runtime kusama + run: try-runtime --runtime target/release/wbuild/imbue-kusama-runtime/imbue_kusama_runtime.wasm on-runtime-upgrade live --uri ws://34.123.139.91:9942 + + - name: try-runtime rococo + run: try-runtime --runtime target/release/wbuild/imbue-kusama-runtime/imbue_kusama_runtime.wasm on-runtime-upgrade live --uri ws://35.202.116.137:9942 \ No newline at end of file