Skip to content

Commit 320df78

Browse files
refactor: remove explicit rust-toolchain install, rely on preinstalled version
1 parent 85ee789 commit 320df78

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

.github/workflows/rust-build.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Build, Test and Publish Rust Package
33
on:
44
workflow_call:
55
inputs:
6-
rust-version:
7-
description: 'Rust version to use'
8-
default: 'stable'
9-
type: string
106
working-directory:
117
description: 'The directory to run jobs from'
128
default: '.'
@@ -34,11 +30,8 @@ jobs:
3430
- name: Checkout repository
3531
uses: actions/checkout@v4
3632

37-
- name: Install Rust toolchain
38-
uses: dtolnay/rust-toolchain@stable
39-
with:
40-
toolchain: ${{ inputs.rust-version }}
41-
components: clippy, rustfmt, cargo
33+
- name: Add clippy and rustfmt
34+
run: rustup component add clippy rustfmt
4235

4336
- name: Cache dependencies
4437
if: ${{ inputs.enable-cache }}

rust-build/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
build-and-test:
2323
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/rust-build.yml@main
2424
with:
25-
rust-version: 'stable'
2625
working-directory: './my-crate'
2726
enable-cache: true
2827
publish-crates-io: false
@@ -34,7 +33,6 @@ jobs:
3433
3534
| Name | Description | Default | Required |
3635
| ------------------- | --------------------------------------------------------- | -------- | -------- |
37-
| `rust-version` | Rust version to use | `stable` | No |
3836
| `working-directory` | The directory to run jobs from | `.` | No |
3937
| `enable-cache` | Enable caching of dependencies | `true` | No |
4038
| `publish-crates-io` | Publish the package to crates.io (only if build succeeds) | `false` | No |

0 commit comments

Comments
 (0)