1version: 1.0.{build}
2image:
3- Visual Studio 2017
4- Visual Studio 2015
5test: off
6skip_branch_with_pr: true
7build:
8  parallel: true
9platform:
10- x64
11- x86
12environment:
13  matrix:
14  - PYTHON: 36
15    CPP: 14
16    CONFIG: Debug
17  - PYTHON: 27
18    CPP: 14
19    CONFIG: Debug
20  - CONDA: 36
21    CPP: latest
22    CONFIG: Release
23matrix:
24  exclude:
25    - image: Visual Studio 2015
26      platform: x86
27    - image: Visual Studio 2015
28      CPP: latest
29    - image: Visual Studio 2017
30      CPP: latest
31      platform: x86
32install:
33- ps: |
34    if ($env:PLATFORM -eq "x64") { $env:CMAKE_ARCH = "x64" }
35    if ($env:APPVEYOR_JOB_NAME -like "*Visual Studio 2017*") {
36      $env:CMAKE_GENERATOR = "Visual Studio 15 2017"
37      $env:CMAKE_INCLUDE_PATH = "C:\Libraries\boost_1_64_0"
38      $env:CXXFLAGS = "-permissive-"
39    } else {
40      $env:CMAKE_GENERATOR = "Visual Studio 14 2015"
41    }
42    if ($env:PYTHON) {
43      if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" }
44      $env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH"
45      python -W ignore -m pip install --upgrade pip wheel
46      python -W ignore -m pip install pytest numpy --no-warn-script-location
47    } elseif ($env:CONDA) {
48      if ($env:CONDA -eq "27") { $env:CONDA = "" }
49      if ($env:PLATFORM -eq "x64") { $env:CONDA = "$env:CONDA-x64" }
50      $env:PATH = "C:\Miniconda$env:CONDA\;C:\Miniconda$env:CONDA\Scripts\;$env:PATH"
51      $env:PYTHONHOME = "C:\Miniconda$env:CONDA"
52      conda --version
53      conda install -y -q pytest numpy scipy
54    }
55- ps: |
56    Start-FileDownload 'http://bitbucket.org/eigen/eigen/get/3.3.3.zip'
57    7z x 3.3.3.zip -y > $null
58    $env:CMAKE_INCLUDE_PATH = "eigen-eigen-67e894c6cd8f;$env:CMAKE_INCLUDE_PATH"
59build_script:
60- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%"
61    -DPYBIND11_CPP_STANDARD=/std:c++%CPP%
62    -DPYBIND11_WERROR=ON
63    -DDOWNLOAD_CATCH=ON
64    -DCMAKE_SUPPRESS_REGENERATION=1
65    .
66- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
67- cmake --build . --config %CONFIG% --target pytest -- /m /v:m /logger:%MSBuildLogger%
68- cmake --build . --config %CONFIG% --target cpptest -- /m /v:m /logger:%MSBuildLogger%
69- if "%CPP%"=="latest" (cmake --build . --config %CONFIG% --target test_cmake_build -- /m /v:m /logger:%MSBuildLogger%)
70on_failure: if exist "tests\test_cmake_build" type tests\test_cmake_build\*.log*
71