appveyor.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. #
  10. # This software is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at https://curl.se/docs/copyright.html.
  13. #
  14. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. # copies of the Software, and permit persons to whom the Software is
  16. # furnished to do so, under the terms of the COPYING file.
  17. #
  18. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. # KIND, either express or implied.
  20. #
  21. ###########################################################################
  22. version: 7.50.0.{build}
  23. environment:
  24. matrix:
  25. # generated CMake-based Visual Studio Release builds
  26. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  27. BUILD_SYSTEM: CMake
  28. PRJ_GEN: "Visual Studio 9 2008"
  29. PRJ_CFG: Release
  30. OPENSSL: OFF
  31. SCHANNEL: ON
  32. ENABLE_UNICODE: OFF
  33. HTTP_ONLY: OFF
  34. TESTING: OFF
  35. SHARED: ON
  36. DISABLED_TESTS: ""
  37. COMPILER_PATH: ""
  38. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
  39. BUILD_SYSTEM: CMake
  40. PRJ_GEN: "Visual Studio 16 2019"
  41. TARGET: "-A x64"
  42. PRJ_CFG: Release
  43. OPENSSL: ON
  44. SCHANNEL: OFF
  45. ENABLE_UNICODE: OFF
  46. HTTP_ONLY: OFF
  47. TESTING: OFF
  48. SHARED: ON
  49. DISABLED_TESTS: ""
  50. COMPILER_PATH: ""
  51. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
  52. BUILD_SYSTEM: CMake
  53. PRJ_GEN: "Visual Studio 16 2019"
  54. TARGET: "-A ARM64"
  55. PRJ_CFG: Release
  56. OPENSSL: OFF
  57. SCHANNEL: ON
  58. ENABLE_UNICODE: OFF
  59. HTTP_ONLY: OFF
  60. TESTING: OFF
  61. SHARED: OFF
  62. DISABLED_TESTS: ""
  63. COMPILER_PATH: ""
  64. # generated CMake-based Visual Studio Debug builds
  65. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  66. BUILD_SYSTEM: CMake
  67. PRJ_GEN: "Visual Studio 10 2010 Win64"
  68. PRJ_CFG: Debug
  69. OPENSSL: OFF
  70. SCHANNEL: OFF
  71. ENABLE_UNICODE: OFF
  72. HTTP_ONLY: OFF
  73. TESTING: ON
  74. SHARED: OFF
  75. DISABLED_TESTS: "!1139 !1501"
  76. COMPILER_PATH: ""
  77. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
  78. BUILD_SYSTEM: CMake
  79. PRJ_GEN: "Visual Studio 16 2019"
  80. TARGET: "-A x64"
  81. PRJ_CFG: Debug
  82. OPENSSL: OFF
  83. SCHANNEL: ON
  84. ENABLE_UNICODE: ON
  85. HTTP_ONLY: OFF
  86. TESTING: ON
  87. SHARED: OFF
  88. DISABLED_TESTS: "~571 !1139 !1501 "
  89. COMPILER_PATH: ""
  90. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
  91. BUILD_SYSTEM: CMake
  92. PRJ_GEN: "Visual Studio 16 2019"
  93. TARGET: "-A x64"
  94. PRJ_CFG: Debug
  95. OPENSSL: OFF
  96. SCHANNEL: OFF
  97. ENABLE_UNICODE: OFF
  98. HTTP_ONLY: OFF
  99. TESTING: ON
  100. SHARED: OFF
  101. DISABLED_TESTS: "~571 !1139 !1501"
  102. COMPILER_PATH: ""
  103. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
  104. BUILD_SYSTEM: CMake
  105. PRJ_GEN: "Visual Studio 16 2019"
  106. TARGET: "-A x64"
  107. PRJ_CFG: Debug
  108. OPENSSL: OFF
  109. SCHANNEL: OFF
  110. ENABLE_UNICODE: OFF
  111. HTTP_ONLY: ON
  112. TESTING: ON
  113. SHARED: OFF
  114. DISABLED_TESTS: "!1139 !1501"
  115. COMPILER_PATH: ""
  116. # generated CMake-based MSYS Makefiles builds (mingw cross-compiling)
  117. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  118. BUILD_SYSTEM: CMake
  119. PRJ_GEN: "MSYS Makefiles"
  120. PRJ_CFG: Debug
  121. OPENSSL: OFF
  122. SCHANNEL: ON
  123. ENABLE_UNICODE: ON
  124. HTTP_ONLY: OFF
  125. TESTING: ON
  126. SHARED: OFF
  127. DISABLED_TESTS: "!1139 !1501"
  128. COMPILER_PATH: "C:\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin"
  129. MSYS2_ARG_CONV_EXCL: "/*"
  130. BUILD_OPT: -k
  131. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  132. BUILD_SYSTEM: CMake
  133. PRJ_GEN: "MSYS Makefiles"
  134. PRJ_CFG: Debug
  135. OPENSSL: OFF
  136. SCHANNEL: ON
  137. ENABLE_UNICODE: ON
  138. HTTP_ONLY: OFF
  139. TESTING: ON
  140. SHARED: OFF
  141. DISABLED_TESTS: "!1139 !1501"
  142. COMPILER_PATH: "C:\\mingw-w64\\x86_64-7.2.0-posix-seh-rt_v5-rev1\\mingw64\\bin"
  143. MSYS2_ARG_CONV_EXCL: "/*"
  144. BUILD_OPT: -k
  145. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  146. BUILD_SYSTEM: CMake
  147. PRJ_GEN: "MSYS Makefiles"
  148. PRJ_CFG: Debug
  149. OPENSSL: OFF
  150. SCHANNEL: ON
  151. ENABLE_UNICODE: OFF
  152. HTTP_ONLY: OFF
  153. TESTING: ON
  154. SHARED: OFF
  155. DISABLED_TESTS: "!1139 !1501"
  156. COMPILER_PATH: "C:\\mingw-w64\\i686-6.3.0-posix-dwarf-rt_v5-rev1\\mingw32\\bin"
  157. MSYS2_ARG_CONV_EXCL: "/*"
  158. BUILD_OPT: -k
  159. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  160. BUILD_SYSTEM: CMake
  161. PRJ_GEN: "MSYS Makefiles"
  162. PRJ_CFG: Debug
  163. OPENSSL: OFF
  164. SCHANNEL: OFF
  165. ENABLE_UNICODE: OFF
  166. HTTP_ONLY: OFF
  167. TESTING: ON
  168. SHARED: OFF
  169. DISABLED_TESTS: "!1139 !1501"
  170. COMPILER_PATH: "C:\\MinGW\\bin"
  171. MSYS2_ARG_CONV_EXCL: "/*"
  172. BUILD_OPT: -k
  173. # winbuild-based builds
  174. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  175. BUILD_SYSTEM: winbuild_vs2015
  176. DEBUG: yes
  177. PATHPART: debug
  178. TESTING: OFF
  179. ENABLE_UNICODE: no
  180. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  181. BUILD_SYSTEM: winbuild_vs2015
  182. DEBUG: no
  183. PATHPART: release
  184. TESTING: OFF
  185. ENABLE_UNICODE: no
  186. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  187. BUILD_SYSTEM: winbuild_vs2017
  188. DEBUG: yes
  189. PATHPART: debug
  190. TESTING: OFF
  191. ENABLE_UNICODE: no
  192. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  193. BUILD_SYSTEM: winbuild_vs2017
  194. DEBUG: no
  195. PATHPART: release
  196. TESTING: OFF
  197. ENABLE_UNICODE: no
  198. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  199. BUILD_SYSTEM: winbuild_vs2015
  200. DEBUG: yes
  201. PATHPART: debug
  202. TESTING: OFF
  203. ENABLE_UNICODE: yes
  204. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  205. BUILD_SYSTEM: winbuild_vs2015
  206. DEBUG: no
  207. PATHPART: release
  208. TESTING: OFF
  209. ENABLE_UNICODE: yes
  210. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  211. BUILD_SYSTEM: winbuild_vs2017
  212. DEBUG: yes
  213. PATHPART: debug
  214. TESTING: OFF
  215. ENABLE_UNICODE: yes
  216. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  217. BUILD_SYSTEM: winbuild_vs2017
  218. DEBUG: no
  219. PATHPART: release
  220. TESTING: OFF
  221. ENABLE_UNICODE: yes
  222. # generated VisualStudioSolution-based builds
  223. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  224. BUILD_SYSTEM: VisualStudioSolution
  225. PRJ_CFG: "DLL Debug - DLL Windows SSPI - DLL WinIDN"
  226. TESTING: OFF
  227. VC_VERSION: VC15
  228. # autotools-based builds (NOT mingw cross-compiling, but msys2 native)
  229. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  230. BUILD_SYSTEM: autotools
  231. TESTING: ON
  232. DISABLED_TESTS: "!19 ~1056 !1233"
  233. CONFIG_ARGS: "--enable-debug --enable-werror --disable-threaded-resolver --disable-proxy --with-schannel"
  234. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
  235. BUILD_SYSTEM: autotools
  236. TESTING: ON
  237. DISABLED_TESTS: "!19 !504 !704 !705 ~1056 !1233"
  238. CONFIG_ARGS: "--enable-debug --enable-werror --disable-threaded-resolver --with-schannel"
  239. - APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019"
  240. BUILD_SYSTEM: autotools
  241. TESTING: ON
  242. DISABLED_TESTS: "!19 !504 !704 !705 ~1056 !1233"
  243. CONFIG_ARGS: "--enable-warnings --enable-werror --with-schannel"
  244. install:
  245. - set "PATH=C:\msys64\usr\bin;%PATH%"
  246. - if not "%COMPILER_PATH%"=="" (
  247. set "PATH=%COMPILER_PATH%;%PATH%" )
  248. build_script:
  249. - if %BUILD_SYSTEM%==CMake (
  250. cmake .
  251. -G"%PRJ_GEN%"
  252. %TARGET%
  253. -DCMAKE_USE_OPENSSL=%OPENSSL%
  254. -DCMAKE_USE_SCHANNEL=%SCHANNEL%
  255. -DHTTP_ONLY=%HTTP_ONLY%
  256. -DBUILD_SHARED_LIBS=%SHARED%
  257. -DBUILD_TESTING=%TESTING%
  258. -DCURL_WERROR=ON
  259. -DENABLE_DEBUG=ON
  260. -DENABLE_UNICODE=%ENABLE_UNICODE%
  261. -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=""
  262. -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=""
  263. -DCMAKE_INSTALL_PREFIX="C:/CURL"
  264. -DCMAKE_BUILD_TYPE=%PRJ_CFG% &&
  265. cmake --build . --config %PRJ_CFG% --parallel 2 --clean-first -- %BUILD_OPT%
  266. ) else (
  267. if %BUILD_SYSTEM%==VisualStudioSolution (
  268. cd projects &&
  269. .\\generate.bat %VC_VERSION% &&
  270. msbuild.exe /p:Configuration="%PRJ_CFG%" "Windows\\%VC_VERSION%\\curl-all.sln"
  271. ) else (
  272. if %BUILD_SYSTEM%==winbuild_vs2015 (
  273. call buildconf.bat &&
  274. cd winbuild &&
  275. call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 &&
  276. call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 &&
  277. nmake /f Makefile.vc mode=dll VC=14 "SSL_PATH=C:\OpenSSL-v111-Win64" WITH_SSL=dll MACHINE=x64 DEBUG=%DEBUG% ENABLE_UNICODE=%ENABLE_UNICODE% &&
  278. ..\builds\libcurl-vc14-x64-%PATHPART%-dll-ssl-dll-ipv6-sspi\bin\curl.exe -V
  279. ) else (
  280. if %BUILD_SYSTEM%==winbuild_vs2017 (
  281. call buildconf.bat &&
  282. cd winbuild &&
  283. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" &&
  284. nmake /f Makefile.vc mode=dll VC=15 "SSL_PATH=C:\OpenSSL-v111-Win64" WITH_SSL=dll MACHINE=x64 DEBUG=%DEBUG% ENABLE_UNICODE=%ENABLE_UNICODE% &&
  285. ..\builds\libcurl-vc15-x64-%PATHPART%-dll-ssl-dll-ipv6-sspi\bin\curl.exe -V
  286. ) else (
  287. if %BUILD_SYSTEM%==autotools (
  288. bash.exe -e -l -c "cd /c/projects/curl && ./buildconf && ./configure %CONFIG_ARGS% && make && make examples && cd tests && make"
  289. )))))
  290. - if %TESTING%==ON (
  291. if %BUILD_SYSTEM%==CMake (
  292. cmake --build . --config %PRJ_CFG% --parallel 2 --target testdeps
  293. ))
  294. test_script:
  295. - if %TESTING%==ON (
  296. if %BUILD_SYSTEM%==CMake (
  297. set TFLAGS=-r -rm -u %DISABLED_TESTS% &&
  298. cmake --build . --config %PRJ_CFG% --target test-nonflaky
  299. ) else (
  300. if %BUILD_SYSTEM%==autotools (
  301. bash.exe -e -l -c "cd /c/projects/curl && make V=1 TFLAGS='-r -rm -u %DISABLED_TESTS%' test-nonflaky"
  302. ) else (
  303. bash.exe -e -l -c "cd /c/projects/curl/tests && ./runtests.pl -a -p !flaky -r -rm -u %DISABLED_TESTS%"
  304. ))
  305. )
  306. # select branches to avoid testing feature branches twice (as branch and as pull request)
  307. branches:
  308. only:
  309. - master
  310. - /\/ci$/
  311. artifacts:
  312. - path: '**/curl.exe'
  313. name: curl
  314. - path: '**/*curl*.dll'
  315. name: libcurl