Skip to content

Commit

Permalink
Merge remote-tracking branch 'curl/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dongbeiouba committed Jan 1, 2025
2 parents ed90868 + 280ff5c commit b032cbe
Show file tree
Hide file tree
Showing 100 changed files with 1,210 additions and 558 deletions.
3 changes: 2 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ RTMP:
- all:
- changed-files:
- any-glob-to-all-files: "{\
CMake/FindLibrtmp.cmake,\
lib/curl_rtmp.*\
}"

Expand Down Expand Up @@ -515,7 +516,7 @@ Windows:
- any-glob-to-all-files: "{\
appveyor.*,\
.github/workflows/windows.yml,\
CMake/Platforms/WindowsCache.cmake,\
CMake/win32-cache.cmake,\
lib/*win32*,\
lib/curl_multibyte.*,\
lib/rename.*,\
Expand Down
5 changes: 0 additions & 5 deletions .github/scripts/cmp-config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
'#define HAVE_DLFCN_H 1' => 1,
'#define HAVE_GSSAPI_GSSAPI_KRB5_H 1' => 1,
'#define HAVE_INTTYPES_H 1' => 1,
'#define HAVE_IOCTL 1' => 1,
'#define HAVE_LDAP_H 1' => 1,
'#define HAVE_LDAP_SSL 1' => 1,
'#define HAVE_LIBBROTLIDEC 1' => 1,
Expand All @@ -71,9 +70,6 @@
'#define HAVE_OPENSSL_SSL_H 1' => 1,
'#define HAVE_OPENSSL_X509_H 1' => 1,
'#define HAVE_QUICHE_H 1' => 1,
'#define HAVE_SETJMP_H 1' => 1,
'#define HAVE_SSL_ECH_SET1_ECHCONFIG 1' => 1,
'#define HAVE_SSL_SET1_ECH_CONFIG_LIST 1' => 1,
'#define HAVE_SSL_SET_QUIC_USE_LEGACY_CODEPOINT 1' => 1,
'#define HAVE_STDINT_H 1' => 1,
'#define HAVE_STDIO_H 1' => 1,
Expand All @@ -82,7 +78,6 @@
'#define HAVE_SYS_XATTR_H 1' => 1,
'#define HAVE_UNICODE_UIDNA_H 1' => 1,
'#define HAVE_WOLFSSH_SSH_H 1' => 1,
'#define HAVE_WOLFSSL_CTX_GENERATEECHCONFIG 1' => 1,
'#define HAVE_ZSTD 1' => 1,
'#define HAVE_ZSTD_H 1' => 1,
'#define LT_OBJDIR ".libs/"' => 1,
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/configure-vs-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ name: configure-vs-cmake
- '*.ac'
- '**/*.m4'
- '**/CMakeLists.txt'
- 'CMake/**'
- 'lib/curl_config.h.cmake'
- '.github/scripts/cmp-config.pl'
- '.github/workflows/configure-vs-cmake.yml'
Expand All @@ -22,6 +23,7 @@ name: configure-vs-cmake
- '*.ac'
- '**/*.m4'
- '**/CMakeLists.txt'
- 'CMake/**'
- 'lib/curl_config.h.cmake'
- '.github/scripts/cmp-config.pl'
- '.github/workflows/configure-vs-cmake.yml'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/distcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: |
SOURCE_DATE_EPOCH=1711526400 ./scripts/maketgz 99.98.97
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
name: 'release-tgz'
path: 'curl-99.98.97.tar.gz'
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/http3-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ name: Linux HTTP/3
- '*/ci'
paths-ignore:
- '**/*.md'
- '**/CMakeLists.txt'
- '.circleci/**'
- 'appveyor.*'
- 'CMake/**'
- 'packages/**'
- 'plan9/**'
- 'projects/**'
Expand All @@ -24,10 +22,8 @@ name: Linux HTTP/3
- master
paths-ignore:
- '**/*.md'
- '**/CMakeLists.txt'
- '.circleci/**'
- 'appveyor.*'
- 'CMake/**'
- 'packages/**'
- 'plan9/**'
- 'projects/**'
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ permissions: {}

