.azure-pipelines.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  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://dev.azure.com/daniel0244/curl/_build?view=runs
  25. #
  26. # Azure Pipelines configuration:
  27. # https://aka.ms/yaml
  28. trigger:
  29. branches:
  30. include:
  31. - 'master'
  32. - '*/ci'
  33. paths:
  34. exclude:
  35. - '.circleci/*'
  36. - '.cirrus.yml'
  37. - '.github/*'
  38. - '.github/workflows/*'
  39. - 'appveyor.yml'
  40. - 'packages/*'
  41. - 'plan9/*'
  42. pr:
  43. branches:
  44. include:
  45. - 'master'
  46. paths:
  47. exclude:
  48. - '.circleci/*'
  49. - '.cirrus.yml'
  50. - '.github/*'
  51. - '.github/workflows/*'
  52. - 'appveyor.yml'
  53. - 'packages/*'
  54. - 'plan9/*'
  55. stages:
  56. ##########################################
  57. ### Linux jobs first
  58. ##########################################
  59. - stage: linux
  60. dependsOn: []
  61. jobs:
  62. - job: ubuntu
  63. # define defaults to make sure variables are always expanded/replaced
  64. variables:
  65. install: ''
  66. configure: ''
  67. tests: '!433'
  68. timeoutInMinutes: 60
  69. pool:
  70. vmImage: 'ubuntu-latest'
  71. strategy:
  72. matrix:
  73. default:
  74. name: default
  75. install:
  76. configure: --enable-debug --with-openssl
  77. disable_ipv6:
  78. name: w/o IPv6
  79. configure: --disable-ipv6 --with-openssl
  80. disable_http_smtp_imap:
  81. name: w/o HTTP/SMTP/IMAP
  82. configure: --disable-http --disable-smtp --disable-imap --without-ssl
  83. disable_thredres:
  84. name: sync resolver
  85. configure: --disable-threaded-resolver --with-openssl
  86. https_only:
  87. name: HTTPS only
  88. configure: --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp --disable-smb --disable-smtp --disable-telnet --disable-tftp --with-openssl
  89. torture:
  90. name: torture
  91. install: libnghttp2-dev
  92. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl
  93. tests: -n -t --shallow=25 !FTP
  94. steps:
  95. - script: sudo apt-get update && sudo apt-get install -y stunnel4 python3-impacket libzstd-dev libbrotli-dev $(install)
  96. displayName: 'apt install'
  97. retryCountOnTaskFailure: 3
  98. - script: autoreconf -fi && ./configure --enable-warnings --enable-werror $(configure)
  99. displayName: 'configure $(name)'
  100. - script: make V=1 && make V=1 examples && cd tests && make V=1
  101. displayName: 'compile'
  102. env:
  103. MAKEFLAGS: "-j 2"
  104. - script: make V=1 test-ci
  105. displayName: 'test'
  106. env:
  107. AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
  108. TFLAGS: "-ac /usr/bin/curl -r $(tests)"
  109. - stage: distcheck
  110. dependsOn: []
  111. jobs:
  112. - job: ubuntu
  113. timeoutInMinutes: 30
  114. pool:
  115. vmImage: 'ubuntu-latest'
  116. steps:
  117. - script: autoreconf -fi && ./configure --without-ssl
  118. displayName: 'configure $(name)'
  119. - script: make && ./maketgz 99.98.97
  120. displayName: 'make tarball'
  121. - script: |
  122. tar xf curl-99.98.97.tar.gz
  123. cd curl-99.98.97
  124. ./configure --prefix=$HOME/temp --without-ssl
  125. make
  126. make TFLAGS=1 test
  127. make install
  128. # basic check of the installed files
  129. cd ..
  130. bash scripts/installcheck.sh $HOME/temp
  131. rm -rf curl-99.98.97
  132. displayName: 'verify in-tree configure build'
  133. - script: |
  134. # verify out-of-tree build
  135. tar xf curl-99.98.97.tar.gz
  136. touch curl-99.98.97/docs/{cmdline-opts,libcurl}/Makefile.inc
  137. mkdir build
  138. cd build
  139. ../curl-99.98.97/configure --without-ssl
  140. make
  141. make TFLAGS='-p 1 1139' test
  142. # verify cmake build
  143. cd ..
  144. rm -rf curl-99.98.97
  145. displayName: 'verify out-of-tree configure build'
  146. - script: |
  147. tar xf curl-99.98.97.tar.gz
  148. cd curl-99.98.97
  149. mkdir build
  150. cd build
  151. cmake ..
  152. make
  153. displayName: 'verify out-of-tree cmake build'
  154. - stage: scanbuild
  155. dependsOn: []
  156. jobs:
  157. - job: ubuntu
  158. timeoutInMinutes: 30
  159. pool:
  160. vmImage: 'ubuntu-latest'
  161. steps:
  162. - script: sudo apt-get update && sudo apt-get install -y clang-tools clang libssl-dev libssh2-1-dev libpsl-dev libbrotli-dev libzstd-dev
  163. displayName: 'apt install'
  164. retryCountOnTaskFailure: 3
  165. - script: autoreconf -fi
  166. displayName: 'autoreconf'
  167. - script: scan-build ./configure --enable-debug --enable-werror --with-openssl --with-libssh2
  168. displayName: 'configure'
  169. env:
  170. CC: "clang"
  171. CCX: "clang++"
  172. - script: scan-build --status-bugs make
  173. displayName: 'make'
  174. - script: scan-build --status-bugs make examples
  175. displayName: 'make examples'
  176. ##########################################
  177. ### Windows jobs below
  178. ##########################################
  179. - stage: windows
  180. dependsOn: []
  181. variables:
  182. agent.preferPowerShellOnContainers: true
  183. jobs:
  184. - job: msys
  185. # define defaults to make sure variables are always expanded/replaced
  186. variables:
  187. container_img: ''
  188. container_cmd: ''
  189. configure: ''
  190. tests: ''
  191. timeoutInMinutes: 120
  192. pool:
  193. vmImage: 'windows-2019'
  194. strategy:
  195. matrix:
  196. v2_mingw32_openssl:
  197. name: 32-bit OpenSSL/libssh2
  198. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  199. container_cmd: C:\msys64\usr\bin\sh
  200. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
  201. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --with-libssh2 --with-openssl
  202. tests: "~571"
  203. v2_mingw64_openssl:
  204. name: 64-bit OpenSSL/libssh2
  205. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  206. container_cmd: C:\msys64\usr\bin\sh
  207. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
  208. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh2 --with-openssl
  209. tests: "~571"
  210. v2_mingw64_libssh:
  211. name: 64-bit OpenSSL/libssh
  212. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  213. container_cmd: C:\msys64\usr\bin\sh
  214. prepare: pacman -S --needed --noconfirm --noprogressbar libssh-devel mingw-w64-x86_64-libssh
  215. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh --with-openssl
  216. tests: "~571 ~614"
  217. v1_mingw:
  218. name: 32-bit (legacy)
  219. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw:ltsc2019
  220. container_cmd: C:\MinGW\msys\1.0\bin\sh
  221. configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --without-ssl --with-mingw1-deprecated
  222. tests: "!203 !1143"
  223. v1_mingw32:
  224. name: 32-bit w/o zlib
  225. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw32:ltsc2019
  226. container_cmd: C:\MinGW\msys\1.0\bin\sh
  227. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --without-zlib --without-ssl
  228. tests: "!203 !1143"
  229. v1_mingw64:
  230. name: 64-bit w/o zlib
  231. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw64:ltsc2019
  232. container_cmd: C:\MinGW\msys\1.0\bin\sh
  233. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --without-zlib --without-ssl
  234. tests: "!203 !1143"
  235. v2_mingw32_schannel:
  236. name: 32-bit Schannel/SSPI/WinIDN/libssh2
  237. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  238. container_cmd: C:\msys64\usr\bin\sh
  239. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
  240. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
  241. tests: "~571"
  242. v2_mingw64_schannel:
  243. name: 64-bit Schannel/SSPI/WinIDN/libssh2
  244. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  245. container_cmd: C:\msys64\usr\bin\sh
  246. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
  247. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
  248. tests: "~571"
  249. v1_mingw_schannel:
  250. name: 32-bit Schannel/SSPI/WinIDN (legacy)
  251. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw:ltsc2019
  252. container_cmd: C:\MinGW\msys\1.0\bin\sh
  253. configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --enable-sspi --with-schannel --with-winidn --with-mingw1-deprecated
  254. tests: "!203 !305 !311 !312 !313 !404 !1143 !2033 !2035 !2038 !2041 !2042 !2048 !2070 !2079 !2087 !3023 !3024"
  255. v1_mingw32_schannel:
  256. name: 32-bit Schannel/SSPI/WinIDN w/o zlib
  257. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw32:ltsc2019
  258. container_cmd: C:\MinGW\msys\1.0\bin\sh
  259. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --without-zlib
  260. tests: "!203 !1143"
  261. v1_mingw64_schannel:
  262. name: 64-bit Schannel/SSPI/WinIDN w/o zlib
  263. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw64:ltsc2019
  264. container_cmd: C:\MinGW\msys\1.0\bin\sh
  265. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --without-zlib
  266. tests: "!203 !1143"
  267. container:
  268. image: $(container_img)
  269. env:
  270. MSYS2_PATH_TYPE: inherit
  271. steps:
  272. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && $(prepare)"
  273. displayName: 'prepare'
  274. condition: variables.prepare
  275. retryCountOnTaskFailure: 3
  276. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && autoreconf -fi && ./configure $(configure)"
  277. displayName: 'configure $(name)'
  278. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 && make V=1 examples && cd tests && make V=1"
  279. displayName: 'compile'
  280. env:
  281. MAKEFLAGS: "-j 2"
  282. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 install && PATH=/usr/bin:/bin find . -type f -path '*/.libs/*.exe' -print -execdir mv -t .. {} \;"
  283. displayName: 'install'
  284. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 test-ci"
  285. displayName: 'test'
  286. env:
  287. AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
  288. TFLAGS: "-ac /usr/bin/curl.exe !IDN !SCP ~612 ~1056 $(tests)"