From 96495b09d81a7d00e58f513225fc3872150f8c64 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 28 Feb 2025 20:24:18 +0100 Subject: [PATCH] ci: cache more jobs --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46179b1..fa93824 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,8 @@ jobs: sed -i 's/nightly = \[\]//g' Cargo.toml sed -i 's/generic_const_exprs = \["nightly"\]//g' Cargo.toml - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true # Only run tests on latest stable and above - name: Check if: ${{ matrix.rust == '1.65' }} # MSRV @@ -69,6 +71,8 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: taiki-e/install-action@cargo-hack - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true - name: cargo hack run: | cargo hack check \ @@ -86,6 +90,8 @@ jobs: # with: # components: llvm-tools-preview # - uses: Swatinem/rust-cache@v2 + # with: + # cache-on-failure: true # - uses: taiki-e/install-action@cargo-llvm-cov # - name: Generate code coverage # env: @@ -115,6 +121,9 @@ jobs: - uses: dtolnay/rust-toolchain@clippy with: toolchain: nightly-2025-02-20 # https://github.com/rust-lang/rust-clippy/issues/14303 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true - run: cargo clippy --workspace --all-features env: RUSTFLAGS: -Dwarnings @@ -128,6 +137,9 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: components: rust-docs + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true - run: cargo doc --workspace --all-features --no-deps --document-private-items env: RUSTDOCFLAGS: "--cfg doc_cfg -D warnings"