From 101d66452f46d3d1a2099be9d4e9309737bdf936 Mon Sep 17 00:00:00 2001 From: rymnc <43716372+rymnc@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:18:55 +0530 Subject: [PATCH] ci(caches): use rust-cache instead of buildjet to cache deps --- .github/workflows/ci.yml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ca3d379b5a..37dd00a614b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,7 @@ jobs: with: toolchain: ${{ env.RUST_VERSION_FMT }} components: rustfmt + - uses: Swatinem/rust-cache@v2 - name: Rustfmt check run: cargo +${{ env.RUST_VERSION_FMT }} fmt --all -- --check @@ -58,6 +59,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_VERSION }} + - uses: Swatinem/rust-cache@v2 - name: setup binstall uses: taiki-e/install-action@cargo-binstall - name: Install Cargo.toml linter @@ -164,20 +166,12 @@ jobs: toolchain: ${{ env.RUST_VERSION }} targets: "wasm32-unknown-unknown" components: "clippy" + - uses: Swatinem/rust-cache@v2 - name: Install Cargo Make uses: davidB/rust-cargo-make@v1 with: version: "0.36.4" - uses: rui314/setup-mold@v1 - - uses: buildjet/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ matrix.command }}-${{ matrix.args }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/cargo@v1 if: ${{ matrix.command == 'nextest' }} with: @@ -231,16 +225,8 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_VERSION }} + - uses: Swatinem/rust-cache@v2 - uses: rui314/setup-mold@v1 - - uses: buildjet/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: cargo-test-kms-${{ hashFiles('**/Cargo.lock') }} - name: Run integration tests for kms only run: cargo test -p fuel-core-tests --features aws-kms -- kms @@ -286,6 +272,7 @@ jobs: with: toolchain: ${{ env.RUST_VERSION }} targets: "wasm32-unknown-unknown" + - uses: Swatinem/rust-cache@v2 - name: Publish crate uses: FuelLabs/publish-crates@v1 @@ -371,6 +358,8 @@ jobs: toolchain: ${{ env.RUST_VERSION }} target: ${{ matrix.job.target }},"wasm32-unknown-unknown" + - uses: Swatinem/rust-cache@v2 + - name: Install cross uses: baptiste0928/cargo-install@v1 with: