From 7f813823f3687cbebcdde3e9277782d529a5a317 Mon Sep 17 00:00:00 2001 From: philipp Date: Wed, 24 Apr 2024 10:14:11 +0200 Subject: [PATCH] switch to smarter ci cache, which knows intricacies of rust; e.g. auto deletes unused deps --- .gitea/workflows/action.yml | 40 +++++++------------------------------ 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/.gitea/workflows/action.yml b/.gitea/workflows/action.yml index fb36000..f1704d2 100644 --- a/.gitea/workflows/action.yml +++ b/.gitea/workflows/action.yml @@ -17,17 +17,8 @@ jobs: - name: Run Test DB Script run: ./test_db.sh - - name: Set up cargo cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-debug-rowt-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-debug-rowt- + - name: Cache Cargo dependencies + uses: Swatinem/rust-cache@v2 - name: Build run: | @@ -56,17 +47,9 @@ jobs: - name: Run Test DB Script run: ./test_db.sh - - name: Set up cargo cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-release-rowt-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-release-rowt- + - name: Cache Cargo dependencies + uses: Swatinem/rust-cache@v2 + - name: Build run: | cargo build --release --target $CARGO_TARGET @@ -107,17 +90,8 @@ jobs: - name: Run Test DB Script run: ./test_db.sh - - name: Set up cargo cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-release-rowt-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo-release-rowt- + - name: Cache Cargo dependencies + uses: Swatinem/rust-cache@v2 - name: Build run: |