.azure-pipelines.yml 11 KB

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