mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2024-11-22 08:49:30 +01:00
Attempt to install rustup when not present
This commit is contained in:
parent
88e7c2e1da
commit
6b014e5670
1 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,14 @@ runs:
|
||||||
targets: ${{inputs.target}}
|
targets: ${{inputs.target}}
|
||||||
components: ${{inputs.components}}
|
components: ${{inputs.components}}
|
||||||
shell: bash
|
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 "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
fi
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
shell: bash
|
||||||
- name: rustup toolchain install ${{inputs.toolchain}}
|
- 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
|
run: rustup toolchain install ${{inputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Reference in a new issue