diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f132fc3..0472101 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,10 +99,12 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + # Workspace is at the repo root; target dir is ./target (not + # src-tauri/target). See note in check.yml for details. - name: Cache Rust uses: Swatinem/rust-cache@v2 with: - workspaces: src-tauri -> target + workspaces: . shared-key: kon-build-${{ matrix.os }} - name: Install JS deps diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7a1607b..834464f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -72,14 +72,18 @@ jobs: # Cache the Cargo target dir + registry per OS so the heavy # whisper-rs-sys C++ build only happens on a clean cache. + # The workspace root is the repo root (see //Cargo.toml), so target/ + # lives at ./target — NOT src-tauri/target. Pointing the cache at + # src-tauri/target produced silent cache misses on every run and was + # the real reason Windows check times felt like they compiled sqlx + # from scratch every time. Use the repo root as the workspace hint. - name: Cache Rust artifacts uses: Swatinem/rust-cache@v2 with: - workspaces: src-tauri -> target + workspaces: . shared-key: kon-${{ matrix.os }} - name: cargo check (workspace) - working-directory: src-tauri run: cargo check --workspace --all-targets frontend: