fix: add caching for Cargo registry and build artifacts in Tauri workflow
This commit is contained in:
64
.github/workflows/tauri.yml
vendored
64
.github/workflows/tauri.yml
vendored
@@ -21,6 +21,20 @@ jobs:
|
|||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
components: llvm-tools-preview
|
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
|
- name: Install cinny dependencies
|
||||||
run: cd cinny && npm ci
|
run: cd cinny && npm ci
|
||||||
- name: Install tauri dependencies
|
- name: Install tauri dependencies
|
||||||
@@ -76,6 +90,20 @@ jobs:
|
|||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
components: llvm-tools-preview
|
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
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -130,6 +158,20 @@ jobs:
|
|||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
target: aarch64-apple-darwin,x86_64-apple-darwin
|
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
|
- name: Install cinny dependencies
|
||||||
run: cd cinny && npm ci
|
run: cd cinny && npm ci
|
||||||
- name: Install tauri dependencies
|
- name: Install tauri dependencies
|
||||||
@@ -185,6 +227,28 @@ jobs:
|
|||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: aarch64-linux-android
|
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
|
- name: Install NDK
|
||||||
run: sdkmanager "ndk;27.0.11902837"
|
run: sdkmanager "ndk;27.0.11902837"
|
||||||
- name: Install cinny dependencies
|
- name: Install cinny dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user