.azure-pipelines.yml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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: scanbuild
  110. dependsOn: []
  111. jobs:
  112. - job: ubuntu
  113. timeoutInMinutes: 30
  114. pool:
  115. vmImage: 'ubuntu-latest'
  116. steps:
  117. - script: sudo apt-get update && sudo apt-get install -y clang-tools clang libssl-dev libssh2-1-dev libpsl-dev libbrotli-dev libzstd-dev
  118. displayName: 'apt install'
  119. retryCountOnTaskFailure: 3
  120. - script: autoreconf -fi
  121. displayName: 'autoreconf'
  122. - script: scan-build ./configure --enable-debug --enable-werror --with-openssl --with-libssh2
  123. displayName: 'configure'
  124. env:
  125. CC: "clang"
  126. CCX: "clang++"
  127. - script: scan-build --status-bugs make
  128. displayName: 'make'
  129. - script: scan-build --status-bugs make examples
  130. displayName: 'make examples'
  131. ##########################################
  132. ### Windows jobs below
  133. ##########################################
  134. - stage: windows
  135. dependsOn: []
  136. variables:
  137. agent.preferPowerShellOnContainers: true
  138. jobs:
  139. - job: msys2
  140. # define defaults to make sure variables are always expanded/replaced
  141. variables:
  142. container_img: ''
  143. container_cmd: ''
  144. configure: ''
  145. tests: ''
  146. timeoutInMinutes: 120
  147. pool:
  148. vmImage: 'windows-2019'
  149. strategy:
  150. matrix:
  151. mingw32_openssl:
  152. name: 32-bit OpenSSL/libssh2
  153. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  154. container_cmd: C:\msys64\usr\bin\sh
  155. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2
  156. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --with-libssh2 --with-openssl
  157. tests: "~571"
  158. mingw64_openssl:
  159. name: 64-bit OpenSSL/libssh2
  160. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  161. container_cmd: C:\msys64\usr\bin\sh
  162. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2
  163. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh2 --with-openssl
  164. tests: "~571"
  165. mingw64_libssh:
  166. name: 64-bit OpenSSL/libssh
  167. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  168. container_cmd: C:\msys64\usr\bin\sh
  169. prepare: pacman -S --needed --noconfirm --noprogressbar libssh-devel mingw-w64-x86_64-libssh
  170. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh --with-openssl
  171. tests: "~571 ~614"
  172. mingw32:
  173. name: 32-bit w/o zlib
  174. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  175. container_cmd: C:\msys64\usr\bin\sh
  176. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --without-zlib --without-ssl
  177. tests: "!203 !1143"
  178. mingw64:
  179. name: 64-bit w/o zlib
  180. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  181. container_cmd: C:\msys64\usr\bin\sh
  182. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --without-zlib --without-ssl
  183. tests: "!203 !1143"
  184. mingw32_schannel:
  185. name: 32-bit Schannel/SSPI/WinIDN/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
  189. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
  190. tests: "~571"
  191. mingw64_schannel:
  192. name: 64-bit Schannel/SSPI/WinIDN/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
  196. 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
  197. tests: "~571"
  198. mingw32_schannel_nozlib:
  199. name: 32-bit Schannel/SSPI/WinIDN w/o zlib
  200. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  201. container_cmd: C:\msys64\usr\bin\sh
  202. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --without-zlib
  203. tests: "!203 !1143"
  204. mingw64_schannel_nozlib:
  205. name: 64-bit Schannel/SSPI/WinIDN w/o zlib
  206. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  207. container_cmd: C:\msys64\usr\bin\sh
  208. 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
  209. tests: "!203 !1143"
  210. container:
  211. image: $(container_img)
  212. env:
  213. MSYS2_PATH_TYPE: inherit
  214. steps:
  215. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && $(prepare)"
  216. displayName: 'prepare'
  217. condition: variables.prepare
  218. retryCountOnTaskFailure: 3
  219. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && autoreconf -fi && ./configure $(configure)"
  220. displayName: 'configure $(name)'
  221. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 && make V=1 examples && cd tests && make V=1"
  222. displayName: 'compile'
  223. - 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 .. {} \;"
  224. displayName: 'install'
  225. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 test-ci"
  226. displayName: 'test'
  227. env:
  228. AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
  229. TFLAGS: "-ac /usr/bin/curl.exe !IDN !SCP ~612 $(tests)"