Skip to content

Commit 93024fd

Browse files
committed
Don't cache Rust binaries in CI. Define Rust toolchain profile. Upgrade and pin actions-rust-lang/setup-rust-toolchain
1 parent fcac810 commit 93024fd

File tree

8 files changed

+22
-20
lines changed

8 files changed

+22
-20
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Set Up Rust
2+
description: Installs the Rust toolchain
3+
inputs:
4+
target:
5+
description: The `target` to pass to rustup when installing the toolchain
6+
required: false
7+
runs:
8+
using: composite
9+
steps:
10+
# v1.12.0
11+
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9
12+
with:
13+
cache-bin: false
14+
target: ${{ inputs.target }}

.github/workflows/check-regressions.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ jobs:
3939
with:
4040
ref: main
4141

42-
- name: Set up Rust
43-
uses: actions-rust-lang/[email protected]
42+
- uses: ./.github/actions/set-up-rust
4443

4544
- name: Checkout test repositories
4645
uses: actions/checkout@v4

.github/workflows/integration-tests.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
name: Run integration test - ${{ matrix.scripts.gha_alias }}
3636
steps:
3737
- uses: actions/checkout@v4
38-
- name: Set up Rust
39-
uses: actions-rust-lang/[email protected]
38+
- uses: ./.github/actions/set-up-rust
4039
- name: Execute script
4140
run: ${{ matrix.scripts.file }}

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ jobs:
5151
- name: Checkout repository
5252
uses: actions/checkout@v4
5353

54-
- name: Set up Rust
55-
uses: actions-rust-lang/[email protected]
54+
- uses: ./.github/actions/set-up-rust
5655
with:
5756
target: ${{ matrix.target }}
5857

.github/workflows/rust.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ jobs:
3333
- name: Checkout repository
3434
uses: actions/checkout@v4
3535

36-
- name: Set up Rust
37-
uses: actions-rust-lang/[email protected]
36+
- uses: ./.github/actions/set-up-rust
3837

3938
- name: Fetch dependencies
4039
run: cargo fetch

.github/workflows/sca.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ jobs:
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
15-
- name: Set up Rust
16-
uses: actions-rust-lang/[email protected]
17-
with:
18-
components: clippy
15+
- uses: ./.github/actions/set-up-rust
1916
- name: cargo install sbom
2017
run: cargo install --version 0.8.4 cargo-sbom
2118
- name: cargo generate sbom

.github/workflows/test-rules.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ jobs:
5757
- name: Checkout repository
5858
uses: actions/checkout@v4
5959

60-
- name: Set up Rust
61-
uses: actions-rust-lang/[email protected]
62-
with:
63-
components: clippy
60+
- uses: ./.github/actions/set-up-rust
6461

6562
- name: Fetch dependencies
6663
run: cargo fetch
@@ -83,10 +80,7 @@ jobs:
8380
- name: Checkout repository
8481
uses: actions/checkout@v4
8582

86-
- name: Set up Rust
87-
uses: actions-rust-lang/[email protected]
88-
with:
89-
components: clippy
83+
- uses: ./.github/actions/set-up-rust
9084

9185
- name: Fetch dependencies
9286
run: cargo fetch

rust-toolchain.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[toolchain]
22
channel = "1.86"
3+
profile = "default"

0 commit comments

Comments
 (0)