environment:
  matrix:
  - TARGET: x86_64-pc-windows-gnu
    MSYS_BITS: 64
    ARCH: x86_64
  - TARGET: i686-pc-windows-gnu
    MSYS_BITS: 32
    ARCH: i686
  - TARGET: x86_64-pc-windows-msvc
  - TARGET: i686-pc-windows-msvc
install:
  - if NOT defined APPVEYOR_PULL_REQUEST_NUMBER if "%APPVEYOR_REPO_BRANCH%" == "master" appveyor exit
  - if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%;
  - 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 for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib"
  - rustc -V
  - cargo -V

build: false

test_script:
  - cargo -vv test --target %TARGET%
  - cargo -vv test --no-default-features --target %TARGET%
  - cargo -vv test --manifest-path libc-test/Cargo.toml --target %TARGET%
