diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 271128fc3..388476838 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 @@ -49,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 @@ -86,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 @@ -108,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: