mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
chore(ci): update Rust cache configuration in autobuild and lint-clippy workflows for improved efficiency
This commit is contained in:
27
.github/workflows/autobuild.yml
vendored
27
.github/workflows/autobuild.yml
vendored
@@ -156,10 +156,13 @@ jobs:
|
|||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: src-tauri
|
|
||||||
cache-all-crates: true
|
|
||||||
save-if: ${{ github.ref == 'refs/heads/dev' }}
|
save-if: ${{ github.ref == 'refs/heads/dev' }}
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**Cargo.lock') }}
|
prefix-key: "v1-rust"
|
||||||
|
key: "rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}"
|
||||||
|
workspaces: |
|
||||||
|
. -> target
|
||||||
|
cache-all-crates: false
|
||||||
|
cache-workspace-crates: true
|
||||||
|
|
||||||
- name: Install dependencies (ubuntu only)
|
- name: Install dependencies (ubuntu only)
|
||||||
if: matrix.os == 'ubuntu-22.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
@@ -264,10 +267,13 @@ jobs:
|
|||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: src-tauri
|
|
||||||
cache-all-crates: true
|
|
||||||
save-if: ${{ github.ref == 'refs/heads/dev' }}
|
save-if: ${{ github.ref == 'refs/heads/dev' }}
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**Cargo.lock') }}
|
prefix-key: "v1-rust"
|
||||||
|
key: "rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}"
|
||||||
|
workspaces: |
|
||||||
|
. -> target
|
||||||
|
cache-all-crates: false
|
||||||
|
cache-workspace-crates: true
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
@@ -411,10 +417,13 @@ jobs:
|
|||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: src-tauri
|
|
||||||
cache-all-crates: true
|
|
||||||
save-if: ${{ github.ref == 'refs/heads/dev' }}
|
save-if: ${{ github.ref == 'refs/heads/dev' }}
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**Cargo.lock') }}
|
prefix-key: "v1-rust"
|
||||||
|
key: "rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}"
|
||||||
|
workspaces: |
|
||||||
|
. -> target
|
||||||
|
cache-all-crates: false
|
||||||
|
cache-workspace-crates: true
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
|
|||||||
11
.github/workflows/lint-clippy.yml
vendored
11
.github/workflows/lint-clippy.yml
vendored
@@ -58,10 +58,13 @@ jobs:
|
|||||||
- name: Rust Cache
|
- name: Rust Cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: src-tauri
|
save-if: ${{ github.ref == 'refs/heads/dev' }}
|
||||||
cache-all-crates: true
|
prefix-key: "v1-rust"
|
||||||
save-if: false
|
key: "rust-shared-stable-${{ matrix.os }}-${{ matrix.target }}"
|
||||||
key: ${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**Cargo.lock') }}
|
workspaces: |
|
||||||
|
. -> target
|
||||||
|
cache-all-crates: false
|
||||||
|
cache-workspace-crates: true
|
||||||
|
|
||||||
- name: Install dependencies (ubuntu only)
|
- name: Install dependencies (ubuntu only)
|
||||||
if: matrix.os == 'ubuntu-22.04'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
|||||||
Reference in New Issue
Block a user