env:
MAKEFLAGS: -j 5
CURL_CLANG_TIDYFLAGS: '-checks=-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-valist.Uninitialized'
# unhandled
bearssl-version: 0.6
# renovate: datasource=github-tags depName=libressl-portable/portable versioning=semver registryUrl=https://github.com
Expand Down Expand Up @@ -210,6 +211,12 @@ jobs:
- name: '!ssl !http !smtp !imap'
configure: --without-ssl --enable-debug --disable-http --disable-smtp --disable-imap --disable-unity

- name: clang-tidy
install_packages: clang-tidy libssl-dev libssh2-1-dev
install_steps: skipall
configure: --with-openssl --with-libssh2
make-custom-target: tidy

- name: scanbuild
install_packages: clang-tools clang libssl-dev libssh2-1-dev
install_steps: skipall
Expand Down Expand Up @@ -287,7 +294,8 @@ jobs:
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -y
sudo apt-get install -y --no-install-suggests --no-install-recommends \
libtool autoconf automake pkgconf ninja-build stunnel4 \
libtool autoconf automake pkgconf ninja-build \
${{ matrix.build.install_steps != 'skipall' && matrix.build.install_steps != 'skiprun' && 'stunnel4' || '' }} \
libpsl-dev libbrotli-dev libzstd-dev \
${{ matrix.build.install_packages }}
python3 -m venv $HOME/venv
Expand Down Expand Up @@ -595,7 +603,7 @@ jobs:
if [ -n '${{ matrix.build.generate }}' ]; then
${{ matrix.build.make-prefix }} cmake --build . --verbose
else
${{ matrix.build.make-prefix }} make V=1
${{ matrix.build.make-prefix }} make V=1 ${{ matrix.build.make-custom-target }}
fi
- name: 'single-use function check'
Expand All @@ -609,8 +617,9 @@ jobs:
fi
./scripts/singleuse.pl --unit ${libcurla}
- run: ./src/curl -V
name: 'check curl -V output'
- name: 'check curl -V output'
if: ${{ matrix.build.make-custom-target != 'tidy' }}
run: ./src/curl -V

