appveyor.yml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. # This is the configuration file for AppVeyor builds.
  2. # Look at the following for reference:
  3. # https://www.appveyor.com/docs/appveyor-yml
  4. # Notes:
  5. # - Minimal appveyor.yml file is an empty file. All sections are optional.
  6. # - Indent each level of configuration with 2 spaces. Do not use tabs!
  7. # - All section names are case-sensitive.
  8. # - Section names should be unique on each level.
  9. #---------------------------------#
  10. # general configuration #
  11. #---------------------------------#
  12. # version format
  13. version: 1.0.{build}
  14. #---------------------------------#
  15. # environment configuration #
  16. # and build matrix #
  17. #---------------------------------#
  18. environment:
  19. vsversion: none
  20. arch: default
  21. matrix:
  22. # Visual Studio builds
  23. # - platform: vs
  24. # vsversion: 2008
  25. # arch: x86
  26. - platform: vs
  27. vsversion: 2010
  28. arch: x86
  29. - platform: vs
  30. vsversion: 2012
  31. arch: x86
  32. - platform: vs
  33. vsversion: 2013
  34. arch: x86
  35. - platform: vs
  36. vsversion: 2015
  37. arch: x86
  38. - platform: vs
  39. vsversion: 2017
  40. arch: x86
  41. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  42. - platform: vs
  43. vsversion: 2010
  44. arch: x64
  45. - platform: vs
  46. vsversion: 2012
  47. arch: x64
  48. - platform: vs
  49. vsversion: 2013
  50. arch: x64
  51. - platform: vs
  52. vsversion: 2015
  53. arch: x64
  54. - platform: vs
  55. vsversion: 2017
  56. arch: x64
  57. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  58. - platform: vs
  59. vsversion: 2012
  60. arch: ARM
  61. - platform: vs
  62. vsversion: 2013
  63. arch: ARM
  64. - platform: vs
  65. vsversion: 2015
  66. arch: ARM
  67. - platform: vs
  68. vsversion: 2017
  69. arch: ARM
  70. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  71. # Other compilers than Visual Studio
  72. - platform: msvc
  73. - platform: cygwin
  74. - platform: mingw32
  75. - platform: mingw64msys
  76. # clone directory
  77. clone_folder: c:\projects\check
  78. # build Configuration, i.e. Debug, Release, etc.
  79. configuration: Release
  80. #---------------------------------#
  81. # scripts that are called at #
  82. # the very beginning, before #
  83. # repo cloning #
  84. #---------------------------------#
  85. init:
  86. - git config --global core.autocrlf input
  87. #---------------------------------#
  88. # scripts to run before build #
  89. #---------------------------------#
  90. before_build:
  91. - cd c:\projects\check
  92. - echo Directory before starting build...
  93. - dir
  94. - echo Starting pre-build step...
  95. # Remove the following from the path, as it will interfere with
  96. # the MinGW builds
  97. - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
  98. - if %platform%==msvc call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
  99. - if %platform%==msvc mkdir build
  100. - if %platform%==msvc chdir build
  101. - if %platform%==msvc cmake --version
  102. - if %platform%==msvc cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
  103. - if %platform%==vs (
  104. set "makecommand=Visual Studio"
  105. )
  106. - set "vcx=false"
  107. - set "vcs=false"
  108. - if %platform%==vs (
  109. set "vcx=true"
  110. )
  111. - if %vsversion%==2005 (
  112. set "vcs=true"
  113. )
  114. - if %vsversion%==2008 (
  115. set "vcs=true"
  116. )
  117. - if %vcs%==true (
  118. set "vcx=false"
  119. )
  120. - if %vsversion%==2005 (
  121. set "makecommand=%makecommand% 8 %vsversion%"
  122. )
  123. - if %vsversion%==2008 (
  124. set "makecommand=%makecommand% 9 %vsversion%"
  125. )
  126. - if %vsversion%==2010 (
  127. set "makecommand=%makecommand% 10 %vsversion%"
  128. )
  129. - if %vsversion%==2012 (
  130. set "makecommand=%makecommand% 11 %vsversion%"
  131. )
  132. - if %vsversion%==2013 (
  133. set "makecommand=%makecommand% 12 %vsversion%"
  134. )
  135. - if %vsversion%==2015 (
  136. set "makecommand=%makecommand% 14 %vsversion%"
  137. )
  138. - if %vsversion%==2017 (
  139. set "makecommand=%makecommand% 15 %vsversion%"
  140. )
  141. - if %arch%==x64 (
  142. set "makecommand=%makecommand% Win64"
  143. )
  144. - if %arch%==ARM (
  145. set "makecommand=%makecommand% ARM"
  146. )
  147. - if %platform%==vs mkdir build
  148. - if %platform%==vs chdir build
  149. - if %platform%==vs cmake --version
  150. - if %platform%==vs cmake -G "%makecommand%" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
  151. - if %platform%==cygwin set PATH=C:\cygwin\bin;%PATH%
  152. - if %platform%==cygwin bash -c "autoreconf -i"
  153. - if %platform%==cygwin bash -c "./configure"
  154. - if %platform%==mingw32 set PATH=C:\MinGW\bin;%PATH%
  155. - if %platform%==mingw32 mkdir build
  156. - if %platform%==mingw32 chdir build
  157. - if %platform%==mingw32 cmake --version
  158. - if %platform%==mingw32 cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=%P% -DCMAKE_BUILD_TYPE=Debug ..
  159. - if %platform%==mingw64msys set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
  160. - if %platform%==mingw64msys bash -c "autoreconf -i"
  161. - if %platform%==mingw64msys bash -c "./configure"
  162. #---------------------------------#
  163. # build code and unit tests #
  164. #---------------------------------#
  165. build_script:
  166. - echo Directory before running build step...
  167. - dir
  168. - echo Building code...
  169. - if %platform%==msvc nmake
  170. - if %platform%==cygwin bash -c "make"
  171. - if %platform%==mingw32 mingw32-make
  172. - if %platform%==mingw64msys bash -c "make"
  173. - if %vcx%==true msbuild /p:Platform=%arch% "ALL_BUILD.vcxproj"
  174. # Build for VS2008 (prior to the vsxproj file format), only 32 bit
  175. # Options see https://msdn.microsoft.com/en-us/library/ms164311.aspx
  176. - if %vcs%==true msbuild /p:Configuration=Release /p:Platform=Win32 /nologo /v:d "check.sln"
  177. #---------------------------------#
  178. # run unit test for all x86 #
  179. # and x64 architecture builds #
  180. #---------------------------------#
  181. test_script:
  182. - set "testplatform=%platform%"
  183. # Can not run ARM builds on x86/x64 build images
  184. - if %arch%==ARM (
  185. set "testplatform=none"
  186. )
  187. - echo Project directory before running test step...
  188. - dir
  189. - echo tests directory before running test step...
  190. - dir tests
  191. - echo Running unit tests...
  192. - if %testplatform%==msvc nmake test VERBOSE=1 CTEST_OUTPUT_ON_FAILURE=TRUE
  193. - if %testplatform%==vs ctest --extra-verbose -C Release
  194. - if %testplatform%==cygwin bash -c "make check"
  195. - if %testplatform%==mingw32 tests\check_check.exe
  196. - if %testplatform%==mingw64msys bash -c "tests/check_check"
  197. - if %testplatform%==none echo Can not test for %arch% here
  198. #---------------------------------#
  199. # build and test completed #
  200. #---------------------------------#
  201. on_finish:
  202. - echo Project directory after running tests...
  203. - dir
  204. - echo tests directory after running tests...
  205. - dir tests
  206. - if %platform%==cygwin bash -c "cat tests/test-suite.log || true"