.azure-pipelines.yml 12 KB

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