Skip to content

Commit d8b2468

Browse files
committed
Install rustup on windows (including ARM)
The x86 logic might be overkill since right now x86 Windows images already have it installed, but figured might as well support it just in case. Closes #143
1 parent 56f8432 commit d8b2468

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ runs:
7575
if: runner.os != 'Windows'
7676
shell: bash
7777
78+
- run: |
79+
: install rustup if needed on windows
80+
if ! command -v rustup &>/dev/null; then
81+
curl -LOs https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe
82+
./rustup-init.exe -y --default-toolchain none --no-modify-path
83+
echo "$USERPROFILE/.cargo/bin" >> "$GITHUB_PATH"
84+
fi
85+
if: runner.os == 'Windows'
86+
shell: bash
87+
7888
- name: rustup toolchain install ${{steps.parse.outputs.toolchain}}
7989
run: rustup toolchain install ${{steps.parse.outputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update
8090
shell: bash

0 commit comments

Comments
 (0)