From 28f3044bddd6ad98bace1438bb11b43cb160562b Mon Sep 17 00:00:00 2001 From: Sukka Date: Sun, 30 Jun 2024 17:21:55 +0800 Subject: [PATCH] ci: speed up cargo install by enabling cache (#1279) --- .github/workflows/alpha.yml | 8 +++++++- .github/workflows/release.yml | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 6579df0a..b799e0e4 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -46,9 +46,15 @@ jobs: uses: Swatinem/rust-cache@v2 with: workspaces: src-tauri + cache-all-crates: true + cache-on-failure: true - name: Install Tauri CLI - run: cargo install --git https://github.com/tauri-apps/tauri --branch 1.x tauri-cli + uses: baptiste0928/cargo-install@v3 + with: + crate: tauri-cli + git: https://github.com/tauri-apps/tauri + branch: 1.x # `branch` and `commit` are also supported - name: Install Node uses: actions/setup-node@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e51a767..8f9ac8e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,9 +39,14 @@ jobs: uses: Swatinem/rust-cache@v2 with: workspaces: src-tauri + cache-all-crates: true - name: Install Tauri CLI - run: cargo install --git https://github.com/tauri-apps/tauri --branch 1.x tauri-cli + uses: baptiste0928/cargo-install@v3 + with: + crate: tauri-cli + git: https://github.com/tauri-apps/tauri + branch: 1.x # `branch` and `commit` are also supported - name: Install Node uses: actions/setup-node@v4