Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Cache Rust build to improve Tauri build job times (#6732)

James Bruntonb9ea9064c732
diff --git a/.github/workflows/tauri-build.yml b/.github/workflows/tauri-build.yml
index d8bece6803..8968df4250 100644
--- a/.github/workflows/tauri-build.yml
+++ b/.github/workflows/tauri-build.yml
@@ -115,6 +115,15 @@ jobs:
toolchain: stable
targets: ${{ matrix.platform == 'macos-15' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
+ # Cache the Cargo registry and compiled dependency crates so the build
+ # only recompiles the app crate. Written on main; PRs and the merge queue
+ # restore from it.
+ - name: Cache Rust build
+ uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
+ with:
+ workspaces: frontend/editor/src-tauri
+ save-if: ${{ github.ref == 'refs/heads/main' }}
+
- name: Set up x86_64 JDK 25 (macOS universal JRE)
if: matrix.platform == 'macos-15'
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0