Skip to content

Commit 9c21fe3

Browse files
authored
Merge pull request #373 from Michael-F-Bryan/appveyor
Updated appveyor.yml to use rustup for installing Rust
2 parents a220528 + eaec9ef commit 9c21fe3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

appveyor.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ environment:
2020

2121
# Install Rust and Cargo
2222
install:
23-
- ps: Start-FileDownload "https://static.rust-lang.org/dist/channel-rust-stable"
24-
- ps: $env:RUST_VERSION = Get-Content channel-rust-stable | select -first 1 | %{$_.split('-')[1]}
25-
- if NOT "%RUST_CHANNEL%" == "stable" set RUST_VERSION=%RUST_CHANNEL%
26-
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_VERSION}-${env:TARGET}.exe"
27-
- rust-%RUST_VERSION%-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
28-
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
29-
- rustc -V
23+
- ps: >-
24+
If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') {
25+
$Env:PATH += ';C:\msys64\mingw64\bin'
26+
} ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') {
27+
$Env:PATH += ';C:\msys64\mingw32\bin'
28+
}
29+
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
30+
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_CHANNEL%
31+
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
32+
- rustc -Vv
3033
- cargo -V
3134

3235
build: false

0 commit comments

Comments
 (0)