Install rustup if not available, Linux only
The original code stems from this PR: https://github.com/dtolnay/rust-toolchain/pull/8
This commit is contained in:
parent
5c0654516c
commit
8ba04cb6f2
|
@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
* Install rustup if not available in the CI environment. (Linux only)
|
||||
The code is taken from this issue: <https://github.com/dtolnay/rust-toolchain/pull/8>
|
||||
|
||||
## [1.0.1] - 2022-04-20
|
||||
|
||||
### Added
|
||||
|
|
|
@ -47,6 +47,14 @@ runs:
|
|||
targets: ${{inputs.target}}
|
||||
components: ${{inputs.components}}
|
||||
shell: bash
|
||||
- name: Install rustup, if needed
|
||||
run: |
|
||||
if ! command -v rustup &> /dev/null ; then
|
||||
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
||||
echo "${CARGO_HOME:-~/.cargo}/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
- name: rustup toolchain install ${{inputs.toolchain}}
|
||||
run: |
|
||||
rustup toolchain install ${{inputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
|
||||
|
|
Loading…
Reference in New Issue