2
0

.cirrus.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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://cirrus-ci.com/github/curl/curl
  25. #
  26. # Cirrus CI configuration:
  27. # https://cirrus-ci.org/guide/writing-tasks/
  28. freebsd_task:
  29. skip: "changesIncludeOnly(
  30. '**/CMakeLists.txt',
  31. '.azure-pipelines.yml',
  32. '.circleci/**',
  33. '.github/**',
  34. 'appveyor.yml',
  35. 'CMake/**',
  36. 'packages/**',
  37. 'plan9/**',
  38. 'projects/**',
  39. 'winbuild/**'
  40. )"
  41. name: FreeBSD
  42. matrix:
  43. - name: FreeBSD 13.2
  44. freebsd_instance:
  45. image_family: freebsd-13-2
  46. - name: FreeBSD 12.4
  47. freebsd_instance:
  48. image_family: freebsd-12-4
  49. env:
  50. CIRRUS_CLONE_DEPTH: 10
  51. CRYPTOGRAPHY_DONT_BUILD_RUST: 1
  52. MAKE_FLAGS: -j 3
  53. pkginstall_script:
  54. - pkg update -f
  55. - pkg install -y autoconf automake libtool pkgconf brotli openldap24-client heimdal libpsl libssh2 openssh-portable libidn2 librtmp libnghttp2 nghttp2 stunnel
  56. - pkg delete -y curl
  57. - python -m ensurepip --default-pip
  58. - python -m pip install --upgrade pip
  59. - pip install "cryptography<3.2"
  60. - pip install "pyOpenSSL<20.0"
  61. - pip install "impacket"
  62. configure_script:
  63. - autoreconf -fi
  64. # Building with the address sanitizer is causing unexplainable test issues due to timeouts
  65. #- case `uname -r` in
  66. # 12.2*)
  67. # export CC=clang;
  68. # export CFLAGS="-fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g";
  69. # export CXXFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g";
  70. # export LDFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer" ;;
  71. # esac
  72. - ./configure --prefix="${HOME}"/install --enable-debug --with-openssl --with-libssh2 --with-brotli --with-gssapi --with-libidn2 --enable-manual --enable-ldap --enable-ldaps --with-librtmp --with-libpsl --with-nghttp2 || { tail -300 config.log; false; }
  73. compile_script:
  74. - make V=1 && make V=1 examples && cd tests && make V=1
  75. test_script:
  76. # blackhole?
  77. - sysctl net.inet.tcp.blackhole
  78. # make sure we don't run blackhole != 0
  79. - sudo sysctl net.inet.tcp.blackhole=0
  80. # Some tests won't run if run as root so run them as another user.
  81. # Make directories world writable so the test step can write wherever it needs.
  82. - find . -type d -exec chmod 777 {} \;
  83. # The OpenSSH server instance for the testsuite cannot be started on FreeBSD,
  84. # therefore the SFTP and SCP tests are disabled right away from the beginning.
  85. - sudo -u nobody make V=1 TFLAGS="-n !SFTP !SCP" test-ci
  86. install_script:
  87. - make V=1 install
  88. windows_task:
  89. skip: "changesIncludeOnly(
  90. '.azure-pipelines.yml',
  91. '.circleci/**',
  92. '.github/**',
  93. 'appveyor.yml',
  94. 'packages/**',
  95. 'plan9/**'
  96. )"
  97. name: Windows
  98. timeout_in: 120m
  99. windows_container:
  100. image: ${container_img}
  101. matrix:
  102. - name: Windows 32-bit shared/release Schannel/SSPI/WinIDN/libssh2
  103. env:
  104. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  105. container_cmd: C:\msys64\usr\bin\sh
  106. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
  107. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
  108. tests: "~571"
  109. make_cmd: make V=1
  110. - name: Windows 32-bit static/release Schannel/SSPI/WinIDN/libssh2
  111. env:
  112. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
  113. container_cmd: C:\msys64\usr\bin\sh
  114. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
  115. configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --disable-shared --enable-static --enable-websockets
  116. tests: "~571"
  117. make_cmd: make LDFLAGS=-all-static V=1
  118. PKG_CONFIG: pkg-config --static
  119. - name: Windows 64-bit shared/release Schannel/SSPI/WinIDN/libssh2
  120. env:
  121. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  122. container_cmd: C:\msys64\usr\bin\sh
  123. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
  124. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --enable-websockets
  125. tests: "~571"
  126. make_cmd: make V=1
  127. - name: Windows 64-bit static/release Schannel/SSPI/WinIDN/libssh2
  128. env:
  129. container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
  130. container_cmd: C:\msys64\usr\bin\sh
  131. prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
  132. configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2 --disable-shared --enable-static --enable-websockets
  133. tests: "~571"
  134. make_cmd: make LDFLAGS=-all-static V=1
  135. PKG_CONFIG: pkg-config --static
  136. env:
  137. CIRRUS_CLONE_DEPTH: 10
  138. MSYS2_PATH_TYPE: inherit
  139. MAKEFLAGS: -j 3
  140. prepare_script: |
  141. %container_cmd% -l -c "cd $(echo '%cd%') && %prepare%"
  142. configure_script: |
  143. %container_cmd% -l -c "cd $(echo '%cd%') && autoreconf -fi && ./configure %configure%"
  144. compile_script: |
  145. %container_cmd% -l -c "cd $(echo '%cd%') && %make_cmd% && %make_cmd% examples && cd tests && %make_cmd%"
  146. install_script: |
  147. %container_cmd% -l -c "cd $(echo '%cd%') && %make_cmd% install && PATH=/usr/bin:/bin find . -type f -path '*/.libs/*.exe' -print -execdir mv -t .. {} \;"
  148. test_script: |
  149. %container_cmd% -l -c "cd $(echo '%cd%') && %make_cmd% TFLAGS='!IDN !SCP ~612 ~1056 %tests%' test-ci"
  150. macos_task:
  151. skip: "changesIncludeOnly(
  152. '.azure-pipelines.yml',
  153. '.circleci/**',
  154. '.github/**',
  155. 'appveyor.yml',
  156. 'packages/**',
  157. 'plan9/**',
  158. 'projects/**',
  159. 'winbuild/**'
  160. )"
  161. name: macOS arm64
  162. macos_instance:
  163. image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
  164. matrix:
  165. - name: macOS arm64 normal
  166. env:
  167. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  168. install_packages: nghttp2
  169. configure: --without-ssl
  170. - name: macOS arm64 debug
  171. env:
  172. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  173. install_packages: nghttp2
  174. configure: --without-ssl --enable-debug
  175. - name: macOS arm64 libssh2
  176. env:
  177. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  178. install_packages: nghttp2 libssh2
  179. configure: --without-ssl --enable-debug --with-libssh2=/opt/homebrew/opt/libssh2
  180. TFLAGS: -n !SFTP !SCP
  181. - name: macOS arm64 libssh-c-ares
  182. env:
  183. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  184. install_packages: nghttp2 openssl libssh
  185. configure: --enable-debug --with-openssl=/opt/homebrew/opt/openssl --with-libssh --enable-ares
  186. - name: macOS arm64 libssh
  187. env:
  188. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  189. install_packages: nghttp2 openssl libssh
  190. configure: --enable-debug --with-openssl=/opt/homebrew/opt/openssl --with-libssh
  191. - name: macOS arm64 c-ares
  192. env:
  193. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  194. install_packages: nghttp2
  195. configure: --without-ssl --enable-debug --enable-ares
  196. - name: macOS arm64 HTTP only
  197. env:
  198. CFLAGS: -Wno-vla -mmacosx-version-min=10.15
  199. install_packages: nghttp2
  200. configure: --enable-debug --enable-maintainer-mode --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 --disable-unix-sockets --disable-shared --without-brotli --without-gssapi --without-libidn2 --without-libpsl --without-librtmp --without-libssh2 --without-nghttp2 --without-ntlm-auth --without-ssl --without-zlib
  201. - name: macOS arm64 SecureTransport http2
  202. env:
  203. CFLAGS: -Wno-vla -mmacosx-version-min=10.8
  204. install_packages: nghttp2
  205. configure: --with-secure-transport
  206. - name: macOS arm64 OpenSSL http2
  207. env:
  208. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  209. install_packages: nghttp2 openssl
  210. configure: --enable-debug --with-openssl=/opt/homebrew/opt/openssl
  211. - name: macOS arm64 LibreSSL http2
  212. env:
  213. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  214. install_packages: nghttp2 libressl
  215. configure: --enable-debug --with-openssl=/opt/homebrew/opt/libressl
  216. - name: macOS arm64 torture
  217. env:
  218. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  219. install_packages: nghttp2 openssl
  220. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/opt/homebrew/opt/openssl
  221. TFLAGS: -n -t --shallow=25 !FTP
  222. - name: macOS arm64 torture-ftp
  223. env:
  224. CFLAGS: -Wno-vla -mmacosx-version-min=10.9
  225. install_packages: nghttp2 openssl
  226. configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/opt/homebrew/opt/openssl
  227. TFLAGS: -n -t --shallow=20 FTP
  228. env:
  229. CIRRUS_CLONE_DEPTH: 10
  230. MAKE_FLAGS: -j 12
  231. pkginstall_script:
  232. - echo libtool autoconf automake pkg-config ${install_packages} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
  233. - "while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done"
  234. - sudo -H python3 -m pip install --upgrade pip
  235. - sudo -H python3 -m pip install impacket
  236. configure_script:
  237. - autoreconf -fi
  238. - ./configure --enable-warnings --enable-werror --enable-websockets ${configure}
  239. compile_script:
  240. - make V=1 && make V=1 examples && cd tests && make V=1
  241. test_script:
  242. - make V=1 test-ci
  243. install_script:
  244. - sudo -H make V=1 install
  245. linux_musl_task:
  246. skip: "changesIncludeOnly(
  247. '**/CMakeLists.txt',
  248. '.azure-pipelines.yml',
  249. '.circleci/**',
  250. '.github/**',
  251. 'appveyor.yml',
  252. 'CMake/**',
  253. 'packages/**',
  254. 'plan9/**',
  255. 'projects/**',
  256. 'winbuild/**'
  257. )"
  258. name: Linux MUSL
  259. container:
  260. image: alpine:3.18
  261. memory: 800M
  262. env:
  263. CIRRUS_CLONE_DEPTH: 10
  264. MAKEFLAGS: -j 3
  265. pkginstall_script:
  266. - apk add --no-cache build-base autoconf automake libtool perl openssl-dev libssh2-dev zlib-dev brotli-dev zstd-dev libidn2-dev openldap-dev heimdal-dev libpsl-dev py3-impacket py3-asn1 py3-six py3-pycryptodomex perl-time-hires openssh stunnel sudo
  267. configure_script:
  268. - autoreconf -fi
  269. - ./configure --enable-warnings --enable-debug --enable-websockets --with-ssl --with-libssh2 --with-libidn2 --with-gssapi --enable-ldap --with-libpsl
  270. compile_script:
  271. - make V=1 && make V=1 examples && make -C tests V=1
  272. test_script:
  273. # TODO: ssh tests don't work, likely because we're running as root
  274. - USER=nobody make V=1 test-ci
  275. install_script:
  276. - make V=1 install