From d16a55e06dd0973e7d1e64ec4dd665eb8eb4eca4 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Sun, 25 Jan 2026 00:31:54 +1100 Subject: [PATCH] fix: add caching for Cargo registry and build artifacts in Tauri workflow --- .github/workflows/tauri.yml | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/.github/workflows/tauri.yml b/.github/workflows/tauri.yml index 7db0ca1..7fb6fe7 100644 --- a/.github/workflows/tauri.yml +++ b/.github/workflows/tauri.yml @@ -21,6 +21,20 @@ jobs: uses: dtolnay/rust-toolchain@stable with: components: llvm-tools-preview + - name: Cache Cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: cargo-registry-${{ runner.os }} + restore-keys: cargo-registry- + - name: Cache Cargo build + uses: actions/cache@v4 + with: + path: src-tauri/target + key: cargo-build-windows-${{ runner.os }} + restore-keys: cargo-build-windows- - name: Install cinny dependencies run: cd cinny && npm ci - name: Install tauri dependencies @@ -76,6 +90,20 @@ jobs: uses: dtolnay/rust-toolchain@stable with: components: llvm-tools-preview + - name: Cache Cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: cargo-registry-${{ runner.os }} + restore-keys: cargo-registry- + - name: Cache Cargo build + uses: actions/cache@v4 + with: + path: src-tauri/target + key: cargo-build-linux-${{ runner.os }} + restore-keys: cargo-build-linux- - name: Install dependencies run: | sudo apt-get update @@ -130,6 +158,20 @@ jobs: uses: dtolnay/rust-toolchain@stable with: target: aarch64-apple-darwin,x86_64-apple-darwin + - name: Cache Cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: cargo-registry-${{ runner.os }} + restore-keys: cargo-registry- + - name: Cache Cargo build + uses: actions/cache@v4 + with: + path: src-tauri/target + key: cargo-build-macos-${{ runner.os }} + restore-keys: cargo-build-macos- - name: Install cinny dependencies run: cd cinny && npm ci - name: Install tauri dependencies @@ -185,6 +227,28 @@ jobs: uses: dtolnay/rust-toolchain@stable with: targets: aarch64-linux-android + - name: Cache Cargo registry + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: cargo-registry-${{ runner.os }} + restore-keys: cargo-registry- + - name: Cache Cargo build + uses: actions/cache@v4 + with: + path: src-tauri/target + key: cargo-build-android-${{ runner.os }} + restore-keys: cargo-build-android- + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }} + restore-keys: gradle- - name: Install NDK run: sdkmanager "ndk;27.0.11902837" - name: Install cinny dependencies