File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ name: Build, Test and Publish Rust Package
33on :
44 workflow_call :
55 inputs :
6+ rust-version :
7+ description : ' Rust version to use'
8+ default : ' stable'
9+ type : string
610 working-directory :
711 description : ' The directory to run jobs from'
812 default : ' .'
3034 - name : Checkout repository
3135 uses : actions/checkout@v4
3236
33- - name : Add clippy and rustfmt
34- run : rustup component add clippy rustfmt
37+ - name : Install Rust toolchain
38+ uses : dtolnay/rust-toolchain@stable
39+ with :
40+ toolchain : ${{ inputs.rust-version }}
41+ components : clippy, rustfmt, cargo
3542
3643 - name : Cache dependencies
3744 if : ${{ inputs.enable-cache }}
Original file line number Diff line number Diff line change 2222 build-and-test :
2323 uses : iExecBlockchainComputing/github-actions-workflows/.github/workflows/rust-build.yml@main
2424 with :
25+ rust-version : ' stable'
2526 working-directory : ' ./my-crate'
2627 enable-cache : true
2728 publish-crates-io : false
3334
3435| Name | Description | Default | Required |
3536| ------------------- | --------------------------------------------------------- | -------- | -------- |
37+ | ` rust-version` | Rust version to use | `stable` | No |
3638| `working-directory` | The directory to run jobs from | `.` | No |
3739| `enable-cache` | Enable caching of dependencies | `true` | No |
3840| `publish-crates-io` | Publish the package to crates.io (only if build succeeds) | `false` | No |
You can’t perform that action at this time.
0 commit comments