From 8ca225728bc5e275ecc0b2330f1ea62ae0c853ce Mon Sep 17 00:00:00 2001 From: Fergus Molloy Date: Fri, 18 Jul 2025 14:16:08 +0100 Subject: [PATCH] add cache to other job stages --- .gitea/workflows/cargo.yaml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/cargo.yaml b/.gitea/workflows/cargo.yaml index 42d2d5a..fb32fe1 100644 --- a/.gitea/workflows/cargo.yaml +++ b/.gitea/workflows/cargo.yaml @@ -10,7 +10,7 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Cargo target cache + - name: Cache uses: actions/cache@v4 with: path: | @@ -31,7 +31,16 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - + - name: Cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo + target + key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }} + ${{ runner.os }}-cargo-target - name: Run clippy uses: actions-rs/cargo@v1 with: @@ -43,13 +52,21 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - + - name: Cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo + target + key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }} + ${{ runner.os }}-cargo-target - name: Run unit tests uses: actions-rs/cargo@v1 with: command: test args: --lib --bins - - name: Run integration tests uses: actions-rs/cargo@v1 with: