Cache tools and Rust build output in CI and release builds

This commit is contained in:
2026-10-14 22:40:54 +02:00
parent 7f9d27b8d1
commit 45ecc698c2
3 changed files with 45 additions and 2 deletions
+19
View File
@@ -14,6 +14,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore tool cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
~/.rustup
~/.local/bin/mise
~/.local/share/mise
key: tools-check-${{ hashFiles('scripts/ci-setup.sh', 'mise.toml') }}
- name: Restore build cache
uses: actions/cache@v4
with:
path: src-tauri/target
key: target-check-${{ hashFiles('src-tauri/Cargo.lock') }}-${{ github.sha }}
restore-keys: |
target-check-${{ hashFiles('src-tauri/Cargo.lock') }}-
target-check-
- name: Install tools
run: scripts/ci-setup.sh
- name: Unit tests
+21
View File
@@ -24,6 +24,27 @@ jobs:
CARGO_BUILD_JOBS: "2"
steps:
- uses: actions/checkout@v4
- name: Restore tool cache
uses: actions/cache@v4
with:
# ~/.cache/cargo-xwin holds the Windows SDK files cargo-xwin downloads.
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
~/.rustup
~/.local/bin/mise
~/.local/share/mise
~/.cache/cargo-xwin
key: tools-release-${{ hashFiles('scripts/ci-setup.sh', 'mise.toml') }}
- name: Restore build cache
uses: actions/cache@v4
with:
path: src-tauri/target
key: target-release-${{ hashFiles('src-tauri/Cargo.lock') }}-${{ github.sha }}
restore-keys: |
target-release-${{ hashFiles('src-tauri/Cargo.lock') }}-
target-release-
- name: Install tools
run: scripts/ci-setup.sh --windows
- name: Take the version from the tag