forked from doctest/doctest
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
95 lines (89 loc) · 3.61 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# http://www.appveyor.com/docs/appveyor-yml
notifications:
- provider: Email
on_build_status_changed: false
on_build_failure: false
on_build_success: false
# gitter
- provider: Webhook
url: https://webhooks.gitter.im/e/3a78202a235c0325e516
on_build_status_changed: true
on_build_failure: true
on_build_success: false
clone_depth: 500
branches:
except:
- gh-pages
- coverity_scan
matrix:
fast_finish: false
environment:
matrix:
- gen: "MinGW Makefiles"
- gen: "Visual Studio 14 2015"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- gen: "Visual Studio 15 2017"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- gen: "Visual Studio 16 2019"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
install:
- IF "%gen%" == "MinGW Makefiles" appveyor-retry appveyor DownloadFile http://downloads.sourceforge.net/mingw-w64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
- IF "%gen%" == "MinGW Makefiles" 7z x x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z -oc:\mingw > nul
build_script:
- cmake --version
# workaround for CMake not wanting sh.exe on PATH for MinGW
- IF "%gen%" == "MinGW Makefiles" set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- IF "%gen%" == "MinGW Makefiles" set PATH=C:\mingw\mingw64\bin;%PATH%
# generate and build everything for debug and release
- IF "%gen%" == "MinGW Makefiles" mkdir debug_64
- IF "%gen%" == "MinGW Makefiles" cd debug_64
- IF "%gen%" == "MinGW Makefiles" cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug
- IF "%gen%" == "MinGW Makefiles" cmake --build .
- IF "%gen%" == "MinGW Makefiles" cd ..
- IF "%gen%" == "MinGW Makefiles" mkdir release_64
- IF "%gen%" == "MinGW Makefiles" cd release_64
- IF "%gen%" == "MinGW Makefiles" cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
- IF "%gen%" == "MinGW Makefiles" cmake --build .
- IF "%gen%" == "MinGW Makefiles" cd ..
# adding git to the path again - for the dos2unix tool
- IF "%gen%" == "MinGW Makefiles" set PATH=%PATH%;C:\Program Files\Git\usr\bin
# execute tests
- IF "%gen%" == "MinGW Makefiles" cd debug_64
- IF "%gen%" == "MinGW Makefiles" ctest -j2 --output-on-failure
- IF "%gen%" == "MinGW Makefiles" cd ..
- IF "%gen%" == "MinGW Makefiles" cd release_64
- IF "%gen%" == "MinGW Makefiles" ctest -j2 --output-on-failure
- IF "%gen%" == "MinGW Makefiles" cd ..
- IF "%gen%" == "MinGW Makefiles" appveyor exit
# ============= VISUAL STUDIO
- mkdir debug_64
- cd debug_64
- cmake .. -G "%gen%" -A x64
- msbuild doctest.sln /p:Configuration=Debug;Platform=x64 /maxcpucount
- ctest -C Debug -j2 --output-on-failure
- cd ..
- mkdir release_64
- cd release_64
- cmake .. -G "%gen%" -A x64
- msbuild doctest.sln /p:Configuration=Release;Platform=x64 /maxcpucount
- ctest -C Release -j2 --output-on-failure
- cd ..
# x86
- mkdir debug_86
- cd debug_86
- cmake .. -G "%gen%" -A Win32
- msbuild doctest.sln /p:Configuration=Debug;Platform=Win32 /maxcpucount
- ctest -C Debug -j2 --output-on-failure
- cd ..
- mkdir release_86
- cd release_86
- cmake .. -G "%gen%" -A Win32
- msbuild doctest.sln /p:Configuration=Release;Platform=Win32 /maxcpucount
- ctest -C Release -j2 --output-on-failure
- cd ..
# static code analysis
- IF "%gen%" == "Visual Studio 15 2017" mkdir analysis
- IF "%gen%" == "Visual Studio 15 2017" cd analysis
- IF "%gen%" == "Visual Studio 15 2017" cmake .. -G "%gen%" -A x64
- IF "%gen%" == "Visual Studio 15 2017" msbuild doctest.sln /p:Configuration=Debug;Platform=x64 /maxcpucount /p:RunCodeAnalysis=true /p:CodeAnalysisTreatWarningsAsErrors=true
- IF "%gen%" == "Visual Studio 15 2017" cd ..