diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8731eb8a84..4a32a0e840 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -51,3 +51,15 @@ jobs: name: playwright-nightly-${{ github.run_id }} path: frontend/editor/playwright-report/ retention-days: 14 + + # Builds all desktop platforms on a schedule so the Rust dependency cache is + # written on main, where PR and merge-queue tauri builds can restore it. + warm-tauri-cache: + name: Warm Tauri Rust cache + permissions: + contents: read + pull-requests: write + uses: ./.github/workflows/tauri-build.yml + with: + platform: all + secrets: inherit diff --git a/.github/workflows/tauri-build.yml b/.github/workflows/tauri-build.yml index 8968df4250..65b1e40f36 100644 --- a/.github/workflows/tauri-build.yml +++ b/.github/workflows/tauri-build.yml @@ -122,7 +122,12 @@ jobs: uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: workspaces: frontend/editor/src-tauri + # Stable key shared across workflows so the nightly warmer. + # rust-cache still appends OS + rustc + Cargo.lock. + shared-key: tauri-${{ matrix.name }} save-if: ${{ github.ref == 'refs/heads/main' }} + # Save the dependency cache even if a later step fails + cache-on-failure: true - name: Set up x86_64 JDK 25 (macOS universal JRE) if: matrix.platform == 'macos-15'