Skip to content

Commit 42914e0

Browse files
committed
chore(github): cache ci but not release
1 parent ce8849e commit 42914e0

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

.github/actions/setup-rust-build/action.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ inputs:
55
target:
66
description: Rust compilation target triple
77
required: true
8+
cache:
9+
description: Use shared cargo cache (set to 'false' for release builds)
10+
required: false
11+
default: 'true'
812

913
runs:
1014
using: composite
@@ -15,7 +19,8 @@ runs:
1519
components: rustfmt, clippy
1620
- shell: bash
1721
run: rustup target add ${{ inputs.target }}
18-
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
22+
- if: inputs.cache == 'true'
23+
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
1924
- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
2025
with:
2126
just-version: 1.35.0

.github/workflows/ci.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
- name: Install pnpm
29+
uses: pnpm/action-setup@v4
30+
with:
31+
version: 11.1.2
2832
- name: Install node
2933
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3034
with:
3135
node-version: 24
3236
registry-url: "https://registry.npmjs.org"
33-
- name: Install pnpm
34-
run: npm install -g pnpm@11.1.2
37+
cache: pnpm
3538
- name: Set up Rust build
3639
uses: ./.github/actions/setup-rust-build
3740
with:

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
uses: ./.github/actions/setup-rust-build
3636
with:
3737
target: ${{ matrix.build.TARGET }}
38+
cache: "false"
3839
- name: Build Rust binary
3940
uses: ./.github/actions/build-rust-binary
4041
with:

.github/workflows/test-release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
uses: ./.github/actions/setup-rust-build
3333
with:
3434
target: ${{ matrix.build.TARGET }}
35+
cache: "false"
3536
- name: Build Rust binary
3637
uses: ./.github/actions/build-rust-binary
3738
with:

0 commit comments

Comments
 (0)