-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create separate action to setup python and rust in the cicd pi…
…peline (#2687) # Description The CI/CD pipeline currently contains some duplication; This PR proposes to simplify that a bit by creating a reusable action to set up Python and Rust. # Related Issue(s) <!--- For example: - closes #106 ---> # Documentation <!--- Share links to useful documentation --->
- Loading branch information
Showing
4 changed files
with
59 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: "Setup Python and Rust Environment" | ||
description: "Set up Python, virtual environment, and Rust toolchain" | ||
|
||
inputs: | ||
|
||
python-version: | ||
description: "The Python version to set up" | ||
required: true | ||
default: "3.10" | ||
|
||
rust-toolchain: | ||
description: "The Rust toolchain to set up" | ||
required: true | ||
default: "stable" | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
|
||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: ${{ inputs.rust-toolchain }} | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- uses: Swatinem/rust-cache@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters