appveyor.yml.bkup 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. version: '{build}'
  2. build:
  3. # no automatic build in script mode
  4. skip_commits:
  5. # Builds just testing something on Travis CI don't need to be
  6. # done on AppVeyor
  7. message: /\[Travis\]/
  8. # Dont build, if only documentation was changed
  9. files:
  10. - '**/*.md'
  11. environment:
  12. enable_cxx: NO
  13. enable_ssl_dynamic_loading: YES
  14. enable_lua: NO
  15. enable_lua_shared: NO
  16. c_standard: auto
  17. cxx_standard: auto
  18. matrix:
  19. # Use default values
  20. - id: Default-x86
  21. compiler: msvc-19-seh
  22. build_shared: NO
  23. no_files: NO
  24. enable_ipv6: NO
  25. enable_ssl: YES
  26. enable_websockets: NO
  27. no_cgi: NO
  28. no_caching: NO
  29. configuration: Release
  30. platform: x86
  31. - id: Default-x64
  32. compiler: msvc-19-seh
  33. build_shared: NO
  34. no_files: NO
  35. enable_ipv6: NO
  36. enable_ssl: YES
  37. enable_websockets: NO
  38. no_cgi: NO
  39. no_caching: NO
  40. configuration: Release
  41. platform: x64
  42. # Use default values
  43. - id: Full-x86
  44. compiler: msvc-19-seh
  45. build_shared: NO
  46. no_files: NO
  47. enable_ipv6: YES
  48. enable_ssl: YES
  49. enable_websockets: YES
  50. no_cgi: NO
  51. no_caching: NO
  52. configuration: Release
  53. platform: x86
  54. - id: Full-x64
  55. compiler: msvc-19-seh
  56. build_shared: NO
  57. no_files: NO
  58. enable_ipv6: YES
  59. enable_ssl: YES
  60. enable_websockets: YES
  61. no_cgi: NO
  62. no_caching: NO
  63. configuration: Release
  64. platform: x64
  65. # Debug builds
  66. - id: Full-x86-Debug
  67. compiler: msvc-19-seh
  68. build_shared: NO
  69. no_files: NO
  70. enable_ipv6: YES
  71. enable_ssl: YES
  72. enable_websockets: YES
  73. no_cgi: NO
  74. no_caching: NO
  75. configuration: Debug
  76. platform: x86
  77. - id: Full-x64-Debug
  78. compiler: msvc-19-seh
  79. build_shared: NO
  80. no_files: NO
  81. enable_ipv6: YES
  82. enable_ssl: YES
  83. enable_websockets: YES
  84. no_cgi: NO
  85. no_caching: NO
  86. configuration: Debug
  87. platform: x64
  88. # Minimum settings
  89. - id: Minimal-x86
  90. compiler: msvc-19-seh
  91. build_shared: NO
  92. no_files: YES
  93. enable_ipv6: NO
  94. enable_ssl: NO
  95. enable_websockets: NO
  96. no_cgi: YES
  97. no_caching: YeS
  98. configuration: Release
  99. platform: x86
  100. - id: Minimal-x64
  101. compiler: msvc-19-seh
  102. build_shared: NO
  103. no_files: YES
  104. enable_ipv6: NO
  105. enable_ssl: NO
  106. enable_websockets: NO
  107. no_cgi: YES
  108. no_caching: YeS
  109. configuration: Release
  110. platform: x64
  111. # Test shared and debug build
  112. - id: Shared-default-x86
  113. compiler: msvc-19-seh
  114. build_shared: YES
  115. no_files: NO
  116. enable_ipv6: NO
  117. enable_ssl: YES
  118. enable_websockets: NO
  119. no_cgi: NO
  120. no_caching: NO
  121. configuration: Release
  122. platform: x86
  123. - id: Shared-default-x64
  124. compiler: msvc-19-seh
  125. build_shared: YES
  126. no_files: NO
  127. enable_ipv6: NO
  128. enable_ssl: YES
  129. enable_websockets: NO
  130. no_cgi: NO
  131. no_caching: NO
  132. configuration: Release
  133. platform: x64
  134. # MinGW
  135. - id: Full-GCC-x64
  136. compiler: gcc-5.1.0-posix
  137. build_shared: NO
  138. no_files: NO
  139. enable_ipv6: YES
  140. enable_ssl: YES
  141. enable_websockets: YES
  142. no_cgi: NO
  143. no_caching: NO
  144. configuration: Release
  145. platform: x64
  146. # Visual Studio 2010
  147. - id: Full-VS2010-x86
  148. compiler: msvc-16-seh
  149. build_shared: NO
  150. no_files: NO
  151. enable_ipv6: YES
  152. enable_ssl: YES
  153. enable_websockets: YES
  154. no_cgi: NO
  155. no_caching: NO
  156. configuration: Release
  157. platform: x86
  158. # Visual Studio 2012
  159. - id: Full-VS2012-x86
  160. compiler: msvc-17-seh
  161. build_shared: NO
  162. no_files: NO
  163. enable_ipv6: YES
  164. enable_ssl: YES
  165. enable_websockets: YES
  166. no_cgi: NO
  167. no_caching: NO
  168. configuration: Release
  169. platform: x86
  170. # Visual Studio 2013
  171. - id: Full-VS2013-x86
  172. compiler: msvc-18-seh
  173. build_shared: NO
  174. no_files: NO
  175. enable_ipv6: YES
  176. enable_ssl: YES
  177. enable_websockets: YES
  178. no_cgi: NO
  179. no_caching: NO
  180. configuration: Release
  181. platform: x86
  182. - id: Full-VS2013-x64
  183. compiler: msvc-18-seh
  184. build_shared: NO
  185. no_files: NO
  186. enable_ipv6: YES
  187. enable_ssl: YES
  188. enable_websockets: YES
  189. no_cgi: NO
  190. no_caching: NO
  191. configuration: Release
  192. platform: x64
  193. # Visual Studio 2015 is default
  194. # Visual Studio 2017 is not yet default
  195. - id: Full-VS2017-x86
  196. compiler: msvc-20-seh
  197. build_shared: NO
  198. no_files: NO
  199. enable_ipv6: YES
  200. enable_ssl: YES
  201. enable_websockets: YES
  202. no_cgi: NO
  203. no_caching: NO
  204. configuration: Release
  205. platform: x86
  206. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  207. - id: Full-VS2017-x64
  208. compiler: msvc-20-seh
  209. build_shared: NO
  210. no_files: NO
  211. enable_ipv6: YES
  212. enable_ssl: YES
  213. enable_websockets: YES
  214. no_cgi: NO
  215. no_caching: NO
  216. configuration: Release
  217. platform: x64
  218. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  219. install:
  220. # Derive some extra information
  221. - set build_type=%configuration%
  222. - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_name=%%a")
  223. - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_version=%%b")
  224. - for /f "tokens=1-3 delims=-" %%a in ("%compiler%") do (@set "compiler_threading=%%c")
  225. - if "%platform%"=="x64" (set arch=x86_64)
  226. - if "%platform%"=="x86" (set arch=i686)
  227. # Download the specific version of MinGW
  228. - if "%compiler_name%"=="gcc" (@set "mingw_output_folder=C:\mingw-builds")
  229. - if "%compiler_name%"=="gcc" (
  230. @for /f %%a in (
  231. 'call mingw.cmd
  232. /version "%compiler_version%"
  233. /arch "%arch%"
  234. /threading "%compiler_threading%"
  235. "%mingw_output_folder%"'
  236. ) do @set "compiler_path=%%a"
  237. )
  238. - if "%compiler_name%"=="gcc" (@set "mingw_log_folder=%mingw_output_folder%\logs")
  239. - if exist "%mingw_log_folder%" @for /f %%f in ('dir /b /oD /tc "%mingw_log_folder%"') do @set "mingw_log_file=%mingw_log_folder%\%%f"
  240. - if exist "%mingw_log_file%" powershell Push-AppveyorArtifact "%mingw_log_file%" -FileName mingw-download.log
  241. # Get OpenSSL
  242. #
  243. # OpenSSL should already be installed, according to
  244. # - http://help.appveyor.com/discussions/questions/1132-openssl-installation-issues
  245. # - https://github.com/appveyor/ci/issues/576
  246. #
  247. - cmd: set PATH=%PATH%;C:\OpenSSL-Win32;C:\OpenSSL-Win64
  248. - dir C:\OpenSSL-Win32
  249. - dir C:\OpenSSL-Win64
  250. - path
  251. before_build:
  252. # Remove sh.exe from the path otherwise CMake will complain:
  253. # "sh.exe was found in your PATH, here: C:/Program Files/Git/usr/bin/sh.exe"
  254. # and the MinGW build will not work (the Visual Studio build does not care).
  255. # See http://help.appveyor.com/discussions/problems/3193-cmake-building-for-mingw-issue-with-git-shexe
  256. # The entire directory containing sh.exe could be removed from the PATH environment:
  257. # - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
  258. # However, this will also remove all other programs in this directory from the PATH.
  259. # In particular "patch" is still required.
  260. # So, just rename sh.exe:
  261. - ren "C:\Program Files\Git\usr\bin\sh.exe" _sh.exe
  262. # Set up mingw commands
  263. - if "%compiler_name%"=="gcc" (set "generator=MinGW Makefiles")
  264. - if "%compiler_name%"=="gcc" (set "build=mingw32-make -j4")
  265. - if "%compiler_name%"=="gcc" (set "test=mingw32-make test")
  266. # MSVC specific commands
  267. # Note: The minimum version officially supported for CivetWeb is VS2010. Older ones might work or not.
  268. - if "%compiler_version%"=="14" (set "vs_version=8" & set "vs_year=2005")
  269. - if "%compiler_version%"=="15" (set "vs_version=9" & set "vs_year=2008")
  270. - if "%compiler_version%"=="16" (set "vs_version=10" & set "vs_year=2010")
  271. - if "%compiler_version%"=="17" (set "vs_version=11" & set "vs_year=2012")
  272. - if "%compiler_version%"=="18" (set "vs_version=12" & set "vs_year=2013")
  273. - if "%compiler_version%"=="19" (set "vs_version=14" & set "vs_year=2015")
  274. - if "%compiler_version%"=="20" (set "vs_version=15" & set "vs_year=2017")
  275. - if "%compiler_name%"=="msvc" (set "generator=Visual Studio %vs_version% %vs_year%")
  276. - if "%compiler_name%"=="msvc" (
  277. if "%platform%"=="x64" (
  278. set "generator=%generator% Win64"
  279. )
  280. )
  281. - if %compiler_version% gtr 9 (set platform=%platform:x86=Win32%)
  282. - if "%compiler_name%"=="msvc" (set "msbuild_opts=/clp:OnlyErrors;OnlyWarnings /nologo /m /v:m")
  283. - if "%compiler_name%"=="msvc" (set "build=msbuild %msbuild_opts% /p:Configuration=%configuration% /p:Platform=%platform% civetweb.sln")
  284. - if "%compiler_name%"=="msvc" (set "test=msbuild %msbuild_opts% RUN_TESTS.vcxproj")
  285. # Add the compiler path if needed
  286. - if not "%compiler_path%"=="" (set "PATH=%PATH%;%compiler_path%")
  287. # git bash conflicts with MinGW makefiles
  288. - if "%generator%"=="MinGW Makefiles" (set "PATH=%PATH:C:\Program Files (x86)\Git\bin=%")
  289. # Useful locations
  290. - set "source_path=%cd%"
  291. - set "output_path=%source_path%\output"
  292. - set "build_path=%output_path%\build"
  293. - set "install_path=%output_path%\install"
  294. - set "third_party_dir=C:\third-party"
  295. # Check some settings of the build server
  296. - ver
  297. - cd
  298. - dir
  299. - ipconfig /all
  300. # Generate the build scripts with CMake
  301. - mkdir "%build_path%"
  302. - cd "%build_path%"
  303. - cmake --version
  304. - appveyor AddMessage -Category Information "Generating '%generator%'"
  305. - cmake
  306. -G "%generator%"
  307. -DCMAKE_BUILD_TYPE=%build_type%
  308. -DBUILD_SHARED_LIBS=%build_shared%
  309. -DCIVETWEB_SERVE_NO_FILES=%no_files%
  310. "-DCIVETWEB_THIRD_PARTY_DIR=%third_party_dir:\=\\%"
  311. -DCIVETWEB_ENABLE_THIRD_PARTY_OUTPUT=YES
  312. -DCIVETWEB_ENABLE_SSL=%enable_ssl%
  313. -DCIVETWEB_DISABLE_CGI=%no_cgi%
  314. -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=%enable_ssl_dynamic_loading%
  315. -DCIVETWEB_ENABLE_WEBSOCKETS=%enable_websockets%
  316. -DCIVETWEB_ENABLE_CXX=%enable_cxx%
  317. -DCIVETWEB_ENABLE_LUA=%enable_lua%
  318. -DCIVETWEB_ENABLE_LUA_SHARED=%enable_lua_shared%
  319. -DCIVETWEB_DISABLE_CACHING=%no_caching%
  320. -DCIVETWEB_C_STANDARD=%c_standard%
  321. -DCIVETWEB_CXX_STANDARD=%cxx_standard%
  322. "%source_path%"
  323. - powershell Push-AppveyorArtifact CMakeCache.txt
  324. - cd "%source_path%"
  325. build_script:
  326. - cd
  327. - cd "%build_path%"
  328. - appveyor AddMessage -Category Information "Build command '%build%'"
  329. - cmd /c "%build%"
  330. - cd "%source_path%"
  331. test_script:
  332. - cd "%build_path%"
  333. - appveyor AddMessage -Category Information "Test command '%build%'"
  334. - set CTEST_OUTPUT_ON_FAILURE=1
  335. - cmd /c "%test%"
  336. - cd "%source_path%"
  337. - set "output_path=%source_path%\output"
  338. - set "build_path=%output_path%\build"
  339. - set "install_path=%output_path%\install"
  340. - set "third_party_dir=C:\third-party"
  341. after_test:
  342. - echo "Current directory:"
  343. - cd
  344. - dir
  345. - md dist
  346. - if "%build_type%"=="Release" (cmake "-DCMAKE_INSTALL_PREFIX=%install_path%" -P "%build_path%/cmake_install.cmake")
  347. - dir dist\
  348. - echo "Output directory:"
  349. - dir %output_path%
  350. - echo "Build directory:"
  351. - dir %build_path%
  352. - if "%build_type%"=="Release" (echo "Install directory:")
  353. - if "%build_type%"=="Release" (dir %install_path%)
  354. - if "%build_type%"=="Release" (dir %install_path%\bin)
  355. - if "%build_type%"=="Release" (dir %install_path%\include)
  356. - if "%build_type%"=="Release" (dir %install_path%\lib)
  357. - if "%build_type%"=="Release" (copy "%install_path%"\include dist\)
  358. - if "%build_type%"=="Release" (copy "%install_path%"\bin\*.exe dist\)
  359. - echo "Dist directory:"
  360. - dir dist\
  361. matrix:
  362. fast_finish: false
  363. cache:
  364. - C:\mingw-builds -> mingw.cmd
  365. - C:\third-party -> **\CMakeLists.txt
  366. - C:\ssl
  367. artifacts:
  368. - path: dist\*