1# version string format -- This will be overwritten later anyway
2version: "{build}"
3
4# We need a more up to date pip because Python 2.7 is EOL soon
5init:
6  - set PATH=C:\Python35\Scripts;%PATH%
7
8
9branches:
10  except:
11    - /dev-travis.+/
12
13os:
14  - Visual Studio 2017
15  - Visual Studio 2015
16
17environment:
18    matrix:
19        - additional_flags: "/permissive- /std:c++latest"
20          wmain: 0
21
22        - additional_flags: ""
23          wmain: 0
24
25        - additional_flags: "/D_UNICODE /DUNICODE"
26          wmain: 1
27          coverage: 0
28
29        # Have a coverage dimension
30        - additional_flags: ""
31          wmain: 0
32          coverage: 1
33
34        # Have an examples dimension
35        - additional_flags: ""
36          wmain: 0
37          examples: 1
38
39
40matrix:
41    exclude:
42        - os: Visual Studio 2015
43          additional_flags: "/permissive- /std:c++latest"
44
45        - os: Visual Studio 2015
46          additional_flags: "/D_UNICODE /DUNICODE"
47
48        # Exclude unwanted coverage configurations
49        - coverage: 1
50          platform: Win32
51
52        - coverage: 1
53          os: Visual Studio 2015
54
55        - coverage: 1
56          configuration: Release
57
58        # Exclude unwanted examples configurations
59        - examples: 1
60          platform: Win32
61
62        - examples: 1
63          os: Visual Studio 2015
64
65        - examples: 1
66          configuration: Release
67
68
69install:
70  - ps: if (($env:CONFIGURATION) -eq "Debug" -And ($env:coverage) -eq "1" ) { pip --disable-pip-version-check install codecov }
71  - ps: if (($env:CONFIGURATION) -eq "Debug" -And ($env:coverage) -eq "1" ) { .\misc\installOpenCppCoverage.ps1 }
72
73# Win32 and x64 are CMake-compatible solution platform names.
74# This allows us to pass %PLATFORM% to CMake -A.
75platform:
76  - Win32
77  - x64
78
79# build Configurations, i.e. Debug, Release, etc.
80configuration:
81  - Debug
82  - Release
83
84#Cmake will autodetect the compiler, but we set the arch
85before_build:
86  - set CXXFLAGS=%additional_flags%
87  # Indirection because appveyor doesn't handle multiline batch scripts properly
88  # https://stackoverflow.com/questions/37627248/how-to-split-a-command-over-multiple-lines-in-appveyor-yml/37647169#37647169
89  # https://help.appveyor.com/discussions/questions/3888-multi-line-cmd-or-powershell-warning-ignore
90  - cmd: .\misc\appveyorBuildConfigurationScript.bat
91
92
93# build with MSBuild
94build:
95  project: Build\Catch2.sln             # path to Visual Studio solution or project
96  parallel: true                        # enable MSBuild parallel builds
97  verbosity: normal                     # MSBuild verbosity level {quiet|minimal|normal|detailed}
98
99test_script:
100  - set CTEST_OUTPUT_ON_FAILURE=1
101  - cmd: .\misc\appveyorTestRunScript.bat
102