.azure-pipelines.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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. variables:
  56. MAKEFLAGS: '-j 2'
  57. stages:
  58. ##########################################
  59. ### Linux jobs first
  60. ##########################################
  61. - stage: linux
  62. dependsOn: []
  63. jobs:
  64. - job: ubuntu
  65. # define defaults to make sure variables are always expanded/replaced
  66. variables:
  67. install: ''
  68. configure: ''
  69. tests: '!433'
  70. timeoutInMinutes: 60
  71. pool:
  72. vmImage: 'ubuntu-latest'
  73. strategy:
  74. matrix:
  75. default:
  76. name: default
  77. install:
  78. configure: --enable-debug --with-openssl
  79. disable_ipv6:
  80. name: w/o IPv6
  81. configure: --disable-ipv6 --with-openssl
  82. disable_http_smtp_imap:
  83. name: w/o HTTP/SMTP/IMAP
  84. configure: --disable-http --disable-smtp --disable-imap --without-ssl
  85. disable_thredres:
  86. name: sync resolver
  87. configure: --disable-threaded-resolver --with-openssl
  88. https_only:
  89. name: HTTPS only
  90. 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
  91. torture:
  92. name: torture
  93. install: libnghttp2-dev
  94. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl
  95. tests: -n -t --shallow=25 !FTP
  96. steps:
  97. - script: sudo apt-get update && sudo apt-get install -y stunnel4 python3-impacket libzstd-dev libbrotli-dev $(install)
  98. displayName: 'apt install'
  99. retryCountOnTaskFailure: 3
  100. - script: autoreconf -fi && ./configure --enable-warnings --enable-werror $(configure)
  101. displayName: 'configure $(name)'
  102. - script: make V=1 && make V=1 examples && cd tests && make V=1
  103. displayName: 'compile'
  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'
  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: msys2
  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. 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
  201. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --with-libssh2 --with-openssl
  202. tests: "~571"
  203. 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
  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. 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. mingw32:
  218. name: 32-bit w/o zlib
  219. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  220. container_cmd: C:\msys64\usr\bin\sh
  221. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --without-zlib --without-ssl
  222. tests: "!203 !1143"
  223. mingw64:
  224. name: 64-bit w/o zlib
  225. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  226. container_cmd: C:\msys64\usr\bin\sh
  227. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --without-zlib --without-ssl
  228. tests: "!203 !1143"
  229. mingw32_schannel:
  230. name: 32-bit Schannel/SSPI/WinIDN/libssh2
  231. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  232. container_cmd: C:\msys64\usr\bin\sh
  233. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2
  234. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
  235. tests: "~571"
  236. mingw64_schannel:
  237. name: 64-bit Schannel/SSPI/WinIDN/libssh2
  238. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  239. container_cmd: C:\msys64\usr\bin\sh
  240. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2
  241. 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
  242. tests: "~571"
  243. mingw32_schannel_nozlib:
  244. name: 32-bit Schannel/SSPI/WinIDN w/o zlib
  245. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  246. container_cmd: C:\msys64\usr\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. mingw64_schannel_nozlib:
  250. name: 64-bit Schannel/SSPI/WinIDN w/o zlib
  251. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  252. container_cmd: C:\msys64\usr\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. retryCountOnTaskFailure: 3
  264. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && autoreconf -fi && ./configure $(configure)"
  265. displayName: 'configure $(name)'
  266. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 && make V=1 examples && cd tests && make V=1"
  267. displayName: 'compile'
  268. - 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 .. {} \;"
  269. displayName: 'install'
  270. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 test-ci"
  271. displayName: 'test'
  272. env:
  273. AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
  274. TFLAGS: "-ac /usr/bin/curl.exe !IDN !SCP ~612 $(tests)"