Artifactspublic-v0

curl

master
ply4 git calls30 ms294 KiB3 cachedprotocol v2
786 lines34 KiBRaw
1# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2#
3# SPDX-License-Identifier: curl
5name: 'macOS'
7'on':
8 push:
9 branches:
10 - master
11 - 'curl-*'
12 - '*/ci'
13 paths-ignore:
14 - '**/*.md'
15 - 'appveyor.*'
16 - 'Dockerfile'
17 - 'projects/**'
18 pull_request:
19 branches:
20 - master
21 - 'curl-*'
22 paths-ignore:
23 - '**/*.md'
24 - 'appveyor.*'
25 - 'Dockerfile'
26 - 'projects/**'
28concurrency:
29 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
30 cancel-in-progress: true
32permissions: {}
33cache-mode: none
35# Apple APIs and the macos-version-min value required to avoid deprecation
36# warnings with llvm/clang, and/or the feature getting enabled at build-time
37# or runtime:
39# - 10.7 Lion (2011) - GSS (build-time, deprecated MIT Kerberos shim)
40# - 10.9 Mavericks (2013) - LDAP (build-time, deprecated), memset_s(), OCSP (runtime)
41# - 10.10 Yosemite (2014) - SYS_recvmsg_x, SYS_sendmsg_x (build-time)
42# - 10.11 El Capitan (2015) - connectx() (runtime)
43# - 10.12 Sierra (2016) - clock_gettime() (build-time, runtime)
44# - 10.14 Mojave (2018) - SecTrustEvaluateWithError() (runtime), GSS Framework
45# - 27.0 Golden Gate (2026) - pipe2() (build-time, runtime)
47env:
48 CURL_CI: github
49 CURL_TEST_MIN: 1720
50 DO_NOT_TRACK: '1'
51 MAKEFLAGS: -j 4
52 LDFLAGS: -w # suppress 'object file was built for newer macOS version than being linked' warnings
54jobs:
55 ios:
56 name: "iOS, ${{ (matrix.build.generator && format('CM-{0}', matrix.build.generator)) || (matrix.build.generate && 'CM' || 'AM' )}} ${{ matrix.build.name }} arm64"
57 runs-on: macos-latest
58 timeout-minutes: 10
59 cache-mode: write
60 env:
61 DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer"
62 CC: 'clang'
63 LDFLAGS: ''
64 MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
65 MATRIX_OPTIONS: ${{ matrix.build.options }}
66 # renovate: datasource=github-tags depName=libressl/portable
67 LIBRESSL_VERSION: 4.4.0
68 strategy:
69 fail-fast: false
70 matrix:
71 build:
72 - name: 'libressl'
73 install_steps: libressl
74 configure: --with-openssl=/Users/runner/libressl --without-libpsl
76 - name: 'libressl'
77 install_steps: libressl
78 generator: Xcode
79 options: --config Debug
80 generate: >-
81 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=OFF
82 -DMACOSX_BUNDLE_GUI_IDENTIFIER=se.curl
83 -DOPENSSL_ROOT_DIR=/Users/runner/libressl
84 -DCURL_USE_LIBPSL=OFF
86 steps:
87 - uses: $/.github/actions/macos-fix-certs
89 - name: 'install prereqs'
90 if: ${{ matrix.build.configure }}
91 timeout-minutes: 5
92 uses: $/.github/actions/pkg-install
93 with:
94 brew: automake libtool
96 - name: 'toolchain versions'
97 run: |
98 command -v "${CC}"; "${CC}" --version || true
99 xcodebuild -version || true
100 xcodebuild -sdk -version | grep '^Path:' || true
101 xcrun --sdk iphoneos --show-sdk-path 2>/dev/null || true
102 xcrun --sdk iphoneos --show-sdk-version || true
103 echo '::group::compiler defaults'; echo 'int main(void) {}' | "${CC}" -v -x c -; echo '::endgroup::'
104 echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
105 echo '::group::brew packages installed'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::'
107 - name: 'cache libressl'
108 if: ${{ contains(matrix.build.install_steps, 'libressl') }}
109 uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
110 id: cache-libressl
111 env:
112 cache-name: cache-libressl
113 with:
114 path: ~/libressl
115 key: iOS-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}
117 - name: 'build libressl'
118 if: ${{ contains(matrix.build.install_steps, 'libressl') && !steps.cache-libressl.outputs.cache-hit }}
119 run: |
120 curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \
121 "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin
122 sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin
123 cd "libressl-${LIBRESSL_VERSION}"
124 cmake -B . -G Ninja -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/Users/runner/libressl \
125 -DCMAKE_SYSTEM_NAME=iOS \
126 -DCMAKE_SYSTEM_PROCESSOR=aarch64 \
127 -DBUILD_SHARED_LIBS=OFF
128 cmake --build .
129 cmake --install . --verbose
131 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
132 with:
133 persist-credentials: false
135 - name: 'autoreconf'
136 if: ${{ matrix.build.configure }}
137 run: autoreconf -fi
139 - name: 'configure'
140 env:
141 MATRIX_CONFIGURE: '${{ matrix.build.configure }}'
142 MATRIX_GENERATE: '${{ matrix.build.generate }}'
143 MATRIX_GENERATOR: '${{ matrix.build.generator }}'
144 run: |
145 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
146 # https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-visionos-or-watchos
147 [ -n "${MATRIX_GENERATOR}" ] && options="-G ${MATRIX_GENERATOR}"
148 cmake -B bld -G Ninja -D_CURL_PREFILL=ON \
149 -DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \
150 -DCMAKE_SYSTEM_NAME=iOS \
151 -DCMAKE_FIND_ROOT_PATH=/Users/runner \
152 -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
153 -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
154 -DUSE_APPLE_IDN=ON \
155 ${MATRIX_GENERATE} ${options}
156 else
157 mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \
158 --disable-dependency-tracking --enable-option-checking=fatal \
159 CFLAGS="-isysroot $(xcrun --sdk iphoneos --show-sdk-path 2>/dev/null)" \
160 --host=aarch64-apple-darwin \
161 --with-apple-idn \
162 ${MATRIX_CONFIGURE}
163 fi
165 - name: 'configure log'
166 if: ${{ !cancelled() }}
167 run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
169 - name: 'curl_config.h'
170 run: |
171 echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
172 grep -F '#define' bld/lib/curl_config.h | sort || true
174 - name: 'libcurl.pc, curl-config'
175 run: |
176 for f in libcurl.pc curl-config; do
177 echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
178 done
179 if command -v pccritic >/dev/null 2>&1; then
180 pccritic --version
181 pccritic --min-score 98 bld/libcurl.pc
182 fi
184 - name: 'build'
185 run: |
186 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
187 cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --verbose
188 else
189 make -C bld V=1
190 fi
192 - name: 'curl info'
193 run: |
194 find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | sort -z | xargs -0 file --
195 find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | sort -z | xargs -0 stat -f '%10z bytes: %N' --
197 - name: 'build tests'
198 if: ${{ matrix.build.generate }} # skip for autotools to save time
199 run: |
200 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
201 cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --target testdeps --verbose
202 else
203 make -C bld V=1 -C tests
204 fi
206 - name: 'build examples'
207 if: ${{ matrix.build.generate }} # skip for autotools to save time
208 run: |
209 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
210 cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --target curl-examples-build --verbose
211 else
212 make -C bld examples V=1
213 fi
215 macos:
216 name: "${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.compiler }} ${{ matrix.build.name }}"
217 runs-on: ${{ matrix.build.image || 'macos-15' }}
218 timeout-minutes: 15
219 env:
220 DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer"
221 CC: '${{ matrix.build.compiler }}'
222 MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }}
223 MATRIX_COMPILER: '${{ matrix.build.compiler }}'
224 MATRIX_INSTALL_STEPS: '${{ matrix.build.install_steps }}'
225 MATRIX_MACOS_VERSION_MIN: '${{ matrix.build.macos-version-min }}'
226 strategy:
227 fail-fast: false
228 matrix:
229 build:
230 - name: '!ssl !debug brotli zstd'
231 compiler: gcc-13
232 configure: --without-ssl --with-brotli --with-zstd --with-apple-idn
233 tflags: '--min=1620'
235 - name: '!ssl libssh2 AppleIDN'
236 compiler: clang
237 generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH2=ON -DUSE_APPLE_IDN=ON -DCURL_ENABLE_SSL=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_DISABLE_HTTPSIG=OFF
238 tflags: '--min=1750'
240 - name: 'OpenSSL libssh c-ares'
241 compiler: clang
242 install: openssl@4 libssh
243 configure: --enable-debug --with-libssh --with-openssl=/opt/homebrew/opt/openssl@4 --enable-ech --enable-ares --with-fish-functions-dir --with-zsh-functions-dir
245 - name: 'OpenSSL libssh'
246 compiler: llvm@18
247 install: libssh
248 generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF
250 - name: '!ssl HTTP-only c-ares'
251 macos-version-min: '10.15' # Catalina (2019)
252 compiler: clang
253 tflags: '--min=1040'
254 generate: >-
255 -DENABLE_DEBUG=ON -DENABLE_ARES=ON
256 -DCURL_ENABLE_SSL=OFF -DCURL_DISABLE_ALTSVC=ON -DENABLE_UNIX_SOCKETS=OFF
257 -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF -DUSE_NGHTTP2=OFF
258 -DCURL_USE_GSSAPI=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF
259 -DCURL_BROTLI=OFF -DCURL_ZLIB=OFF -DCURL_ZSTD=OFF
260 -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
261 -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_IMAP=ON
262 -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_POP3=ON
263 -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_WEBSOCKETS=ON
265 - name: 'LibreSSL !ldap +examples'
266 compiler: clang
267 install: libressl
268 install_steps: pytest
269 generate: >-
270 -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF
271 -DCURL_USE_LIBSSH2=OFF
273 - name: 'OpenSSL 10.15 C89'
274 macos-version-min: '10.15'
275 compiler: clang
276 install: libnghttp3 libngtcp2
277 install_steps: pytest
278 generate: >-
279 -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_NGTCP2=ON -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_USE_LIBSSH2=OFF
280 -DCMAKE_C_STANDARD=90 -DUSE_PROXY_HTTP3=ON
282 - name: 'OpenSSL SecTrust krb5'
283 image: xcode-27 # for pipe2()
284 macos-version-min: '10.15'
285 compiler: clang
286 install: libnghttp3 libngtcp2
287 install_steps: pytest
288 configure: >-
289 --enable-debug --with-openssl=/opt/homebrew/opt/openssl --with-ngtcp2 --with-apple-sectrust --enable-proxy-http3 --with-gssapi
290 --enable-apple-fast-udp
292 - name: 'OpenSSL event-based'
293 compiler: clang
294 install: libuv
295 generate: -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBUV=ON
296 tflags: '--test-event --min=1360'
298 - name: 'OpenSSL gsasl AppleIDN SecTrust +examples'
299 compiler: clang
300 install: openssl@4 libnghttp3 libngtcp2 gsasl
301 generate: >-
302 -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@4 -DUSE_ECH=ON -DCURL_USE_GSASL=ON -DUSE_APPLE_IDN=ON -DUSE_NGTCP2=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON
303 -DUSE_APPLE_SECTRUST=ON -DUSE_PROXY_HTTP3=ON
305 - name: 'MultiSSL AppleIDN clang-tidy +examples'
306 image: macos-26
307 compiler: clang
308 install: llvm gnutls nettle libressl krb5 mbedtls gsasl rustls-ffi libssh fish
309 install_steps: skiprun
310 CFLAGS: -Wunused-macros
311 chkprefill: _chkprefill
312 generate: >-
313 -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DCURL_DEFAULT_SSL_BACKEND=openssl
314 -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON -DENABLE_ARES=ON -DCURL_USE_GSASL=ON
315 -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_APPLE_IDN=ON -DUSE_SSLS_EXPORT=ON
316 -DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5
317 -DCURL_BROTLI=ON -DCURL_ZSTD=ON
318 -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/opt/homebrew/opt/llvm/bin/clang-tidy
319 -DCURL_COMPLETION_FISH=ON -DCURL_COMPLETION_ZSH=ON
321 - name: 'HTTP/3 clang-tidy'
322 image: macos-26
323 compiler: clang
324 install: llvm libnghttp3 libngtcp2 openldap krb5
325 install_steps: skipall
326 CFLAGS: -Wunused-macros
327 generate: >-
328 -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_NGTCP2=ON
329 -DLDAP_INCLUDE_DIR=/opt/homebrew/opt/openldap/include
330 -DLDAP_LIBRARY=/opt/homebrew/opt/openldap/lib/libldap.dylib
331 -DLDAP_LBER_LIBRARY=/opt/homebrew/opt/openldap/lib/liblber.dylib
332 -DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5
333 -DCURL_BROTLI=ON -DCURL_ZSTD=ON
334 -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/opt/homebrew/opt/llvm/bin/clang-tidy
335 -DUSE_PROXY_HTTP3=ON -DCURL_ENABLE_APPLE_FAST_UDP=ON
337 - name: 'LibreSSL openldap AppleGSS c-ares +examples'
338 compiler: clang
339 install: libressl krb5 openldap
340 generate: >-
341 -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DENABLE_ARES=ON
342 -DCURL_USE_GSSAPI=ON -DCURL_GSS_FLAVOR=Apple
343 -DLDAP_INCLUDE_DIR=/opt/homebrew/opt/openldap/include
344 -DLDAP_LIBRARY=/opt/homebrew/opt/openldap/lib/libldap.dylib
345 -DLDAP_LBER_LIBRARY=/opt/homebrew/opt/openldap/lib/liblber.dylib
347 - name: 'wolfSSL !ldap brotli zstd'
348 compiler: clang
349 install: brotli wolfssl zstd
350 install_steps: pytest
351 generate: -DCURL_USE_WOLFSSL=ON -DCURL_DISABLE_LDAP=ON -DUSE_ECH=ON -DCURL_DISABLE_HTTPSIG=OFF
353 - name: 'mbedTLS !ldap brotli zstd MultiSSL AppleIDN'
354 compiler: llvm@18
355 install: brotli mbedtls zstd
356 install_steps: codeset-test1
357 generate: -DCURL_USE_MBEDTLS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DEFAULT_SSL_BACKEND=mbedtls -DCURL_USE_OPENSSL=ON -DUSE_APPLE_IDN=ON
359 - name: 'GnuTLS !ldap krb5 +examples'
360 compiler: clang
361 install: gnutls nettle krb5
362 install_steps: codeset-test2
363 generate: >-
364 -DENABLE_DEBUG=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_OPENSSL=OFF
365 -DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5
366 -DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON
368 - name: 'aws-lc +analyzer'
369 compiler: gcc-15
370 install: aws-lc
371 generate: >-
372 -DENABLE_DEBUG=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/aws-lc -DUSE_ECH=ON
373 -DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON -DCURL_GCC_ANALYZER=ON
375 - name: 'Rustls'
376 compiler: clang
377 install: rustls-ffi
378 generate: -DENABLE_DEBUG=ON -DCURL_USE_RUSTLS=ON -DUSE_ECH=ON -DCURL_DISABLE_LDAP=ON
379 tflags: '--min=1750'
381 - name: 'OpenSSL torture 1'
382 compiler: clang
383 install: openssl@4
384 install_steps: torture
385 generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@4 -DUSE_ECH=ON
386 tflags: '-t --shallow=25 --subset=0/3'
388 - name: 'OpenSSL torture 2'
389 compiler: clang
390 install: openssl@4
391 install_steps: torture
392 generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@4 -DUSE_ECH=ON
393 tflags: '-t --shallow=25 --subset=1/3'
395 - name: 'OpenSSL torture 3'
396 compiler: clang
397 install: openssl@4
398 install_steps: torture
399 generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@4 -DUSE_ECH=ON
400 tflags: '-t --shallow=25 --subset=2/3'
402 steps:
403 - uses: $/.github/actions/macos-fix-certs
405 - name: 'brew unlink openssl'
406 if: ${{ contains(matrix.build.install, 'aws-lc') || contains(matrix.build.install, 'libressl') || contains(matrix.build.install, 'openssl@4') }}
407 run: |
408 if [ -d "$(brew --prefix)"/include/openssl ]; then
409 brew unlink openssl
410 fi
412 - name: 'install prereqs'
413 timeout-minutes: 5
414 uses: $/.github/actions/pkg-install
415 with:
416 brew: >-
417 pkgconf libpsl libssh2 ${{ matrix.build.install }}
418 ${{ matrix.build.generate && 'ninja' || 'automake libtool' }}
419 ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && 'nghttp2 stunnel' || '' }}
420 ${{ contains(matrix.build.install_steps, 'pytest') && 'caddy httpd vsftpd' || '' }}
422 - name: 'toolchain versions'
423 run: |
424 [[ "${MATRIX_COMPILER}" = 'llvm'* ]] && CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang"
425 [[ "${MATRIX_COMPILER}" = 'gcc'* ]] && "${CC}" --print-sysroot
426 command -v "${CC}"; "${CC}" --version || true
427 xcodebuild -version || true
428 xcrun --sdk macosx --show-sdk-path 2>/dev/null || true
429 xcrun --sdk macosx --show-sdk-version || true
430 ls -l /Library/Developer/CommandLineTools/SDKs || true
431 echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
432 echo '::group::brew packages installed'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::'
434 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
435 with:
436 persist-credentials: false
438 - name: 'autoreconf'
439 if: ${{ matrix.build.configure }}
440 run: autoreconf -fi
442 - name: 'configure'
443 env:
444 CFLAGS: '${{ matrix.build.CFLAGS }}'
445 MATRIX_CHKPREFILL: '${{ matrix.build.chkprefill }}'
446 MATRIX_CONFIGURE: '${{ matrix.build.configure }}'
447 MATRIX_GENERATE: '${{ matrix.build.generate }}'
448 run: |
449 if [[ "${MATRIX_COMPILER}" = 'gcc'* ]]; then
450 sysroot="$("${CC}" --print-sysroot)" # Must match the SDK gcc was built for
451 else
452 sysroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
453 fi
455 if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
456 CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang"
457 CC+=" --sysroot=${sysroot}"
458 CC+=" --target=$(uname -m)-apple-darwin"
459 fi
461 [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && CFLAGS+=" -mmacosx-version-min=${MATRIX_MACOS_VERSION_MIN}" # for autotools, and cmake with gcc
463 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
464 for _chkprefill in '' ${MATRIX_CHKPREFILL}; do
465 options=''
466 [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && options+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MATRIX_MACOS_VERSION_MIN}"
467 [[ "${MATRIX_INSTALL_STEPS}" = *'pytest'* ]] && options+=' -DVSFTPD=NO' # Skip ~20 tests that stretch run time by 7x on macOS
468 [ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF'
469 cmake -B "bld${_chkprefill}" -G Ninja -D_CURL_PREFILL=ON \
470 -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \
471 -DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \
472 -DCMAKE_OSX_SYSROOT="${sysroot}" \
473 -DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64e/')-apple-darwin$(uname -r)" \
474 ${MATRIX_GENERATE} ${options}
475 done
476 if [ -d bld_chkprefill ] && ! diff -u bld/lib/curl_config.h bld_chkprefill/lib/curl_config.h; then
477 echo '::group::reference configure log'; cat bld_chkprefill/CMakeFiles/CMake*.yaml 2>/dev/null || true; echo '::endgroup::'
478 false
479 fi
480 else
481 if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
482 options+=" --target=$(uname -m)-apple-darwin"
483 fi
484 if [ "${MATRIX_COMPILER}" != 'clang' ]; then
485 options+=" --with-sysroot=${sysroot}"
486 CFLAGS+=" --sysroot=${sysroot}"
487 fi
488 [[ "${MATRIX_INSTALL_STEPS}" = *'pytest'* ]] && options+=' --with-test-vsftpd=no' # Skip ~20 tests that stretch run time by 7x on macOS
489 mkdir bld && cd bld && ../configure --prefix="$PWD"/curl-install --enable-unity --enable-warnings --enable-werror --disable-static \
490 --disable-dependency-tracking --enable-option-checking=fatal \
491 --with-libpsl="$(brew --prefix libpsl)" \
492 ${MATRIX_CONFIGURE} ${options}
493 fi
495 - name: 'configure log'
496 if: ${{ !cancelled() }}
497 run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
499 - name: 'curl_config.h'
500 run: |
501 echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
502 grep -F '#define' bld/lib/curl_config.h | sort || true
504 - name: 'libcurl.pc, curl-config'
505 run: |
506 for f in libcurl.pc curl-config; do
507 echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
508 done
509 if command -v pccritic >/dev/null 2>&1; then
510 pccritic --version
511 pccritic --min-score 96 bld/libcurl.pc
512 fi
514 - name: 'test configs'
515 run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true
517 - name: 'build'
518 run: |
519 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
520 cmake --build bld --verbose
521 else
522 make -C bld V=1
523 fi
525 - name: 'curl -V'
526 run: |
527 find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | sort -z | xargs -0 file --
528 find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | sort -z | xargs -0 stat -f '%10z bytes: %N' --
529 bld/src/curl --disable --version
531 - name: 'curl install'
532 run: |
533 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
534 cmake --install bld --strip
535 else
536 make -C bld V=1 install
537 fi
539 - name: 'build tests'
540 if: ${{ !contains(matrix.build.install_steps, 'skipall') }}
541 run: |
542 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
543 cmake --build bld --verbose --target testdeps
544 else
545 make -C bld V=1 -C tests
546 fi
548 - name: 'run tests'
549 if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }}
550 timeout-minutes: ${{ contains(matrix.build.install_steps, 'torture') && 20 || 10 }}
551 env:
552 MATRIX_INSTALL: '${{ matrix.build.install }}'
553 TEST_TARGET: ${{ contains(matrix.build.install_steps, 'torture') && 'test-torture' || 'test-ci' }}
554 TFLAGS: '${{ matrix.build.tflags }}'
555 run: |
556 TFLAGS="-j20 ${TFLAGS}"
557 if [[ "${MATRIX_INSTALL}" != *'libssh'* ]]; then
558 TFLAGS+=' !664 !665' # MD5 support is disabled in Homebrew since libssh2 1.11.1_6
559 fi
560 if [ "${TEST_TARGET}" != 'test-ci' ]; then
561 TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture
562 fi
563 if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test1'* ]]; then
564 locale || true
565 unset LANG
566 unset LC_ALL
567 unset LC_COLLATE
568 unset LC_MESSAGES
569 unset LC_MONETARY
570 unset LC_TIME
571 export LC_CTYPE=C
572 export LC_NUMERIC=fr_FR.UTF-8
573 elif [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test2'* ]]; then
574 locale || true
575 unset LC_ALL
576 export LC_TIME=fr_FR
577 fi
578 rm -f ~/.curlrc
579 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
580 cmake --build bld --verbose --target "${TEST_TARGET}"
581 else
582 make -C bld V=1 "${TEST_TARGET}"
583 fi
585 - name: 'install pytest prereqs'
586 if: ${{ contains(matrix.build.install_steps, 'pytest') }}
587 uses: $/.github/actions/pkg-install
588 with:
589 pip: -r tests/http/requirements.txt
591 - name: 'run pytest'
592 if: ${{ contains(matrix.build.install_steps, 'pytest') }}
593 env:
594 PYTEST_ADDOPTS: '--color=yes'
595 PYTEST_XDIST_AUTO_NUM_WORKERS: 4
596 run: |
597 source ~/venv/bin/activate
598 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
599 cmake --build bld --verbose --target curl-pytest-ci
600 else
601 make -C bld V=1 pytest-ci
602 fi
604 - name: 'build examples'
605 if: ${{ contains(matrix.build.name, '+examples') }}
606 run: |
607 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
608 cmake --build bld --verbose --target curl-examples-build
609 else
610 make -C bld examples V=1
611 fi
613 combinations: # Test buildability with host OS, Xcode / SDK, compiler, target-OS, built tool, combinations
614 name: "${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }} ${{ matrix.image }} ${{ matrix.xcode }}"
615 runs-on: ${{ matrix.image }}
616 timeout-minutes: 10
617 env:
618 DEVELOPER_DIR: "/Applications/Xcode${{ matrix.xcode && format('_{0}', matrix.xcode) || '' }}.app/Contents/Developer"
619 CC: '${{ matrix.compiler }}'
620 MATRIX_BUILD: '${{ matrix.build }}'
621 MATRIX_COMPILER: '${{ matrix.compiler }}'
622 MATRIX_IMAGE: '${{ matrix.image }}'
623 MATRIX_MACOS_VERSION_MIN: '${{ matrix.macos-version-min }}'
624 strategy:
625 fail-fast: false
626 matrix:
627 # Sources:
628 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
629 # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
630 # https://github.com/actions/runner-images/blob/main/images/macos/xcode-27-arm64-Readme.md
631 compiler: [gcc-13, gcc-14, gcc-15, llvm@18, llvm@20, clang]
632 # Xcode support matrix as of 2026-09, with default macOS SDK versions and OS names, years:
633 # * = default Xcode on the runner.
634 # macos-15: 16.0, 16.1, 16.2, 16.3,*16.4, 26.0
635 # macos-26: 16.4,*26.6
636 # xcode-27: *27.0
637 # macOSSDK: 15.0, 15.1, 15.2, 15.4, 15.5, 26.x 27.x
638 # Sequoia (2024) Tahoe (2025) Golden Gate (2026)
639 # https://github.com/actions/runner-images/tree/main/images/macos
640 # https://en.wikipedia.org/wiki/MacOS_version_history
641 image: [macos-15, macos-26, xcode-27]
642 xcode: [''] # default Xcodes
643 macos-version-min: ['']
644 build: [autotools, cmake]
645 exclude:
646 # Combinations not covered by runner images:
647 - { image: macos-15, compiler: 'llvm@20' }
648 - { image: macos-26, compiler: 'llvm@18' }
649 - { image: xcode-27, compiler: 'llvm@18' }
650 # Covered by the main workflow
651 - { image: macos-15, compiler: 'gcc-13' }
652 - { image: macos-15, compiler: 'llvm@18' }
653 - { image: macos-15, compiler: 'clang' }
654 # Reduce build combinations, by dropping less interesting ones
655 - { image: macos-15, compiler: 'gcc-14' }
656 - { image: xcode-27, compiler: 'gcc-13' }
657 - { image: xcode-27, compiler: 'gcc-14' }
658 # incompatible combination
659 - { image: xcode-27, compiler: 'gcc-15' }
660 # Reduce autotools to only one job that is also build with cmake
661 - { compiler: 'gcc-13' , build: autotools }
662 - { compiler: 'gcc-14' , build: autotools }
663 - { compiler: 'gcc-15' , build: autotools }
664 - { compiler: 'llvm@18', build: autotools }
665 - { compiler: 'llvm@20', build: autotools }
666 - { image: macos-15, build: autotools }
667 - { image: macos-26, build: autotools }
668 steps:
669 - uses: $/.github/actions/macos-fix-certs
671 - name: 'install autotools'
672 if: ${{ matrix.build == 'autotools' }}
673 uses: $/.github/actions/pkg-install
674 with:
675 brew: automake libtool
677 - name: 'toolchain versions'
678 run: |
679 [[ "${MATRIX_COMPILER}" = 'llvm'* ]] && CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang"
680 [[ "${MATRIX_COMPILER}" = 'gcc'* ]] && "${CC}" --print-sysroot
681 command -v "${CC}"; "${CC}" --version || true
682 xcodebuild -version || true
683 xcrun --sdk macosx --show-sdk-path 2>/dev/null || true
684 xcrun --sdk macosx --show-sdk-version || true
685 ls -l /Library/Developer/CommandLineTools/SDKs || true
686 echo '::group::compiler defaults'; echo 'int main(void) {}' | "${CC}" -v -x c -; echo '::endgroup::'
687 echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::'
688 echo '::group::brew packages preinstalled'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::'
690 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
691 with:
692 persist-credentials: false
694 - name: 'autoreconf'
695 if: ${{ matrix.build == 'autotools' }}
696 run: autoreconf -fi
698 - name: 'configure / ${{ matrix.build }}'
699 run: |
700 if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ]; then
701 # Ref: https://github.com/Homebrew/homebrew-core/issues/194778#issuecomment-2793243409
702 "$(brew --prefix gcc@13)"/libexec/gcc/aarch64-apple-darwin24/13/install-tools/mkheaders
703 fi
705 if [[ "${MATRIX_COMPILER}" = 'gcc'* ]]; then
706 sysroot="$("${CC}" --print-sysroot)" # Must match the SDK gcc was built for
707 else
708 sysroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
709 fi
711 if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
712 CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang"
713 CC+=" --sysroot=${sysroot}"
714 CC+=" --target=$(uname -m)-apple-darwin"
715 fi
717 export CFLAGS
718 [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && CFLAGS+=" -mmacosx-version-min=${MATRIX_MACOS_VERSION_MIN}" # for autotools, and cmake with gcc
720 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
721 [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && options+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MATRIX_MACOS_VERSION_MIN}"
722 # would pick up nghttp2, libidn2, and libssh2
723 cmake -B bld -G Ninja -D_CURL_PREFILL=ON \
724 -DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \
725 -DCMAKE_OSX_SYSROOT="${sysroot}" \
726 -DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64e/')-apple-darwin$(uname -r)" \
727 -DCMAKE_IGNORE_PREFIX_PATH="$(brew --prefix)" \
728 -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF \
729 -DCURL_USE_OPENSSL=ON \
730 -DUSE_NGHTTP2=OFF -DUSE_LIBIDN2=OFF \
731 -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF \
732 -DUSE_APPLE_IDN=ON -DUSE_APPLE_SECTRUST=ON \
733 -DCURL_USE_GSSAPI=ON -DCURL_GSS_FLAVOR=Apple \
734 ${options}
735 else
736 if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then
737 options+=" --target=$(uname -m)-apple-darwin"
738 fi
739 if [ "${MATRIX_COMPILER}" != 'clang' ]; then
740 options+=" --with-sysroot=${sysroot}"
741 CFLAGS+=" --sysroot=${sysroot}"
742 fi
743 # would pick up nghttp2, libidn2, but libssh2 is disabled by default
744 mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-static \
745 --disable-dependency-tracking --enable-option-checking=fatal \
746 --disable-docs --disable-manual \
747 --with-openssl="$(brew --prefix openssl)" \
748 --without-nghttp2 --without-libidn2 \
749 --without-libpsl \
750 --with-apple-idn --with-apple-sectrust \
751 --enable-gssapi-apple \
752 ${options}
753 fi
755 - name: 'configure log'
756 if: ${{ !cancelled() }}
757 run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
759 - name: 'curl_config.h'
760 run: |
761 echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
762 grep -F '#define' bld/lib/curl_config.h | sort || true
764 - name: 'libcurl.pc, curl-config'
765 run: |
766 for f in libcurl.pc curl-config; do
767 echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
768 done
769 if command -v pccritic >/dev/null 2>&1; then
770 pccritic --version
771 pccritic --min-score 94 bld/libcurl.pc
772 fi
774 - name: 'build / ${{ matrix.build }}'
775 run: |
776 if [ "${MATRIX_BUILD}" = 'cmake' ]; then
777 cmake --build bld --verbose
778 else
779 make -C bld V=1
780 fi
782 - name: 'curl -V'
783 run: |
784 find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | sort -z | xargs -0 file --
785 find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | sort -z | xargs -0 stat -f '%10z bytes: %N' --
786 bld/src/curl --disable --version
Diagnostics4 git calls · 30 ms
CallStatusSizeTime030 ms
discover200152 B1 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=1
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit2 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=2
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=2
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=3
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2007.0 KiB · hit25 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=25
git.response.bytes=7158
git.response.cache=HIT
git.response.duration_ms=25
git.fetch.wants=cd23bd8571efef8a668b3872211c847cf0a0a35f
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=7158
git.pkt.payload.max=7137
git.sideband.band1.bytes=7136
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e1a8e98e622c38
Request
e75de3e2…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format