2
0

.azure-pipelines.yml 12 KB

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