appveyor.yml 12 KB

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