appveyor.yml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 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. # https://ci.appveyor.com/project/curlorg/curl/history
  25. # Appveyor configuration
  26. # https://www.appveyor.com/docs/appveyor-yml/
  27. version: 7.50.0.{build}
  28. environment:
  29. UNITY: "OFF"
  30. matrix:
  31. # generated CMake-based Visual Studio Release builds
  32. - job_name: "CMake, VS2008, Release x86, Schannel"
  33. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  34. BUILD_SYSTEM: CMake
  35. PRJ_GEN: "Visual Studio 9 2008"
  36. PRJ_CFG: Release
  37. OPENSSL: OFF
  38. SCHANNEL: ON
  39. ENABLE_UNICODE: OFF
  40. HTTP_ONLY: OFF
  41. TESTING: OFF
  42. SHARED: ON
  43. DISABLED_TESTS: ""
  44. - job_name: "CMake, VS2022, Release x64, OpenSSL, WebSockets, Unity"
  45. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
  46. BUILD_SYSTEM: CMake
  47. PRJ_GEN: "Visual Studio 17 2022"
  48. TARGET: "-A x64"
  49. PRJ_CFG: Release
  50. OPENSSL: ON
  51. SCHANNEL: OFF
  52. ENABLE_UNICODE: OFF
  53. HTTP_ONLY: OFF
  54. TESTING: OFF
  55. SHARED: ON
  56. DISABLED_TESTS: ""
  57. WEBSOCKETS: ON
  58. UNITY: "ON"
  59. - job_name: "CMake, VS2022, Release arm64, Schannel, Static"
  60. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
  61. BUILD_SYSTEM: CMake
  62. PRJ_GEN: "Visual Studio 17 2022"
  63. TARGET: "-A ARM64"
  64. PRJ_CFG: Release
  65. OPENSSL: OFF
  66. SCHANNEL: ON
  67. ENABLE_UNICODE: OFF
  68. HTTP_ONLY: OFF
  69. TESTING: OFF
  70. SHARED: OFF
  71. DISABLED_TESTS: ""
  72. # generated CMake-based Visual Studio Debug builds
  73. - job_name: "CMake, VS2010, Debug x64, no SSL, Static"
  74. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  75. BUILD_SYSTEM: CMake
  76. PRJ_GEN: "Visual Studio 10 2010 Win64"
  77. PRJ_CFG: Debug
  78. OPENSSL: OFF
  79. SCHANNEL: OFF
  80. ENABLE_UNICODE: OFF
  81. HTTP_ONLY: OFF
  82. TESTING: ON
  83. SHARED: OFF
  84. DISABLED_TESTS: "!1139 !1501 ~1056"
  85. ADD_PATH: "C:\\msys64\\usr\\bin"
  86. - job_name: "CMake, VS2022, Debug x64, Schannel, Static, Unicode"
  87. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
  88. BUILD_SYSTEM: CMake
  89. PRJ_GEN: "Visual Studio 17 2022"
  90. TARGET: "-A x64"
  91. PRJ_CFG: Debug
  92. OPENSSL: OFF
  93. SCHANNEL: ON
  94. ENABLE_UNICODE: ON
  95. HTTP_ONLY: OFF
  96. TESTING: ON
  97. SHARED: OFF
  98. DISABLED_TESTS: "~571 !1139 !1501 ~1056"
  99. ADD_PATH: "C:\\msys64\\usr\\bin"
  100. - job_name: "CMake, VS2022, Debug x64, no SSL, Static"
  101. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
  102. BUILD_SYSTEM: CMake
  103. PRJ_GEN: "Visual Studio 17 2022"
  104. TARGET: "-A x64"
  105. PRJ_CFG: Debug
  106. OPENSSL: OFF
  107. SCHANNEL: OFF
  108. ENABLE_UNICODE: OFF
  109. HTTP_ONLY: OFF
  110. TESTING: ON
  111. SHARED: OFF
  112. DISABLED_TESTS: "~571 !1139 !1501 ~1056"
  113. ADD_PATH: "C:\\msys64\\usr\\bin"
  114. - job_name: "CMake, VS2022, Debug x64, no SSL, Static, HTTP only"
  115. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
  116. BUILD_SYSTEM: CMake
  117. PRJ_GEN: "Visual Studio 17 2022"
  118. TARGET: "-A x64"
  119. PRJ_CFG: Debug
  120. OPENSSL: OFF
  121. SCHANNEL: OFF
  122. ENABLE_UNICODE: OFF
  123. HTTP_ONLY: ON
  124. TESTING: ON
  125. SHARED: OFF
  126. DISABLED_TESTS: "!1139 !1501 ~1056"
  127. ADD_PATH: "C:\\msys64\\usr\\bin"
  128. # generated CMake-based MSYS Makefiles builds (mingw cross-compiling)
  129. - job_name: "CMake, mingw-w64, gcc 8, Debug x64, Schannel, Static, Unicode"
  130. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  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 ~1056"
  141. ADD_PATH: "C:\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin;C:\\msys64\\usr\\bin"
  142. MSYS2_ARG_CONV_EXCL: "/*"
  143. BUILD_OPT: -k
  144. - job_name: "CMake, mingw-w64, gcc 7, Debug x64, Schannel, Static, Unicode"
  145. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  146. BUILD_SYSTEM: CMake
  147. PRJ_GEN: "MSYS Makefiles"
  148. PRJ_CFG: Debug
  149. OPENSSL: OFF
  150. SCHANNEL: ON
  151. ENABLE_UNICODE: ON
  152. HTTP_ONLY: OFF
  153. TESTING: ON
  154. SHARED: OFF
  155. DISABLED_TESTS: "!1139 !1501 ~1056"
  156. ADD_PATH: "C:\\mingw-w64\\x86_64-7.2.0-posix-seh-rt_v5-rev1\\mingw64\\bin;C:\\msys64\\usr\\bin"
  157. MSYS2_ARG_CONV_EXCL: "/*"
  158. BUILD_OPT: -k
  159. - job_name: "CMake, mingw-w64, Debug x64, Schannel, Static, Unity"
  160. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  161. BUILD_SYSTEM: CMake
  162. PRJ_GEN: "MSYS Makefiles"
  163. PRJ_CFG: Debug
  164. OPENSSL: OFF
  165. SCHANNEL: ON
  166. ENABLE_UNICODE: OFF
  167. HTTP_ONLY: OFF
  168. TESTING: OFF
  169. SHARED: OFF
  170. ADD_PATH: "C:\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin;C:\\msys64\\usr\\bin"
  171. MSYS2_ARG_CONV_EXCL: "/*"
  172. BUILD_OPT: -k
  173. UNITY: "ON"
  174. - job_name: "CMake, mingw-w64, Debug x86, Schannel, Static"
  175. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  176. BUILD_SYSTEM: CMake
  177. PRJ_GEN: "MSYS Makefiles"
  178. PRJ_CFG: Debug
  179. OPENSSL: OFF
  180. SCHANNEL: ON
  181. ENABLE_UNICODE: OFF
  182. HTTP_ONLY: OFF
  183. TESTING: ON
  184. SHARED: OFF
  185. DISABLED_TESTS: "!1139 !1501 ~1056"
  186. ADD_PATH: "C:\\mingw-w64\\i686-6.3.0-posix-dwarf-rt_v5-rev1\\mingw32\\bin;C:\\msys64\\usr\\bin"
  187. MSYS2_ARG_CONV_EXCL: "/*"
  188. BUILD_OPT: -k
  189. - job_name: "CMake, mingw, Debug x86, no SSL, Static"
  190. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
  191. BUILD_SYSTEM: CMake
  192. PRJ_GEN: "MSYS Makefiles"
  193. PRJ_CFG: Debug
  194. OPENSSL: OFF
  195. SCHANNEL: OFF
  196. ENABLE_UNICODE: OFF
  197. HTTP_ONLY: OFF
  198. TESTING: ON
  199. SHARED: OFF
  200. DISABLED_TESTS: "!1139 !1501 ~1056"
  201. ADD_PATH: "C:\\MinGW\\bin;C:\\msys64\\usr\\bin"
  202. MSYS2_ARG_CONV_EXCL: "/*"
  203. BUILD_OPT: -k
  204. # winbuild-based builds
  205. - job_name: "winbuild, VS2015, Debug"
  206. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  207. BUILD_SYSTEM: winbuild_vs2015
  208. DEBUG: yes
  209. PATHPART: debug
  210. TESTING: OFF
  211. ENABLE_UNICODE: no
  212. - job_name: "winbuild, VS2015, Release"
  213. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  214. BUILD_SYSTEM: winbuild_vs2015
  215. DEBUG: no
  216. PATHPART: release
  217. TESTING: OFF
  218. ENABLE_UNICODE: no
  219. - job_name: "winbuild, VS2017, Debug"
  220. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  221. BUILD_SYSTEM: winbuild_vs2017
  222. DEBUG: yes
  223. PATHPART: debug
  224. TESTING: OFF
  225. ENABLE_UNICODE: no
  226. - job_name: "winbuild, VS2017, Release"
  227. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  228. BUILD_SYSTEM: winbuild_vs2017
  229. DEBUG: no
  230. PATHPART: release
  231. TESTING: OFF
  232. ENABLE_UNICODE: no
  233. - job_name: "winbuild, VS2015, Debug, Unicode"
  234. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  235. BUILD_SYSTEM: winbuild_vs2015
  236. DEBUG: yes
  237. PATHPART: debug
  238. TESTING: OFF
  239. ENABLE_UNICODE: yes
  240. - job_name: "winbuild, VS2015, Release, Unicode"
  241. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
  242. BUILD_SYSTEM: winbuild_vs2015
  243. DEBUG: no
  244. PATHPART: release
  245. TESTING: OFF
  246. ENABLE_UNICODE: yes
  247. - job_name: "winbuild, VS2017, Debug, Unicode"
  248. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  249. BUILD_SYSTEM: winbuild_vs2017
  250. DEBUG: yes
  251. PATHPART: debug
  252. TESTING: OFF
  253. ENABLE_UNICODE: yes
  254. - job_name: "winbuild, VS2017, Release, Unicode"
  255. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  256. BUILD_SYSTEM: winbuild_vs2017
  257. DEBUG: no
  258. PATHPART: release
  259. TESTING: OFF
  260. ENABLE_UNICODE: yes
  261. # generated VisualStudioSolution-based builds
  262. - job_name: "VisualStudioSolution, VS2017, Debug"
  263. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  264. BUILD_SYSTEM: VisualStudioSolution
  265. PRJ_CFG: "DLL Debug - DLL Windows SSPI - DLL WinIDN"
  266. TESTING: OFF
  267. VC_VERSION: VC14.10
  268. # autotools-based builds (NOT mingw cross-compiling, but msys2 native)
  269. - job_name: "autotools, msys2, Debug, no Proxy, no SSL"
  270. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  271. BUILD_SYSTEM: autotools
  272. TESTING: ON
  273. DISABLED_TESTS: "!19 ~1056 !1233"
  274. ADD_PATH: "C:\\msys64\\usr\\bin"
  275. CONFIG_ARGS: "--enable-debug --enable-werror --disable-threaded-resolver --disable-proxy --without-ssl --enable-websockets"
  276. - job_name: "autotools, msys2, Debug, no SSL"
  277. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  278. BUILD_SYSTEM: autotools
  279. TESTING: ON
  280. DISABLED_TESTS: "!19 !504 !704 !705 ~1056 !1233"
  281. ADD_PATH: "C:\\msys64\\usr\\bin"
  282. CONFIG_ARGS: "--enable-debug --enable-werror --disable-threaded-resolver --without-ssl --enable-websockets"
  283. - job_name: "autotools, msys2, Release, no SSL"
  284. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
  285. BUILD_SYSTEM: autotools
  286. TESTING: ON
  287. DISABLED_TESTS: "!19 !504 !704 !705 ~1056 !1233"
  288. ADD_PATH: "C:\\msys64\\usr\\bin"
  289. CONFIG_ARGS: "--enable-warnings --enable-werror --without-ssl --enable-websockets"
  290. # autotools-based Cygwin build
  291. - job_name: "autotools, cygwin, Debug, no SSL"
  292. APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2022"
  293. BUILD_SYSTEM: autotools
  294. TESTING: ON
  295. DISABLED_TESTS: "~1056"
  296. ADD_PATH: "C:\\cygwin64\\bin"
  297. CONFIG_ARGS: "--enable-debug --enable-werror --disable-threaded-resolver --without-ssl --enable-websockets"
  298. POSIX_PATH_PREFIX: "/cygdrive"
  299. install:
  300. - if not "%ADD_PATH%"=="" (
  301. set "PATH=%ADD_PATH%;%PATH%" )
  302. build_script:
  303. - if %BUILD_SYSTEM%==CMake (
  304. cmake .
  305. -G"%PRJ_GEN%"
  306. %TARGET%
  307. -DCURL_USE_OPENSSL=%OPENSSL%
  308. -DCURL_USE_SCHANNEL=%SCHANNEL%
  309. -DHTTP_ONLY=%HTTP_ONLY%
  310. -DBUILD_SHARED_LIBS=%SHARED%
  311. -DBUILD_TESTING=%TESTING%
  312. -DENABLE_WEBSOCKETS=%WEBSOCKETS%
  313. -DCMAKE_UNITY_BUILD=%UNITY%
  314. -DCURL_WERROR=ON
  315. -DENABLE_DEBUG=ON
  316. -DENABLE_UNICODE=%ENABLE_UNICODE%
  317. -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=""
  318. -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=""
  319. -DCMAKE_INSTALL_PREFIX="C:/CURL"
  320. -DCMAKE_BUILD_TYPE=%PRJ_CFG% &&
  321. cmake --build . --config %PRJ_CFG% --parallel 2 --clean-first -- %BUILD_OPT%
  322. ) else (
  323. if %BUILD_SYSTEM%==VisualStudioSolution (
  324. cd projects &&
  325. .\\generate.bat %VC_VERSION% &&
  326. msbuild.exe /p:Configuration="%PRJ_CFG%" "Windows\\%VC_VERSION%\\curl-all.sln"
  327. ) else (
  328. if %BUILD_SYSTEM%==winbuild_vs2015 (
  329. call buildconf.bat &&
  330. cd winbuild &&
  331. call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 &&
  332. call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 &&
  333. 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% &&
  334. ..\builds\libcurl-vc14-x64-%PATHPART%-dll-ssl-dll-ipv6-sspi\bin\curl.exe -V
  335. ) else (
  336. if %BUILD_SYSTEM%==winbuild_vs2017 (
  337. call buildconf.bat &&
  338. cd winbuild &&
  339. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" &&
  340. 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% &&
  341. ..\builds\libcurl-vc14.10-x64-%PATHPART%-dll-ssl-dll-ipv6-sspi\bin\curl.exe -V
  342. ) else (
  343. if %BUILD_SYSTEM%==autotools (
  344. 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"
  345. )))))
  346. - if %TESTING%==ON (
  347. if %BUILD_SYSTEM%==CMake (
  348. cmake --build . --config %PRJ_CFG% --parallel 2 --target testdeps
  349. ))
  350. test_script:
  351. - if exist C:/msys64/usr/bin/curl.exe (
  352. set ACURL=-ac %POSIX_PATH_PREFIX%/c/msys64/usr/bin/curl.exe )
  353. - if exist C:/Windows/System32/curl.exe (
  354. set ACURL=-ac %POSIX_PATH_PREFIX%/c/Windows/System32/curl.exe )
  355. - if %TESTING%==ON (
  356. if %BUILD_SYSTEM%==CMake (
  357. set TFLAGS=%ACURL% %DISABLED_TESTS% &&
  358. cmake --build . --config %PRJ_CFG% --target test-ci
  359. ) else (
  360. if %BUILD_SYSTEM%==autotools (
  361. bash.exe -e -l -c "cd %POSIX_PATH_PREFIX%/c/projects/curl && make V=1 TFLAGS='%ACURL% %DISABLED_TESTS%' test-ci"
  362. ) else (
  363. bash.exe -e -l -c "cd %POSIX_PATH_PREFIX%/c/projects/curl/tests && ./runtests.pl -a -p !flaky -r -rm %ACURL% %DISABLED_TESTS%"
  364. ))
  365. )
  366. # select branches to avoid testing feature branches twice (as branch and as pull request)
  367. branches:
  368. only:
  369. - master
  370. - /\/ci$/
  371. skip_commits:
  372. files:
  373. - '.azure-pipelines.yml'
  374. - '.circleci/**/*'
  375. - '.cirrus.yml'
  376. - '.github/**/*'
  377. - 'packages/**/*'
  378. - 'plan9/**/*'
  379. artifacts:
  380. - path: '**/curl.exe'
  381. name: curl
  382. - path: '**/*curl*.dll'
  383. name: libcurl dll