Cache tools and Rust build output in CI and release builds
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user