.azure-pipelines.yml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2021, 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-openssl
  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: ./buildconf && ./configure --enable-warnings --enable-werror $(configure)
  78. displayName: 'configure $(name)'
  79. - script: make V=1 && cd tests && make V=1
  80. displayName: 'compile'
  81. env:
  82. MAKEFLAGS: "-j 2"
  83. - script: make test-nonflaky
  84. displayName: 'test'
  85. env:
  86. AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
  87. TFLAGS: "-r $(tests)"
  88. ##########################################
  89. ### Windows jobs below
  90. ##########################################
  91. - stage: windows
  92. dependsOn: []
  93. variables:
  94. agent.preferPowerShellOnContainers: true
  95. jobs:
  96. - job: windows
  97. # define defaults to make sure variables are always expanded/replaced
  98. variables:
  99. container_img: ''
  100. container_cmd: ''
  101. configure: ''
  102. tests: ''
  103. timeoutInMinutes: 120
  104. pool:
  105. vmImage: 'windows-2019'
  106. strategy:
  107. matrix:
  108. msys2_mingw32_debug_openssl:
  109. name: 32-bit OpenSSL/libssh2
  110. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  111. container_cmd: C:\msys64\usr\bin\sh
  112. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2
  113. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --with-libssh2 --with-openssl
  114. tests: ~571 ~612 ~1056 ~1299
  115. msys2_mingw64_debug_openssl:
  116. name: 64-bit OpenSSL/libssh2
  117. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  118. container_cmd: C:\msys64\usr\bin\sh
  119. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2
  120. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh2 --with-openssl
  121. tests: ~571 ~612 ~1056 ~1299
  122. msys1_mingw_debug:
  123. name: 32-bit (legacy)
  124. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw:ltsc2019
  125. container_cmd: C:\MinGW\msys\1.0\bin\sh
  126. configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --without-ssl
  127. tests: ~203 ~1056 ~1143
  128. msys1_mingw32_debug:
  129. name: 32-bit w/o zlib
  130. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw32:ltsc2019
  131. container_cmd: C:\MinGW\msys\1.0\bin\sh
  132. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --without-zlib --without-ssl
  133. tests: ~203 ~1056 ~1143 ~1299
  134. msys1_mingw64_debug:
  135. name: 64-bit w/o zlib
  136. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw64:ltsc2019
  137. container_cmd: C:\MinGW\msys\1.0\bin\sh
  138. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --without-zlib --without-ssl
  139. tests: ~203 ~1056 ~1143 ~1299
  140. msys2_mingw32_debug_schannel:
  141. name: 32-bit Schannel/SSPI/WinIDN/libssh2
  142. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  143. container_cmd: C:\msys64\usr\bin\sh
  144. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2
  145. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
  146. tests: ~165 ~310 ~571 ~612 ~1056 ~1299 ~1448 ~2034 ~2037 ~2041 ~2046 ~2047 ~3000 ~3001
  147. msys2_mingw64_debug_schannel:
  148. name: 64-bit Schannel/SSPI/WinIDN/libssh2
  149. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  150. container_cmd: C:\msys64\usr\bin\sh
  151. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2
  152. 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
  153. tests: ~165 ~310 ~571 ~612 ~1056 ~1299 ~1448 ~2034 ~2037 ~2041 ~2046 ~2047 ~3000 ~3001
  154. msys1_mingw_debug_schannel:
  155. name: 32-bit Schannel/SSPI/WinIDN (legacy)
  156. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw:ltsc2019
  157. container_cmd: C:\MinGW\msys\1.0\bin\sh
  158. configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --enable-sspi --with-schannel --with-winidn
  159. tests: ~203 ~305 ~310 ~311 ~312 ~313 ~404 ~1056 ~1143 ~2034 ~2035 ~2037 ~2038 ~2041 ~2042 ~2048 ~3000 ~3001
  160. msys1_mingw32_debug_schannel:
  161. name: 32-bit Schannel/SSPI/WinIDN w/o zlib
  162. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw32:ltsc2019
  163. container_cmd: C:\MinGW\msys\1.0\bin\sh
  164. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --without-zlib
  165. tests: ~203 ~310 ~1056 ~1143 ~1299 ~2034 ~2037 ~2041 ~3000 ~3001
  166. msys1_mingw64_debug_schannel:
  167. name: 64-bit Schannel/SSPI/WinIDN w/o zlib
  168. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw64:ltsc2019
  169. container_cmd: C:\MinGW\msys\1.0\bin\sh
  170. 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
  171. tests: ~203 ~310 ~1056 ~1143 ~1299 ~2034 ~2037 ~2041 ~3000 ~3001
  172. container:
  173. image: $(container_img)
  174. env:
  175. MSYS2_PATH_TYPE: inherit
  176. steps:
  177. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && $(prepare)"
  178. displayName: 'prepare'
  179. condition: variables.prepare
  180. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && ./buildconf && ./configure $(configure)"
  181. displayName: 'configure $(name)'
  182. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 && cd tests && make V=1"
  183. displayName: 'compile'
  184. env:
  185. MAKEFLAGS: "-j 2"
  186. - 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 .. {} \;"
  187. displayName: 'install'
  188. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 test-nonflaky"
  189. displayName: 'test'
  190. env:
  191. AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
  192. TFLAGS: "-r -rm -u !SCP $(tests)"