- run: cmake --install . --prefix $HOME/curl --strip
if: ${{ matrix.build.generate }}
Expand Down Expand Up @@ -671,6 +680,7 @@ jobs:
fi
- name: 'build examples'
if: ${{ matrix.build.make-custom-target != 'tidy' }}
run: |
if [ -n '${{ matrix.build.generate }}' ]; then
${{ matrix.build.make-prefix }} cmake --build . --verbose --target curl-examples
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,13 @@ jobs:
configure: --enable-debug --disable-ldap --with-openssl=$(brew --prefix openssl)
macos-version-min: '10.15'
# cmake
- name: 'OpenSSL gsasl AppleIDN'
install: gsasl
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix openssl) -DCURL_USE_GSASL=ON -DUSE_APPLE_IDN=ON
- name: 'OpenSSL gsasl rtmp AppleIDN'
install: gsasl rtmpdump
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix openssl) -DCURL_USE_GSASL=ON -DUSE_LIBRTMP=ON -DUSE_APPLE_IDN=ON
- name: 'OpenSSL AppleIDN clang-tidy +examples'
install: llvm
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
- name: 'OpenSSL +static libssh +examples'
install: libssh
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix openssl) -DBUILD_STATIC_LIBS=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON
Expand Down Expand Up @@ -161,6 +165,8 @@ jobs:
- { compiler: llvm@15, build: { macos-version-min: '10.15' } }
- { compiler: llvm@15, build: { torture: true } }
- { compiler: gcc-12, build: { torture: true } }
- { compiler: llvm@15, build: { clang-tidy: true } }
- { compiler: gcc-12, build: { clang-tidy: true } }
# opt out jobs from combinations that have the compiler set manually
- { compiler: llvm@15, build: { compiler: 'clang' } }
- { compiler: llvm@15, build: { compiler: 'gcc-12' } }
Expand All @@ -176,7 +182,9 @@ jobs:
# https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
run: |
echo ${{ matrix.build.generate && 'ninja' || 'automake libtool' }} \
pkgconf libpsl libssh2 nghttp2 stunnel ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
pkgconf libpsl libssh2 \
${{ !matrix.build.clang-tidy && 'nghttp2 stunnel' || '' }} \
${{ 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
- name: 'brew unlink openssl'
Expand Down Expand Up @@ -281,12 +289,14 @@ jobs:
fi
- name: 'install test prereqs'
if: ${{ !matrix.build.clang-tidy }}
run: |
python3 -m venv $HOME/venv
source $HOME/venv/bin/activate
python3 -m pip install -r tests/requirements.txt
- name: 'run tests'
if: ${{ !matrix.build.clang-tidy }}
timeout-minutes: ${{ matrix.build.torture && 20 || 10 }}
run: |
export TFLAGS='-j20 ${{ matrix.build.tflags }}'
Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/non-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
architecture: ${{ matrix.arch }}
run: |
# https://pkgsrc.se/
sudo pkgin -y install cmake ninja-build pkg-config perl brotli heimdal openldap-client libssh2 libidn2 libpsl nghttp2 py311-impacket
cmake -B bld -G Ninja \
time sudo pkgin -y install cmake ninja-build pkg-config perl brotli heimdal openldap-client libssh2 libidn2 libpsl nghttp2 py311-impacket
time cmake -B bld -G Ninja \
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
-DCURL_WERROR=ON \
-DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
Expand All @@ -65,15 +65,15 @@ jobs:
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
cmake --build bld --config Debug
time cmake --build bld --config Debug
bld/src/curl --disable --version
if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
cmake --build bld --config Debug --target testdeps
time cmake --build bld --config Debug --target testdeps
export TFLAGS='-j4'
cmake --build bld --config Debug --target test-ci
time cmake --build bld --config Debug --target test-ci
fi
echo '::group::build examples'
cmake --build bld --config Debug --target curl-examples
time cmake --build bld --config Debug --target curl-examples
echo '::endgroup::'
openbsd:
Expand All @@ -96,28 +96,28 @@ jobs:
run: |
# https://openbsd.app/
# https://www.openbsd.org/faq/faq15.html
sudo pkg_add cmake ninja brotli openldap-client-- libssh2 libidn2 libpsl nghttp2 python3 py3-impacket
cmake -B bld -G Ninja \
time sudo pkg_add cmake ninja brotli openldap-client-- libssh2 libidn2 libpsl nghttp2 python3 py3-impacket
time cmake -B bld -G Ninja \
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
-DCURL_WERROR=ON \
-DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
-DCURL_USE_OPENSSL=ON \
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
cmake --build bld --config Debug
time cmake --build bld --config Debug
bld/src/curl --disable --version
if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
cmake --build bld --config Debug --target testdeps
time cmake --build bld --config Debug --target testdeps
export TFLAGS='-j8 ~3017 ~TFTP ~FTP' # FIXME: TFTP requests executed twice? Related: `curl: (69) TFTP: Access Violation`?
cmake --build bld --config Debug --target test-ci
time cmake --build bld --config Debug --target test-ci
fi
echo '::group::build examples'
cmake --build bld --config Debug --target curl-examples
time cmake --build bld --config Debug --target curl-examples
echo '::endgroup::'
freebsd:
name: "FreeBSD (${{ matrix.build && 'CM' || 'AM' }}, openssl, ${{ matrix.compiler }}, ${{ matrix.arch }})"
name: "FreeBSD (${{ matrix.build == 'cmake' && 'CM' || 'AM' }}, openssl, ${{ matrix.compiler }}, ${{ matrix.arch }})"
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
Expand All @@ -140,25 +140,25 @@ jobs:
architecture: ${{ matrix.arch }}
run: |
# https://ports.freebsd.org/
sudo pkg install -y autoconf automake libtool \
time sudo pkg install -y autoconf automake libtool \
pkgconf brotli openldap26-client libidn2 libnghttp2 stunnel py311-impacket
autoreconf -fi
time autoreconf -fi
export CC='${{ matrix.compiler }}'
mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \
mkdir bld && cd bld && time ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \
--prefix="${HOME}"/install \
--with-openssl \
--with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \
--disable-dependency-tracking || { tail -n 1000 config.log; false; }
echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::'
echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::'
make -j3 install
time make -j3 install
src/curl --disable --version
if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
make -j3 -C tests
make test-ci V=1 TFLAGS='-j4'
time make -j3 -C tests
time make test-ci V=1 TFLAGS='-j4'
fi
echo '::group::build examples'
make -j3 examples
time make -j3 examples
echo '::endgroup::'
- name: 'cmake'
Expand All @@ -170,9 +170,9 @@ jobs:
architecture: ${{ matrix.arch }}
run: |
# https://ports.freebsd.org/
sudo pkg install -y cmake-core ninja perl5 \
time sudo pkg install -y cmake-core ninja perl5 \
pkgconf brotli openldap26-client libidn2 libnghttp2 stunnel py311-impacket
cmake -B bld -G Ninja \
time cmake -B bld -G Ninja \
'-DCMAKE_C_COMPILER=${{ matrix.compiler }}' \
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
-DCURL_WERROR=ON \
Expand All @@ -182,14 +182,14 @@ jobs:
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::'
cmake --build bld --config Debug
time cmake --build bld --config Debug
bld/src/curl --disable --version
if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
cmake --build bld --config Debug --target testdeps
cmake --build bld --config Debug --target test-ci
time cmake --build bld --config Debug --target testdeps
time cmake --build bld --config Debug --target test-ci
fi
echo '::group::build examples'
cmake --build bld --config Debug --target curl-examples
time cmake --build bld --config Debug --target curl-examples
echo '::endgroup::'
omnios:
Expand All @@ -201,27 +201,27 @@ jobs:
with:
persist-credentials: false
- name: 'autotools'
uses: vmactions/omnios-vm@16b5996777bc675acd3d537f13df536a526cd16d # v1
uses: vmactions/omnios-vm@8eba2a9217262f275d4566751a92d6ef2f433d00 # v1
with:
usesh: true
# https://pkg.omnios.org/r151052/core/en/index.shtml
prepare: pkg install build-essential libtool nghttp2
run: |
set -e
ln -s /usr/bin/gcpp /usr/bin/cpp # Some tests expect `cpp`, which is named `gcpp` in this env.
autoreconf -fi
mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \
time autoreconf -fi
mkdir bld && cd bld && time ../configure --enable-unity --enable-test-bundles --enable-debug --enable-warnings --enable-werror \
--prefix="${HOME}"/install \
--with-openssl \
--disable-dependency-tracking || { tail -n 1000 config.log; false; }
echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::'
echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::'
gmake -j3 install
time gmake -j3 install
src/curl --disable --version
gmake -j3 -C tests
gmake test-ci V=1
time gmake -j3 -C tests
time gmake test-ci V=1
echo '::group::build examples'
gmake -j3 examples
time gmake -j3 examples
echo '::endgroup::'
amiga:
Expand Down Expand Up @@ -332,7 +332,7 @@ jobs:
run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install libfl2 ${{ matrix.build == 'cmake' && 'ninja-build' || '' }}

- name: 'cache compiler (djgpp)'
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
id: cache-compiler
with:
path: ~/djgpp
Expand Down
Loading

0 comments on commit b032cbe

Please sign in to comment.