environment:
  matrix:
  - TARGET: x86_64-pc-windows-gnu
    MSYS_BITS: 64
  - TARGET: i686-pc-windows-gnu
    MSYS_BITS: 32
  - TARGET: x86_64-pc-windows-msvc
  - TARGET: i686-pc-windows-msvc
  - TARGET: x86_64-pc-windows-msvc
    VCPKG_DEFAULT_TRIPLET: x64-windows-static
    RUSTFLAGS: -Ctarget-feature=+crt-static
install:
  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
  - set PATH=%PATH%;C:\Program Files (x86)\Rust\bin
  - if defined MSYS_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin
  - rustc -V
  - cargo -V
  - if defined VCPKG_DEFAULT_TRIPLET git clone https://github.com/Microsoft/vcpkg c:\projects\vcpkg
  - if defined VCPKG_DEFAULT_TRIPLET c:\projects\vcpkg\bootstrap-vcpkg.bat
  - if defined VCPKG_DEFAULT_TRIPLET set VCPKG_ROOT=c:\projects\vcpkg
  - if defined VCPKG_DEFAULT_TRIPLET %VCPKG_ROOT%\vcpkg.exe install zlib

build: false

test_script:
  - cargo test --target %TARGET%
  - cargo run --manifest-path systest/Cargo.toml --target %TARGET%
