-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
77 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,73 @@ | ||
os: Visual Studio 2015 | ||
image: Visual Studio 2017 | ||
environment: | ||
global: | ||
PROJECT_NAME: stevia | ||
RUSTUP_INIT_SKIP_MSVC_CHECK: 1 | ||
matrix: | ||
- TARGET: x86_64-pc-windows-msvc | ||
CHANNEL: stable | ||
- TARGET: x86_64-pc-windows-msvc | ||
CHANNEL: beta | ||
- TARGET: x86_64-pc-windows-msvc | ||
CHANNEL: nightly | ||
RUSTFLAGS: -Ctarget-feature=+crt-static | ||
matrix: | ||
- TARGET: x86_64-pc-windows-msvc | ||
ALLOW_PR: 1 | ||
- TARGET: i686-pc-windows-msvc | ||
BUILD_MSI: 1 | ||
ALLOW_PR: 1 | ||
- TARGET: i686-pc-windows-gnu | ||
MINGW_DIR: mingw32 | ||
ALLOW_PR: 1 | ||
- TARGET: x86_64-pc-windows-gnu | ||
MINGW_DIR: mingw64 | ||
ALLOW_PR: 1 | ||
branches: | ||
only: | ||
- master | ||
- auto | ||
|
||
install: | ||
- curl -sSf -o rustup-init.exe https://win.rustup.rs | ||
- rustup-init.exe --default-host %TARGET% --default-toolchain %CHANNEL% -y | ||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin | ||
- rustc -Vv | ||
- cargo -V | ||
# If this is a PR and we're not allowed to test PRs, skip the whole build. | ||
# Also if we're on the master branch no need to run the full test suite, so | ||
# just do a smoke test. | ||
- if defined APPVEYOR_PULL_REQUEST_NUMBER if NOT defined ALLOW_PR appveyor exit | ||
- if "%APPVEYOR_REPO_BRANCH%" == "master" if NOT defined ALLOW_PR appveyor exit | ||
|
||
test_script: | ||
- cargo build | ||
- cargo test | ||
# Install MSYS2 and MINGW (32-bit & 64-bit) | ||
- ps: | | ||
# Check if MSYS2 was restored from cache | ||
if($env:MINGW_DIR) { | ||
if($env:MINGW_DIR -eq "mingw32") { | ||
# Download and install MINGW (32-bit) | ||
Write-Host "Installing MinGW (32-bit)..." -ForegroundColor Cyan | ||
Write-Host "Downloading installation package..." | ||
appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z -FileName mingw.7z | ||
} elseif($env:MINGW_DIR -eq "mingw64") { | ||
# Download and install MINGW (64-bit) | ||
Write-Host "Installing MinGW (64-bit)..." -ForegroundColor Cyan | ||
Write-Host "Downloading installation package..." | ||
appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z -FileName mingw.7z | ||
} | ||
Write-Host "Extracting installation package..." | ||
7z x -y mingw.7z -oC:\msys64 | Out-Null | ||
del mingw.7z | ||
} else { | ||
Write-Host "MSYS2 not required" -ForegroundColor Green | ||
} | ||
# Install rust, x86_64-pc-windows-msvc host | ||
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe | ||
- rustup-init.exe -y --default-host=x86_64-pc-windows-msvc | ||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin | ||
|
||
# Install the target we're compiling for | ||
- if NOT "%TARGET%" == "x86_64-pc-windows-msvc" rustup target add %TARGET% | ||
|
||
# add mingw to PATH if necessary | ||
- if defined MINGW_DIR set PATH=C:\msys64\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH% | ||
|
||
# set cargo features for MSI if requested (otherwise empty string) | ||
- set FEATURES= | ||
- if defined BUILD_MSI set FEATURES=--features msi-installed | ||
|
||
# let's see what we got | ||
- where gcc rustc cargo | ||
- rustc -vV | ||
- cargo -vV | ||
|
||
# 'cargo test' takes care of building for us, so disable Appveyor's build stage. This prevents | ||
# the "directory does not contain a project or solution file" error. | ||
# source: https://github.com/starkat99/appveyor-rust/blob/master/appveyor.yml#L113 | ||
build: false | ||
|
||
# For now disable the AppVeyor cache since it seems to be causing build problems | ||
# but should eventually be re-enabled once the issues get resolved. | ||
cache: | ||
- C:\Users\appveyor\.cargo\registry | ||
# - target | ||
test_script: | ||
- cargo build | ||
- cargo test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters