.cirrus.yml 11 KB

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