image: Visual Studio 2017
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc
CHANNEL: stable
CARGO_CHECK: cargo check --tests
CARGO_FMT: cargo fmt -- --write-mode diff
- TARGET: x86_64-pc-windows-msvc
CHANNEL: beta
CARGO_CHECK: cargo check --tests
CARGO_FMT: cargo fmt -- --check
- TARGET: x86_64-pc-windows-msvc
CHANNEL: nightly
CARGO_FMT: cargo fmt -- --check
matrix:
allow_failures:
- CHANNEL: beta
- CHANNEL: nightly
install:
- SET PATH=%USERPROFILE%\.cargo\bin;%PATH%
- ps: Start-FileDownload "https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe"
- rustup-init.exe -y --no-modify-path --default-host %TARGET% --default-toolchain %CHANNEL%
- rustup -vV
- rustc -vV
- cargo -vV
- rustup component add rustfmt-preview
- cargo fmt -v --version
- IF "%CHANNEL%"=="nightly" cargo install --git https://github.com/rust-lang-nursery/rust-clippy.git clippy && cargo clippy -V
- choco uninstall vswhere -y
- SET VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
- ps: Start-FileDownload "https://github.com/Microsoft/vswhere/releases/download/2.5.2/vswhere.exe"
- MOVE /Y vswhere.exe "%VSWHERE%"
- "\"%VSWHERE%\" -?"
- SET VSWHERE=
build_script:
- "%CARGO_FMT%"
- "%CARGO_CHECK%"
- cargo doc --no-deps
test_script:
- cargo test
- choco install vswhere --version=2.5.2 -y
- vswhere.exe -?
- cargo test