fix: update workspace paths and optimize Rust caching in CI workflows

This commit is contained in:
t8y2
2026-05-05 21:45:17 +08:00
parent 15498b70fd
commit 8cc4dfb268
6 changed files with 19 additions and 110 deletions
+2 -4
View File
@@ -37,7 +37,7 @@ jobs:
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
workspaces: './ -> target'
shared-key: release-x86_64-unknown-linux-gnu
- name: Install system dependencies (Linux)
@@ -46,9 +46,7 @@ jobs:
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev
- name: Cargo fmt check
working-directory: src-tauri
run: cargo fmt --check
- name: Cargo check
working-directory: src-tauri
run: cargo check
run: cargo check --workspace --locked
+2 -2
View File
@@ -49,13 +49,13 @@ jobs:
id: deps-hash
shell: bash
run: |
hash=$(grep -v '^version = ' src-tauri/Cargo.lock | sha256sum | cut -d' ' -f1)
hash=$(grep -v '^version = ' Cargo.lock | sha256sum | cut -d' ' -f1)
echo "hash=${hash:0:20}" >> "$GITHUB_OUTPUT"
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
workspaces: './ -> target'
shared-key: release-${{ matrix.target }}-${{ steps.deps-hash.outputs.hash }}
cache-on-failure: true