2
0

.azure-pipelines.yml 9.1 KB

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