.azure-pipelines.yml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) 1998 - 2020, 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: ''
  48. timeoutInMinutes: 60
  49. pool:
  50. vmImage: 'ubuntu-latest'
  51. strategy:
  52. matrix:
  53. default:
  54. name: default
  55. configure: --enable-debug
  56. disable_ipv6:
  57. name: w/o IPv6
  58. configure: --disable-ipv6
  59. disable_http_smtp_imap:
  60. name: w/o HTTP/SMTP/IMAP
  61. configure: --disable-http --disable-smtp --disable-imap
  62. disable_thredres:
  63. name: sync resolver
  64. configure: --disable-threaded-resolver
  65. http_only:
  66. name: HTTP only
  67. 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
  68. torture:
  69. name: torture
  70. install: libnghttp2-dev
  71. configure: --enable-debug --disable-shared --disable-threaded-resolver
  72. tests: -n -t --shallow=40 !FTP
  73. steps:
  74. - script: sudo apt-get update && sudo apt-get install -y stunnel4 python-impacket libzstd-dev libbrotli-dev $(install)
  75. displayName: 'apt install'
  76. - script: ./buildconf && ./configure --enable-warnings --enable-werror $(configure)
  77. displayName: 'configure $(name)'
  78. - script: make
  79. displayName: 'make && cd tests && make'
  80. - script: make test-nonflaky
  81. displayName: 'test'
  82. env:
  83. AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
  84. TFLAGS: "-r $(tests)"
  85. ##########################################
  86. ### Windows jobs below
  87. ##########################################
  88. - stage: windows
  89. dependsOn: []
  90. variables:
  91. agent.preferPowerShellOnContainers: true
  92. jobs:
  93. - job: windows
  94. # define defaults to make sure variables are always expanded/replaced
  95. variables:
  96. container_img: ''
  97. container_cmd: ''
  98. configure: ''
  99. tests: ''
  100. timeoutInMinutes: 120
  101. pool:
  102. vmImage: 'windows-2019'
  103. strategy:
  104. matrix:
  105. msys2_mingw32_debug_openssl:
  106. name: 32-bit OpenSSL and MQTT
  107. container_img: mback2k/curl-docker-winbuildenv-msys2-mingw32:ltsc2019
  108. container_cmd: C:\msys64\usr\bin\sh
  109. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2
  110. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --with-libssh2
  111. tests: ~571 ~612 ~1056 ~1299 !SCP
  112. msys2_mingw64_debug_openssl:
  113. name: 64-bit OpenSSL and MQTT
  114. container_img: mback2k/curl-docker-winbuildenv-msys2-mingw64:ltsc2019
  115. container_cmd: C:\msys64\usr\bin\sh
  116. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2
  117. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh2
  118. tests: ~571 ~612 ~1056 ~1299 !SCP
  119. msys1_mingw_debug_openssl:
  120. name: 32-bit OpenSSL (legacy)
  121. container_img: mback2k/curl-docker-winbuildenv-msys1-mingw:ltsc2019
  122. container_cmd: C:\MinGW\msys\1.0\bin\sh
  123. configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug
  124. tests: ~203 ~1056 ~1143
  125. msys1_mingw32_debug_openssl:
  126. name: 32-bit OpenSSL w/o zlib
  127. container_img: mback2k/curl-docker-winbuildenv-msys1-mingw32:ltsc2019
  128. container_cmd: C:\MinGW\msys\1.0\bin\sh
  129. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --without-zlib
  130. tests: ~203 ~1056 ~1143 ~1299
  131. msys1_mingw64_debug_openssl:
  132. name: 64-bit OpenSSL w/o zlib
  133. container_img: mback2k/curl-docker-winbuildenv-msys1-mingw64:ltsc2019
  134. container_cmd: C:\MinGW\msys\1.0\bin\sh
  135. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --without-zlib
  136. tests: ~203 ~1056 ~1143 ~1299
  137. msys2_mingw32_debug_schannel:
  138. name: 32-bit Schannel/SSPI/WinIDN
  139. container_img: mback2k/curl-docker-winbuildenv-msys2-mingw32:ltsc2019
  140. container_cmd: C:\msys64\usr\bin\sh
  141. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2
  142. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --without-ssl --with-schannel --with-winidn --with-libssh2
  143. tests: ~165 ~310 ~571 ~612 ~1056 ~1299 ~1448 ~2034 ~2037 ~2041 ~2046 ~2047 ~3000 ~3001 !SCP
  144. msys2_mingw64_debug_schannel:
  145. name: 64-bit Schannel/SSPI/WinIDN
  146. container_img: mback2k/curl-docker-winbuildenv-msys2-mingw64:ltsc2019
  147. container_cmd: C:\msys64\usr\bin\sh
  148. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2
  149. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --enable-sspi --without-ssl --with-schannel --with-winidn --with-libssh2
  150. tests: ~165 ~310 ~571 ~612 ~1056 ~1299 ~1448 ~2034 ~2037 ~2041 ~2046 ~2047 ~3000 ~3001 !SCP
  151. msys1_mingw_debug_schannel:
  152. name: 32-bit Schannel/SSPI/WinIDN (legacy)
  153. container_img: mback2k/curl-docker-winbuildenv-msys1-mingw:ltsc2019
  154. container_cmd: C:\MinGW\msys\1.0\bin\sh
  155. configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --enable-sspi --without-ssl --with-schannel --with-winidn
  156. tests: ~203 ~305 ~310 ~311 ~312 ~313 ~404 ~1056 ~1143 ~2034 ~2035 ~2037 ~2038 ~2041 ~2042 ~2048 ~3000 ~3001
  157. msys1_mingw32_debug_schannel:
  158. name: 32-bit Schannel/SSPI/WinIDN w/o zlib
  159. container_img: mback2k/curl-docker-winbuildenv-msys1-mingw32:ltsc2019
  160. container_cmd: C:\MinGW\msys\1.0\bin\sh
  161. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --without-ssl --with-schannel --with-winidn --without-zlib
  162. tests: ~203 ~310 ~1056 ~1143 ~1299 ~2034 ~2037 ~2041 ~3000 ~3001
  163. msys1_mingw64_debug_schannel:
  164. name: 64-bit Schannel/SSPI/WinIDN w/o zlib
  165. container_img: mback2k/curl-docker-winbuildenv-msys1-mingw64:ltsc2019
  166. container_cmd: C:\MinGW\msys\1.0\bin\sh
  167. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --enable-sspi --without-ssl --with-schannel --with-winidn --without-zlib
  168. tests: ~203 ~310 ~1056 ~1143 ~1299 ~2034 ~2037 ~2041 ~3000 ~3001
  169. container:
  170. image: $(container_img)
  171. env:
  172. MSYS2_PATH_TYPE: inherit
  173. steps:
  174. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && $(prepare)"
  175. displayName: 'prepare'
  176. condition: variables.prepare
  177. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && ./buildconf && ./configure $(configure)"
  178. displayName: 'configure $(name)'
  179. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make && cd tests && make"
  180. displayName: 'make'
  181. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make install && PATH=/usr/bin:/bin find . -type f -path '*/.libs/*.exe' -print -execdir mv -t .. {} \;"
  182. displayName: 'install'
  183. - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make test-nonflaky"
  184. displayName: 'test'
  185. env:
  186. AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
  187. TFLAGS: "-vc /usr/bin/curl.exe -r $(tests)"