From 14b99480df39c4489b0ebd42f5a3535de34a60df Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Sun, 16 Mar 2025 20:06:51 -0400 Subject: [PATCH] cargo build caching --- .gitea/workflows/build.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 473ab60..bc8ca1f 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -9,7 +9,9 @@ jobs: run: apk add nodejs gcc libc-dev pkgconf libx11-dev alsa-lib-dev eudev-dev tar - name: Check out repository code uses: actions/checkout@v4 - - uses: actions/cache@v4 + - name: Restore cache + id: restore-cache + uses: actions/cache/restore@v4 with: path: | ~/.cargo/bin/ @@ -20,3 +22,13 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Build run: cargo build --release + - name: Save cache + uses: actions/cache/save@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ steps.restore-cache.outputs.cache-primary-key }}