GHA/macos: use quictls in some jobs, other small improvements

- enable quictls in autotools and cmake jobs. autotools requires
  a workaround due to wrong libpath in the quictls pkg-config.
  nghttp3 is offered by Homebrew, but not ngtcp2, to enable H3.

- install `libnghttp2` rather than `nghttp2`.
  `libnghttp2` is preinstalled and smaller. It also avoids detecting
  `nghttpx`, which confuses `pytest`.

- limit `brew unlink openssl` to libressl/quictls jobs.

Closes #16517
This commit is contained in:
Viktor Szakats 2025-02-28 03:50:29 +01:00
parent 7211576442
commit e7751571eb
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -123,9 +123,10 @@ jobs:
compiler: clang compiler: clang
configure: --enable-debug --with-openssl=$(brew --prefix openssl) configure: --enable-debug --with-openssl=$(brew --prefix openssl)
tflags: --test-event tflags: --test-event
- name: 'OpenSSL libssh2 !ldap 10.15' - name: 'quictls libssh2 !ldap 10.15'
compiler: clang compiler: clang
configure: --enable-debug --disable-ldap --with-openssl=$(brew --prefix openssl) install: quictls
configure: --enable-debug --disable-ldap --with-openssl=$(brew --prefix quictls) LDFLAGS="${LDFLAGS} -L$(brew --prefix quictls)/lib"
macos-version-min: '10.15' macos-version-min: '10.15'
# cmake # cmake
- name: 'OpenSSL gsasl rtmp AppleIDN' - name: 'OpenSSL gsasl rtmp AppleIDN'
@ -136,9 +137,9 @@ jobs:
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix openssl) -DUSE_APPLE_IDN=ON -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=$(brew --prefix llvm)/bin/clang-tidy generate: -DOPENSSL_ROOT_DIR=$(brew --prefix openssl) -DUSE_APPLE_IDN=ON -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=$(brew --prefix llvm)/bin/clang-tidy
clang-tidy: true clang-tidy: true
chkprefill: _chkprefill chkprefill: _chkprefill
- name: 'OpenSSL +static libssh +examples' - name: 'quictls +static libssh +examples'
install: libssh install: quictls libssh
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix openssl) -DBUILD_STATIC_LIBS=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON generate: -DOPENSSL_ROOT_DIR=$(brew --prefix quictls) -DBUILD_STATIC_LIBS=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON
- name: 'SecureTransport debug' - name: 'SecureTransport debug'
generate: -DCURL_USE_SECTRANSP=ON -DENABLE_DEBUG=ON generate: -DCURL_USE_SECTRANSP=ON -DENABLE_DEBUG=ON
macos-version-min: '10.8' macos-version-min: '10.8'
@ -184,11 +185,12 @@ jobs:
run: | run: |
echo ${{ matrix.build.generate && 'ninja' || 'automake libtool' }} \ echo ${{ matrix.build.generate && 'ninja' || 'automake libtool' }} \
pkgconf libpsl libssh2 \ pkgconf libpsl libssh2 \
${{ !matrix.build.clang-tidy && 'nghttp2 stunnel' || '' }} \ ${{ !matrix.build.clang-tidy && 'libnghttp2 stunnel' || '' }} \
${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
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 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
- name: 'brew unlink openssl' - name: 'brew unlink openssl'
if: ${{ contains(matrix.build.install, 'libressl') || contains(matrix.build.install, 'quictls') }}
run: | run: |
if test -d $(brew --prefix)/include/openssl; then if test -d $(brew --prefix)/include/openssl; then
brew unlink openssl brew unlink openssl
@ -343,7 +345,7 @@ jobs:
if: ${{ contains(matrix.build.name, '+examples') }} if: ${{ contains(matrix.build.name, '+examples') }}
run: | run: |
if [ -n '${{ matrix.build.generate }}' ]; then if [ -n '${{ matrix.build.generate }}' ]; then
cmake --build bld --target curl-examples --verbose cmake --build bld --verbose --target curl-examples
else else
make -C bld examples V=1 make -C bld examples V=1
fi fi