From cf3d2fb622e768fd6f3804ad210f951ab2cb7ba7 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Thu, 11 Oct 2018 15:52:19 -0700 Subject: [PATCH 1/3] Update AppVeyor build script to use rustup. I agree to license my contributions to each file under the terms given at the top of each file I changed. --- mk/appveyor.bat | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mk/appveyor.bat b/mk/appveyor.bat index dbe38be75f..47a8e06a09 100644 --- a/mk/appveyor.bat +++ b/mk/appveyor.bat @@ -36,19 +36,21 @@ if %ERRORLEVEL% NEQ 0 ( exit 1 ) -set RUST_URL=https://static.rust-lang.org/dist/rust-%RUST%-%TARGET_ARCH%-pc-windows-msvc.msi -echo Downloading %RUST_URL%... mkdir build -powershell -Command "(New-Object Net.WebClient).DownloadFile('%RUST_URL%', 'build\rust-%RUST%-%TARGET_ARCH%-pc-windows-msvc.msi')" +set RUSTUP_URL=https://win.rustup.rs/%TARGET_ARCH% +set RUSTUP_EXE=build\rustup-init-%TARGET_ARCH%.exe +echo Downloading %RUSTUP_URL%... +powershell -Command "(New-Object Net.WebClient).DownloadFile('%RUSTUP_URL%', '%RUSTUP_EXE%')" if %ERRORLEVEL% NEQ 0 ( - echo ...downloading Rust failed. + echo ...downloading rustup failed. exit 1 ) -start /wait msiexec /i build\rust-%RUST%-%TARGET_ARCH%-pc-windows-msvc.msi INSTALLDIR="%TARGET_PROGRAM_FILES%\Rust %RUST%" /quiet /qn /norestart +set TARGET=%TARGET_ARCH%-pc-windows-msvc +%RUSTUP_EXE% -y --default-host %TARGET% --default-toolchain %RUST% if %ERRORLEVEL% NEQ 0 exit 1 -set PATH="%TARGET_PROGRAM_FILES%\Rust %RUST%\bin";%cd%\windows_build_tools;%PATH% +set PATH="C:\Users\appveyor\.cargo\bin";%cd%\windows_build_tools;%PATH% if [%Configuration%] == [Release] set CARGO_MODE=--release From 53e3b39576682c8a3f5d385d0bd9b0611f3912f1 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Tue, 9 Oct 2018 15:23:50 -0700 Subject: [PATCH 2/3] Use channel not version number for stable rust on AppVeyor. I agree to license my contributions to each file under the terms given at the top of each file I changed. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 47738c6a98..b5816f7867 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,7 @@ platform: environment: matrix: - TOOLCHAIN_VERSION: 14.0 - RUST: 1.26.0 + RUST: stable - TOOLCHAIN_VERSION: 14.0 RUST: beta - TOOLCHAIN_VERSION: 14.0 From d8bffeb91bd066f87ec767ae92fb87ffcf245d71 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Thu, 11 Oct 2018 16:12:40 -0700 Subject: [PATCH 3/3] Use %USERPROFILE% instead of hardcoded path to .cargo/bin. I agree to license my contributions to each file under the terms given at the top of each file I changed. --- mk/appveyor.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/appveyor.bat b/mk/appveyor.bat index 47a8e06a09..88eb7f21b5 100644 --- a/mk/appveyor.bat +++ b/mk/appveyor.bat @@ -50,7 +50,7 @@ set TARGET=%TARGET_ARCH%-pc-windows-msvc %RUSTUP_EXE% -y --default-host %TARGET% --default-toolchain %RUST% if %ERRORLEVEL% NEQ 0 exit 1 -set PATH="C:\Users\appveyor\.cargo\bin";%cd%\windows_build_tools;%PATH% +set PATH=%USERPROFILE%\.cargo\bin;%cd%\windows_build_tools;%PATH% if [%Configuration%] == [Release] set CARGO_MODE=--release