From c8d779c43c0b97bff9c1ef524d2446207251d43f Mon Sep 17 00:00:00 2001 From: Ayush Kumar Mishra Date: Thu, 15 Aug 2024 16:52:32 +0530 Subject: [PATCH 1/3] Adding CI for cargo cache --- .github/workflows/ci.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 82de34749..102ee965d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,19 @@ jobs: toolchain: nightly-2024-03-12 override: true components: rustfmt + - name: "Cache cargo" + id: cache-cargo + uses: "actions/cache@v4" + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + save-always: true + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- - name: Check TOML uses: dprint/check@v2.2 - name: Check Format From da99d163da0459347d298adf8fc1baac8b891c1b Mon Sep 17 00:00:00 2001 From: Ayush Kumar Mishra Date: Thu, 15 Aug 2024 17:00:08 +0530 Subject: [PATCH 2/3] Adding CI for cargo cache --- .github/workflows/ci.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 102ee965d..087300ee8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,6 +62,19 @@ jobs: target: wasm32-unknown-unknown - name: Rust Cache uses: Swatinem/rust-cache@v2 + - name: "Cache cargo" + id: cache-cargo + uses: "actions/cache@v4" + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + save-always: true + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- - name: Install try-runtime run: cargo install --git https://github.com/paritytech/try-runtime-cli --locked - name: Check Build @@ -99,6 +112,19 @@ jobs: components: clippy - name: Rust Cache uses: Swatinem/rust-cache@v2 + - name: "Cache cargo" + id: cache-cargo + uses: "actions/cache@v4" + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + save-always: true + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- - name: Check with Clippy run: | cargo clippy --no-deps --all-targets --features runtime-benchmarks,try-runtime --workspace -- --deny warnings @@ -121,6 +147,19 @@ jobs: target: wasm32-unknown-unknown - name: Rust Cache uses: Swatinem/rust-cache@v2 + - name: "Cache cargo" + id: cache-cargo + uses: "actions/cache@v4" + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + save-always: true + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- - name: Run cargo-tarpaulin uses: actions-rs/tarpaulin@v0.1 with: From f4d8f677fe7c15e5270094afae999b59efcc9def Mon Sep 17 00:00:00 2001 From: Ayush Kumar Mishra Date: Fri, 16 Aug 2024 10:56:14 +0530 Subject: [PATCH 3/3] enable try-runtime --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 087300ee8..f092a37d8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -80,10 +80,10 @@ jobs: - name: Check Build run: | cargo build --release --features try-runtime -# - name: Check Try-Runtime -# run: | -# try-runtime --runtime ./target/release/wbuild/cere-dev-runtime/cere_dev_runtime.compact.compressed.wasm \ -# on-runtime-upgrade --disable-idempotency-checks live --uri wss://rpc.devnet.cere.network:443 + - name: Check Try-Runtime + run: | + try-runtime --runtime ./target/release/wbuild/cere-dev-runtime/cere_dev_runtime.compact.compressed.wasm \ + on-runtime-upgrade --disable-idempotency-checks live --uri wss://rpc.devnet.cere.network:443 - name: Run dev chain run: | timeout --preserve-status 30s ./target/release/cere --dev