1 # This is the configuration file for AppVeyor builds.
2 # Look at the following for reference:
3 # https://www.appveyor.com/docs/appveyor-yml
6 # - Minimal appveyor.yml file is an empty file. All sections are optional.
7 # - Indent each level of configuration with 2 spaces. Do not use tabs!
8 # - All section names are case-sensitive.
9 # - Section names should be unique on each level.
11 #---------------------------------#
12 # general configuration #
13 #---------------------------------#
18 #---------------------------------#
19 # environment configuration #
21 #---------------------------------#
27 # Visual Studio builds
46 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
62 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
75 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
76 # Other compilers than Visual Studio
80 - platform: mingw64msys
83 clone_folder: c:\projects\check
85 # build Configuration, i.e. Debug, Release, etc.
86 configuration: Release
89 #---------------------------------#
90 # scripts that are called at #
91 # the very beginning, before #
93 #---------------------------------#
96 - git config --global core.autocrlf input
99 #---------------------------------#
100 # scripts to run before build #
101 #---------------------------------#
104 - cd c:\projects\check
105 - echo Directory before starting build...
107 - echo Starting pre-build step...
108 # Remove the following from the path, as it will interfere with
110 - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
111 - if %platform%==msvc call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
112 - if %platform%==msvc mkdir build
113 - if %platform%==msvc chdir build
114 - if %platform%==msvc cmake --version
115 - if %platform%==msvc cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
116 - if %platform%==vs (
117 set "makecommand=Visual Studio"
121 - if %platform%==vs (
124 - if %vsversion%==2005 (
127 - if %vsversion%==2008 (
133 - if %vsversion%==2005 (
134 set "makecommand=%makecommand% 8 %vsversion%"
136 - if %vsversion%==2008 (
137 set "makecommand=%makecommand% 9 %vsversion%"
139 - if %vsversion%==2010 (
140 set "makecommand=%makecommand% 10 %vsversion%"
142 - if %vsversion%==2012 (
143 set "makecommand=%makecommand% 11 %vsversion%"
145 - if %vsversion%==2013 (
146 set "makecommand=%makecommand% 12 %vsversion%"
148 - if %vsversion%==2015 (
149 set "makecommand=%makecommand% 14 %vsversion%"
151 - if %vsversion%==2017 (
152 set "makecommand=%makecommand% 15 %vsversion%"
155 set "makecommand=%makecommand% Win64"
158 set "makecommand=%makecommand% ARM"
160 - if %platform%==vs mkdir build
161 - if %platform%==vs chdir build
162 - if %platform%==vs cmake --version
163 - if %platform%==vs cmake -G "%makecommand%" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
164 - if %platform%==cygwin set PATH=C:\cygwin\bin;%PATH%
165 - if %platform%==cygwin bash -c "autoreconf -i"
166 - if %platform%==cygwin bash -c "./configure"
167 - if %platform%==mingw32 set PATH=C:\MinGW\bin;%PATH%
168 - if %platform%==mingw32 mkdir build
169 - if %platform%==mingw32 chdir build
170 - if %platform%==mingw32 cmake --version
171 - if %platform%==mingw32 cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
172 - if %platform%==mingw64msys set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
173 - if %platform%==mingw64msys bash -c "autoreconf -i"
174 - if %platform%==mingw64msys bash -c "./configure"
177 #---------------------------------#
178 # build code and unit tests #
179 #---------------------------------#
182 - echo Directory before running build step...
184 - echo Building code...
185 - if %platform%==msvc nmake
186 - if %platform%==cygwin bash -c "make"
187 - if %platform%==mingw32 mingw32-make
188 - if %platform%==mingw64msys bash -c "make"
189 - if %vcx%==true msbuild /p:Platform=%arch% "ALL_BUILD.vcxproj"
190 # Build for VS2008 (prior to the vsxproj file format), only 32 bit
191 # Options see https://msdn.microsoft.com/en-us/library/ms164311.aspx
192 - if %vcs%==true msbuild /p:Configuration=Release /p:Platform=Win32 /nologo /v:d "check.sln"
195 #---------------------------------#
196 # run unit test for all x86 #
197 # and x64 architecture builds #
198 #---------------------------------#
201 - set "testplatform=%platform%"
202 # Can not run ARM builds on x86/x64 build images
204 set "testplatform=none"
206 - echo Project directory before running test step...
208 - echo tests directory before running test step...
210 - echo Running unit tests...
211 - if %testplatform%==msvc nmake test VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=TRUE
212 - if %testplatform%==vs ctest --extra-verbose -C Release
213 - if %testplatform%==cygwin bash -c "make check"
214 - if %testplatform%==mingw32 tests\check_check.exe
215 - if %testplatform%==mingw64msys bash -c "tests/check_check"
216 - if %testplatform%==none echo Can not test for %arch% here
219 #---------------------------------#
220 # build and test completed #
221 #---------------------------------#
224 - echo Project directory after running tests...
226 - echo tests directory after running tests...
228 - if %platform%==cygwin bash -c "cat tests/test-suite.log || true"