diff --git a/.github/workflows/appveyor-status.yml b/.github/workflows/appveyor-status.yml deleted file mode 100644 index 197c5f26e5..0000000000 --- a/.github/workflows/appveyor-status.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'AppVeyor Status Report' - -'on': - status - -concurrency: - group: ${{ github.workflow }}-${{ github.event.sha }}-${{ github.event.target_url }} - cancel-in-progress: true - -permissions: {} - -jobs: - split: - name: 'split' - runs-on: ubuntu-24.04-arm - if: ${{ github.event.sender.login == 'appveyor[bot]' }} - permissions: - statuses: write # To update build statuses - steps: - - name: 'Create individual AppVeyor build statuses' - if: ${{ github.event.sha && github.event.target_url }} - env: - APPVEYOR_COMMIT_SHA: ${{ github.event.sha }} - APPVEYOR_TARGET_URL: ${{ github.event.target_url }} - APPVEYOR_REPOSITORY: ${{ github.event.repository.full_name }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - echo "${APPVEYOR_TARGET_URL}" | sed 's/\/project\//\/api\/projects\//' | xargs -t -n1 curl -s -- | \ - jq -c '.build.jobs[] | {target_url: ($target_url + "/job/" + .jobId), - context: (.name | sub("^(Environment: )?"; "AppVeyor / ")), - state: (.status | sub("queued"; "pending") - | sub("starting"; "pending") - | sub("running"; "pending") - | sub("failed"; "failure") - | sub("cancelled"; "error")), - description: .status}' \ - --arg target_url "${APPVEYOR_TARGET_URL}" | tee /dev/stderr | parallel --pipe -j 1 -N 1 \ - gh api --silent --input - "repos/${APPVEYOR_REPOSITORY}/statuses/${APPVEYOR_COMMIT_SHA}" diff --git a/.github/workflows/checkdocs.yml b/.github/workflows/checkdocs.yml deleted file mode 100644 index 0c2ecf3676..0000000000 --- a/.github/workflows/checkdocs.yml +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -# This workflow contains tests that operate on documentation files only. Some -# checks modify the source so they cannot be combined into a single job. - -name: 'Docs' - -'on': - push: - branches: - - master - - '*/ci' - paths: - - '.github/workflows/checkdocs.yml' - - '.github/scripts/**' - - 'scripts/**' - - '**.md' - - 'docs/*' - pull_request: - branches: - - master - paths: - - '.github/workflows/checkdocs.yml' - - '.github/scripts/**' - - 'scripts/**' - - '**.md' - - 'docs/*' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -jobs: - # config file help: https://github.com/amperser/proselint/ - proselint: - name: 'proselint' - runs-on: ubuntu-24.04-arm - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'install prereqs' - run: | - python3 -m venv ~/venv - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r .github/scripts/requirements-proselint.txt - - - name: 'trim headers off all *.md files' - run: git ls-files '*.md' -z | xargs -0 -n1 .github/scripts/trimmarkdownheader.pl - - - name: 'check prose' - run: | - cat < ~/.proselintrc.json - { - "checks": { - "annotations.misc": false, - "lexical_illusions": false, - "misc.annotations": false, - "redundancy.misc.garner": false, - "security.password": false, - "spelling.ve_of": false, - "typography.diacritical_marks": false, - "typography.symbols": false - } - } - JSON - source ~/venv/bin/activate - git ls-files README '*.md' -z | grep -Evz '(CHECKSRC|DISTROS|CURLOPT_INTERFACE|interface)\.md' | xargs -0 proselint check -- - - - name: 'check special prose' # For CHECKSRC and files with aggressive exclamation mark needs - run: | - cat < ~/.proselintrc.json - { - "checks": { - "annotations.misc": false, - "lexical_illusions": false, - "typography.diacritical_marks": false, - "typography.punctuation.exclamation": false, - "typography.symbols": false - } - } - JSON - source ~/venv/bin/activate - proselint check docs/internals/CHECKSRC.md docs/libcurl/opts/CURLOPT_INTERFACE.md docs/cmdline-opts/interface.md - - pyspelling: - name: 'pyspelling' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'trim all *.md files in docs/' - run: .github/scripts/cleancmd.pl 'docs/*.md' - - - name: 'install' - run: | - sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources} - sudo apt-get -o Dpkg::Use-Pty=0 update - sudo apt-get -o Dpkg::Use-Pty=0 install aspell aspell-en - python3 -m venv ~/venv - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r .github/scripts/requirements-docs.txt - - - name: 'check spelling' - run: | - source ~/venv/bin/activate - # setup the custom wordlist - grep -v '^#' .github/scripts/pyspelling.words > wordlist.txt - aspell --version - pyspelling --version - pyspelling --verbose --jobs 5 --config .github/scripts/pyspelling.yaml - - synopsis-man-examples: - name: 'synopsis, man-examples' - runs-on: ubuntu-24.04-arm - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'verify synopsis' - run: .github/scripts/verify-synopsis.pl docs/libcurl/curl*.md - - - name: 'verify examples' - run: .github/scripts/verify-examples.pl docs/libcurl/curl*.md docs/libcurl/opts/*.md diff --git a/.github/workflows/checksrc.yml b/.github/workflows/checksrc.yml deleted file mode 100644 index 5e3e87ca59..0000000000 --- a/.github/workflows/checksrc.yml +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -# This workflow contains checks at the source code level only. - -name: 'Source' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - pull_request: - branches: - - master - paths-ignore: - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -jobs: - checksrc: - name: 'checksrc' - runs-on: ubuntu-slim - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'check' - run: scripts/checksrc-all.pl - - linters: - name: 'spellcheck, linters, REUSE' - runs-on: ubuntu-24.04-arm - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'install prereqs' - run: | - python3 -m venv ~/venv - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary \ - -r .github/scripts/requirements.txt \ - -r tests/http/requirements.txt \ - -r tests/requirements.txt - - - name: 'REUSE check' - run: | - source ~/venv/bin/activate - reuse lint - - - name: 'codespell' - run: | - source ~/venv/bin/activate - codespell --version - .github/scripts/codespell.sh - - - name: 'typos' - timeout-minutes: 2 - run: | - HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install typos-cli - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - typos --version - .github/scripts/typos.sh - - - name: 'cmakelint' - run: | - source ~/venv/bin/activate - scripts/cmakelint.sh - - - name: 'perlcheck' - run: | - scripts/perlcheck.sh - - - name: 'pytype' - run: | - source ~/venv/bin/activate - find . -name '*.py' -exec pytype -j auto -k -- {} + - - - name: 'ruff' - run: | - source ~/venv/bin/activate - scripts/pythonlint.sh - - complexity: - name: 'complexity' - runs-on: ubuntu-slim - timeout-minutes: 3 - steps: - - name: 'install pmccabe' - run: | - sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources} - sudo apt-get -o Dpkg::Use-Pty=0 update - sudo apt-get -o Dpkg::Use-Pty=0 install \ - pmccabe - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'check scores' - run: ./scripts/top-complexity - - xmllint: - name: 'xmllint' - runs-on: ubuntu-slim - timeout-minutes: 3 - steps: - - name: 'install prereqs' - run: | - sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources} - sudo apt-get -o Dpkg::Use-Pty=0 update - sudo apt-get -o Dpkg::Use-Pty=0 install \ - libxml2-utils - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'check' - run: git grep -z -i -l -E '^<\?xml' | xargs -0 -r xmllint --output /dev/null - - miscchecks: - name: 'misc checks' - runs-on: ubuntu-24.04-arm - timeout-minutes: 5 - steps: - - name: 'install prereqs' - timeout-minutes: 2 - run: HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install actionlint shellcheck zizmor - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'zizmor GHA' - env: - GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - run: | - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - zizmor --pedantic .github/workflows/*.yml .github/dependabot.yml - - - name: 'actionlint' - run: | - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - export SHELLCHECK_OPTS='--exclude=1090,1091,2086,2153 --enable=avoid-nullary-conditions,deprecate-which' - actionlint --version - actionlint --ignore matrix .github/workflows/*.yml - - - name: 'shellcheck CI' - run: | - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - shellcheck --version - .github/scripts/shellcheck-ci.sh - - - name: 'shellcheck' - run: | - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - shellcheck --version - .github/scripts/shellcheck.sh - - - name: 'spacecheck' - run: scripts/spacecheck.pl - - - name: 'yamlcheck' - run: .github/scripts/yamlcheck.sh - - - name: 'badwords' - run: scripts/badwords-all diff --git a/.github/workflows/checkurls.yml b/.github/workflows/checkurls.yml deleted file mode 100644 index ec9b511205..0000000000 --- a/.github/workflows/checkurls.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'URLs' - -'on': - push: - branches: - - master - - '*/ci' - pull_request: - branches: - - master - schedule: - - cron: '10 5 * * *' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -jobs: - linkcheck: - if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }} - name: 'linkcheck' - runs-on: ubuntu-slim - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'mdlinkcheck (dry run)' - if: ${{ github.event_name != 'schedule' }} - run: ./scripts/mdlinkcheck --dry-run - - - name: 'mdlinkcheck' - if: ${{ github.event_name == 'schedule' }} - run: ./scripts/mdlinkcheck diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 17db4154fc..0000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'CodeQL' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'projects/**' - - 'tests/data/**' - pull_request: - branches: - - master - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'projects/**' - - 'tests/data/**' - schedule: - - cron: '0 0 * * 4' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -jobs: - gha_python: - if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }} - name: 'GHA and Python' - runs-on: ubuntu-latest - permissions: - security-events: write # To create/update security events - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'initialize' - uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 - with: - languages: actions, python - queries: security-extended - - - name: 'perform analysis' - uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 - - c: - if: ${{ github.repository_owner == 'curl' || github.event_name != 'schedule' }} - name: 'C' - runs-on: ${{ matrix.platform == 'Linux' && 'ubuntu-latest' || 'windows-2022' }} - permissions: - security-events: write # To create/update security events - strategy: - fail-fast: false - matrix: - platform: [Linux, Windows] - env: - MATRIX_PLATFORM: '${{ matrix.platform }}' - steps: - - name: 'install prereqs' - if: ${{ matrix.platform == 'Linux' }} - timeout-minutes: 5 - run: | - sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources} - sudo apt-get -o Dpkg::Use-Pty=0 update - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 60 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install \ - libpsl-dev libbrotli-dev libidn2-dev libssh2-1-dev libssh-dev \ - libnghttp2-dev libldap-dev libkrb5-dev libgnutls28-dev libwolfssl-dev - HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install c-ares gsasl libnghttp3 libngtcp2 mbedtls rustls-ffi - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'delete test input C files' - shell: bash - run: find tests/data -name '*.c' -delete - - - name: 'initialize' - # https://github.com/github/codeql-action/blob/main/init/action.yml - uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 - with: - languages: cpp - build-mode: manual - trap-caching: false - - - name: 'build' - timeout-minutes: 10 - shell: bash - run: | - if [ "${MATRIX_PLATFORM}" = 'Windows' ]; then - cmake -B . -DBUILD_SHARED_LIBS=OFF -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \ - -DCMAKE_VS_GLOBALS=TrackFileAccess=false \ - -DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBPSL=OFF -DUSE_WIN32_IDN=ON - cmake --build . --verbose - src/Debug/curl.exe --disable --version - else - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - - export PKG_CONFIG_PATH - - # MultiSSL - PKG_CONFIG_PATH="$(brew --prefix c-ares)/lib/pkgconfig:$(brew --prefix mbedtls)/lib/pkgconfig:$(brew --prefix rustls-ffi)/lib/pkgconfig:$(brew --prefix gsasl)/lib/pkgconfig" - cmake -B _bld1 -G Ninja -DCURL_DISABLE_TYPECHECK=ON -DCURL_WERROR=ON -DENABLE_DEBUG=ON \ - -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON -DCURL_USE_WOLFSSL=ON \ - -DCURL_USE_GSASL=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON -DUSE_ECH=ON -DENABLE_ARES=ON \ - -DCURL_DISABLE_VERBOSE_STRINGS=ON - cmake --build _bld1 - cmake --build _bld1 --target testdeps - cmake --build _bld1 --target curl-examples-build - - # HTTP/3 - PKG_CONFIG_PATH="$(brew --prefix libnghttp3)/lib/pkgconfig:$(brew --prefix libngtcp2)/lib/pkgconfig:$(brew --prefix gsasl)/lib/pkgconfig" - cmake -B _bld2 -G Ninja -DCURL_DISABLE_TYPECHECK=ON -DCURL_WERROR=ON \ - -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DUSE_NGTCP2=ON \ - -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON \ - -DCURL_USE_GSASL=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON - cmake --build _bld2 - cmake --build _bld2 --target testdeps - cmake --build _bld2 --target curl-examples-build - - _bld1/src/curl --disable --version - _bld2/src/curl --disable --version - fi - - - name: 'perform analysis' - # https://github.com/github/codeql-action/blob/main/analyze/action.yml - uses: github/codeql-action/analyze@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 diff --git a/.github/workflows/configure-vs-cmake.yml b/.github/workflows/configure-vs-cmake.yml deleted file mode 100644 index 8734e1a534..0000000000 --- a/.github/workflows/configure-vs-cmake.yml +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'configure-vs-cmake' -'on': - push: - branches: - - master - paths: - - '*.ac' - - '**/*.m4' - - '**/CMakeLists.txt' - - 'CMake/**' - - 'lib/curl_config-cmake.h.in' - - 'tests/cmake/**' - - '.github/scripts/cmp-config.pl' - - '.github/workflows/configure-vs-cmake.yml' - - pull_request: - branches: - - master - paths: - - '*.ac' - - '**/*.m4' - - '**/CMakeLists.txt' - - 'CMake/**' - - 'lib/curl_config-cmake.h.in' - - 'tests/cmake/**' - - '.github/scripts/cmp-config.pl' - - '.github/workflows/configure-vs-cmake.yml' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -jobs: - check-linux: - name: 'Linux' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'run configure --with-openssl' - run: | - autoreconf -fi - export PKG_CONFIG_DEBUG_SPEW=1 - mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl - - - name: 'run cmake' - run: cmake -B bld-cm -DCURL_WERROR=ON -DCURL_USE_CMAKECONFIG=OFF -DCURL_USE_LIBPSL=OFF - - - name: 'configure log' - run: cat bld-am/config.log 2>/dev/null || true - - - name: 'cmake log' - run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true - - - name: 'dump generated files' - run: | - for f in libcurl.pc curl-config; do - echo "::group::AM ${f}"; grep -v '^#' bld-am/"${f}" || true; echo '::endgroup::' - echo "::group::CM ${f}"; grep -v '^#' bld-cm/"${f}" || true; echo '::endgroup::' - done - - - name: 'compare generated curl_config.h files' - run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h - - - name: 'compare generated libcurl.pc files' - run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc - - - name: 'compare generated curl-config files' - run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config - - check-macos: - name: 'macOS' - runs-on: macos-latest - steps: - - name: 'install packages' - timeout-minutes: 2 - run: | - # shellcheck disable=SC2181 - while [[ $? == 0 ]]; do - for i in 1 2 3; do - if brew update && brew install automake libtool; then - break 2 - else - echo "Error: wait to try again: $i" - sleep 10 - fi - done - false Too many retries - done - - - name: 'toolchain versions' - run: echo '::group::brew packages installed'; ls -l /opt/homebrew/opt; echo '::endgroup::' - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'run configure --with-openssl' - run: | - autoreconf -fi - export PKG_CONFIG_DEBUG_SPEW=1 - mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-openssl --without-libpsl --disable-ldap --with-brotli --with-zstd --with-apple-sectrust - - - name: 'run cmake' - run: | - cmake -B bld-cm -DCURL_WERROR=ON -DCURL_USE_CMAKECONFIG=OFF -DCURL_USE_LIBPSL=OFF -DCURL_DISABLE_LDAP=ON \ - -DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64/')-apple-darwin$(uname -r)" \ - -DCURL_USE_LIBSSH2=OFF -DUSE_APPLE_SECTRUST=ON - - - name: 'configure log' - run: cat bld-am/config.log 2>/dev/null || true - - - name: 'cmake log' - run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true - - - name: 'dump generated files' - run: | - for f in libcurl.pc curl-config; do - echo "::group::AM ${f}"; grep -v '^#' bld-am/"${f}" || true; echo '::endgroup::' - echo "::group::CM ${f}"; grep -v '^#' bld-cm/"${f}" || true; echo '::endgroup::' - done - - - name: 'compare generated curl_config.h files' - run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h - - - name: 'compare generated libcurl.pc files' - run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc - - - name: 'compare generated curl-config files' - run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config - - check-windows: - name: 'Windows' - runs-on: ubuntu-latest - env: - TRIPLET: 'x86_64-w64-mingw32' - steps: - - name: 'install packages' - run: | - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 30 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install gcc-mingw-w64-x86-64-win32 - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'run configure --with-schannel' - run: | - autoreconf -fi - export PKG_CONFIG_DEBUG_SPEW=1 - mkdir bld-am && cd bld-am && ../configure --enable-static=no --with-schannel --without-libpsl --host="${TRIPLET}" - - - name: 'run cmake' - run: | - cmake -B bld-cm -DCURL_WERROR=ON -DCURL_USE_CMAKECONFIG=OFF -DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBPSL=OFF \ - -DCMAKE_SYSTEM_NAME=Windows \ - -DCMAKE_C_COMPILER_TARGET="${TRIPLET}" \ - -DCMAKE_C_COMPILER="${TRIPLET}-gcc" - - - name: 'configure log' - run: cat bld-am/config.log 2>/dev/null || true - - - name: 'cmake log' - run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true - - - name: 'dump generated files' - run: | - for f in libcurl.pc curl-config; do - echo "::group::AM ${f}"; grep -v '^#' bld-am/"${f}" || true; echo '::endgroup::' - echo "::group::CM ${f}"; grep -v '^#' bld-cm/"${f}" || true; echo '::endgroup::' - done - - - name: 'compare generated curl_config.h files' - run: ./.github/scripts/cmp-config.pl bld-am/lib/curl_config.h bld-cm/lib/curl_config.h - - - name: 'compare generated libcurl.pc files' - run: ./.github/scripts/cmp-pkg-config.sh bld-am/libcurl.pc bld-cm/libcurl.pc - - - name: 'compare generated curl-config files' - run: ./.github/scripts/cmp-pkg-config.sh bld-am/curl-config bld-cm/curl-config diff --git a/.github/workflows/curl-for-win.yml b/.github/workflows/curl-for-win.yml deleted file mode 100644 index 74a81f7e55..0000000000 --- a/.github/workflows/curl-for-win.yml +++ /dev/null @@ -1,196 +0,0 @@ -# Copyright (C) Viktor Szakats -# -# SPDX-License-Identifier: curl ---- -name: 'curl-for-win' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - pull_request: - branches: - - master - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -env: - CW_NOGET: 'curl trurl' - CW_MAP: '0' - CW_JOBS: '5' - CW_NOPKG: '1' - -jobs: - linux-glibc-gcc: - name: 'Linux gcc glibc (amd64, arm64)' - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - path: 'curl' - fetch-depth: 8 - - name: 'build' - run: | - git clone --depth 1 https://github.com/curl/curl-for-win - mv curl-for-win/* . - export CW_CONFIG='-main-werror-unitybatch-nocertdata-linux-a64-x64-gcc' - export CW_REVISION="${GITHUB_SHA}" - . ./_versions.sh - export CW_CCSUFFIX='-15' - export CW_GCCSUFFIX='-12' - sudo podman image trust set --type reject default - sudo podman image trust set --type accept docker.io/library - time podman pull "${OCI_IMAGE_DEBIAN_STABLE}" - podman images --digests - time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \ - --env-file <(env | grep -a -E \ - '^(CW_|GITHUB_)') \ - "${OCI_IMAGE_DEBIAN_STABLE}" \ - sh -c ./_ci-linux-debian.sh - - linux-glibc-gcc-minimal: # use gcc to minimize installed packages - name: 'Linux gcc glibc minimal (amd64)' - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - path: 'curl' - fetch-depth: 8 - - name: 'build' - run: | - git clone --depth 1 https://github.com/curl/curl-for-win - mv curl-for-win/* . - export CW_CONFIG='-main-werror-unitybatch-nocertdata-prefill-zero-osnotls-osnoidn-nohttp-nocurltool-linux-x64-gcc' - export CW_REVISION="${GITHUB_SHA}" - . ./_versions.sh - sudo podman image trust set --type reject default - sudo podman image trust set --type accept docker.io/library - time podman pull "${OCI_IMAGE_DEBIAN}" - podman images --digests - time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \ - --env-file <(env | grep -a -E \ - '^(CW_|GITHUB_)') \ - "${OCI_IMAGE_DEBIAN}" \ - sh -c ./_ci-linux-debian.sh - - linux-musl-llvm: - name: 'Linux llvm MUSL (amd64, riscv64)' - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - path: 'curl' - fetch-depth: 8 - - name: 'build' - run: | - git clone --depth 1 https://github.com/curl/curl-for-win - mv curl-for-win/* . - export CW_CONFIG='-main-werror-unitybatch-nocertdata-linux-musl-r64-x64' - export CW_REVISION="${GITHUB_SHA}" - . ./_versions.sh - sudo podman image trust set --type reject default - sudo podman image trust set --type accept docker.io/library - time podman pull "${OCI_IMAGE_DEBIAN}" - podman images --digests - time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \ - --env-file <(env | grep -a -E \ - '^(CW_|GITHUB_)') \ - "${OCI_IMAGE_DEBIAN}" \ - sh -c ./_ci-linux-debian.sh - - mac-clang: - name: 'macOS clang cares (x86_64)' - runs-on: macos-latest - timeout-minutes: 10 - env: - CW_JOBS: '4' - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - path: 'curl' - fetch-depth: 8 - - name: 'build' - run: | - git clone --depth 1 https://github.com/curl/curl-for-win - mv curl-for-win/* . - export CW_CONFIG='-main-werror-unitybatch-nocertdata-mac-x64-cares' - export CW_REVISION="${GITHUB_SHA}" - sh -c ./_ci-mac-homebrew.sh - - win-llvm: - name: 'Windows llvm (x64)' - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - path: 'curl' - fetch-depth: 8 - - name: 'build' - run: | - git clone --depth 1 https://github.com/curl/curl-for-win - mv curl-for-win/* . - export CW_CONFIG='-main-werror-unitybatch-nocertdata-win-x64-noWINE' - export CW_REVISION="${GITHUB_SHA}" - . ./_versions.sh - sudo podman image trust set --type reject default - sudo podman image trust set --type accept docker.io/library - time podman pull "${OCI_IMAGE_DEBIAN}" - podman images --digests - time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \ - --env-file <(env | grep -a -E \ - '^(CW_|GITHUB_)') \ - "${OCI_IMAGE_DEBIAN}" \ - sh -c ./_ci-linux-debian.sh - - win-gcc-zlibold-x64: - name: 'Windows gcc zlib-classic (x64)' - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - path: 'curl' - fetch-depth: 8 - - name: 'build' - run: | - git clone --depth 1 https://github.com/curl/curl-for-win - mv curl-for-win/* . - export CW_CONFIG='-main-werror-unitybatch-nocertdata-win-x64-gcc-zlibold-noWINE' - export CW_REVISION="${GITHUB_SHA}" - . ./_versions.sh - sudo podman image trust set --type reject default - sudo podman image trust set --type accept docker.io/library - time podman pull "${OCI_IMAGE_DEBIAN}" - podman images --digests - time podman run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \ - --env-file <(env | grep -a -E \ - '^(CW_|GITHUB_)') \ - "${OCI_IMAGE_DEBIAN}" \ - sh -c ./_ci-linux-debian.sh diff --git a/.github/workflows/distcheck.yml b/.github/workflows/distcheck.yml deleted file mode 100644 index b9c4c71988..0000000000 --- a/.github/workflows/distcheck.yml +++ /dev/null @@ -1,370 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'dist' - -'on': - push: - branches: - - master - - '*/ci' - pull_request: - branches: - - master - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -env: - CURL_TEST_MIN: 1450 - MAKEFLAGS: -j 5 - -jobs: - maketgz-and-verify-in-tree: - name: 'AM in-tree & maketgz' - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'remove preinstalled curl libcurl4{-doc}' - run: sudo apt-get -o Dpkg::Use-Pty=0 purge curl libcurl4 libcurl4-doc - - - name: 'autoreconf' - run: autoreconf -fi - - - name: 'configure' - run: ./configure --without-ssl --without-libpsl - - - name: 'make' - run: make V=1 - - - name: 'maketgz' - run: SOURCE_DATE_EPOCH=1711526400 ./scripts/maketgz 99.98.97 - - - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 - with: - name: 'release-tgz' - path: 'curl-99.98.97.tar.gz' - retention-days: 1 - - - name: 'configure build & install' - run: | - echo "::stop-commands::$(uuidgen)" - tar xvf curl-99.98.97.tar.gz - pushd curl-99.98.97 - ./configure --prefix="$HOME"/temp --enable-option-checking=fatal --enable-werror --without-ssl --without-libpsl - make - make test-ci - make install - popd - # basic check of the installed files - bash scripts/installcheck.sh "$HOME"/temp - rm -rf curl-99.98.97 - - verify-out-of-tree-docs: - name: 'AM out-of-tree docs' - runs-on: ubuntu-latest - timeout-minutes: 10 - needs: maketgz-and-verify-in-tree - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: 'release-tgz' - - - name: 'configure build & docs' - run: | - echo "::stop-commands::$(uuidgen)" - tar xvf curl-99.98.97.tar.gz - touch curl-99.98.97/docs/{cmdline-opts,libcurl}/Makefile.inc - mkdir build - pushd build - ../curl-99.98.97/configure --enable-option-checking=fatal --enable-werror --without-ssl --without-libpsl - make - make test-ci - popd - rm -rf build - rm -rf curl-99.98.97 - - verify-out-of-tree-autotools-debug: - name: 'AM out-of-tree (debug)' - runs-on: ubuntu-latest - timeout-minutes: 10 - needs: maketgz-and-verify-in-tree - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: 'release-tgz' - - - name: 'build & install' - run: | - echo "::stop-commands::$(uuidgen)" - tar xvf curl-99.98.97.tar.gz - pushd curl-99.98.97 - mkdir build - pushd build - ../configure --prefix="$PWD"/curl-install --enable-option-checking=fatal --enable-werror --without-ssl --enable-debug --without-libpsl - make - make test-ci - make install - curl-install/bin/curl --disable --version - curl-install/bin/curl --manual | wc -l | grep -v '^ *0$' - popd - scripts/checksrc-all.pl - - verify-out-of-tree-autotools: - name: 'AM out-of-tree !perl' - runs-on: ubuntu-latest - timeout-minutes: 10 - needs: maketgz-and-verify-in-tree - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: 'release-tgz' - - - name: 'build & install' - run: | - echo "::stop-commands::$(uuidgen)" - tar xvf curl-99.98.97.tar.gz - pushd curl-99.98.97 - mkdir build - pushd build - ../configure --prefix="$PWD"/curl-install --enable-option-checking=fatal --enable-werror --without-ssl --without-libpsl ac_cv_path_PERL= - make - make install - curl-install/bin/curl --disable --version - curl-install/bin/curl --manual | wc -l | grep -v '^ *0$' - popd - - verify-in-tree-autotools: - name: 'AM in-tree !perl' - runs-on: ubuntu-latest - timeout-minutes: 10 - needs: maketgz-and-verify-in-tree - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: 'release-tgz' - - - name: 'build & install' - run: | - echo "::stop-commands::$(uuidgen)" - tar xvf curl-99.98.97.tar.gz - pushd curl-99.98.97 - ./configure --prefix="$PWD"/curl-install --enable-option-checking=fatal --enable-werror --without-ssl --without-libpsl ac_cv_path_PERL= - make - make install - curl-install/bin/curl --disable --version - curl-install/bin/curl --manual | wc -l | grep -v '^ *0$' - - verify-out-of-tree-cmake: - name: 'CM out-of-tree !perl' - runs-on: ubuntu-latest - timeout-minutes: 5 - needs: maketgz-and-verify-in-tree - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: 'release-tgz' - - - name: 'build & install' - run: | - echo "::stop-commands::$(uuidgen)" - tar xvf curl-99.98.97.tar.gz - pushd curl-99.98.97 - cmake -B build -DCMAKE_INSTALL_PREFIX="$PWD"/curl-install -DCURL_WERROR=ON -DCURL_USE_LIBPSL=OFF -DPERL_EXECUTABLE= - cmake --build build - cmake --install build - export LD_LIBRARY_PATH="$PWD/curl-install/lib:$LD_LIBRARY_PATH" - curl-install/bin/curl --disable --version - curl-install/bin/curl --manual | wc -l | grep -v '^ *0$' - - verify-in-tree-cmake: - name: 'CM in-tree !perl' - runs-on: ubuntu-latest - timeout-minutes: 5 - needs: maketgz-and-verify-in-tree - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: 'release-tgz' - - - name: 'build & install' - run: | - echo "::stop-commands::$(uuidgen)" - tar xvf curl-99.98.97.tar.gz - pushd curl-99.98.97 - cmake . -G Ninja -DCMAKE_INSTALL_PREFIX="$PWD"/curl-install -DCURL_WERROR=ON -DCURL_USE_LIBPSL=OFF -DPERL_EXECUTABLE= - cmake --build . - cmake --install . - export LD_LIBRARY_PATH="$PWD/curl-install/lib:$LD_LIBRARY_PATH" - curl-install/bin/curl --disable --version - curl-install/bin/curl --manual | wc -l | grep -v '^ *0$' - - missing-files: - name: 'missing files' - runs-on: ubuntu-slim - timeout-minutes: 5 - needs: maketgz-and-verify-in-tree - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: 'release-tgz' - - - name: 'detect files missing from release tarball' - run: .github/scripts/distfiles.sh curl-99.98.97.tar.gz - - reproducible-releases: - name: 'reproducible releases' - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'remove preinstalled curl libcurl4{-doc}' - run: sudo apt-get -o Dpkg::Use-Pty=0 purge curl libcurl4 libcurl4-doc - - - name: 'generate release tarballs' - run: ./scripts/dmaketgz 9.10.11 - - - name: 'verify release tarballs' - run: | - mkdir _verify - mv curl-9.10.11.tar.gz _verify - cd _verify - ../scripts/verify-release curl-9.10.11.tar.gz - - cmake-integration: - name: 'CM integration ${{ matrix.image }}' - runs-on: ${{ matrix.image }} - timeout-minutes: 15 - defaults: - run: - shell: ${{ contains(matrix.image, 'windows') && 'msys2 {0}' || 'bash' }} - env: - CC: ${{ !contains(matrix.image, 'windows') && 'clang' || '' }} - MAKEFLAGS: ${{ contains(matrix.image, 'macos') && '-j 4' || '-j 5' }} - MATRIX_IMAGE: '${{ matrix.image }}' - TESTOPTS: ${{ contains(matrix.image, 'macos') && '-D_CURL_PREFILL=ON' || '' }} ${{ contains(matrix.image, 'windows') && '-DCMAKE_UNITY_BUILD_BATCH_SIZE=30' || '' }} - OLD_CMAKE_VERSION: 3.19.8 - OLD_CMAKE_SHA256_LINUX_ARM: 807f5afb2a560e00af9640e496d5673afefc2888bf0ed076412884a5ebb547a1 - OLD_CMAKE_SHA256_MACOS_UNI: 0976d23d982af05dcbfb3aa34fcb62ead43bea27f0e3bb95222f2a78161423f2 - OLD_CMAKE_SHA256_WIN_INTEL: 2a30877a3d6b50da305b289f4d1c03befdfaeb2edba02a563c681e883d810380 - strategy: - fail-fast: false - matrix: - image: [ubuntu-24.04-arm, macos-latest, windows-2022] - steps: - - uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0 - if: ${{ contains(matrix.image, 'windows') }} - with: - msystem: mingw64 - release: false - update: false - cache: false - path-type: inherit - install: >- - mingw-w64-x86_64-zlib mingw-w64-x86_64-zstd mingw-w64-x86_64-libpsl mingw-w64-x86_64-libssh2 mingw-w64-x86_64-nghttp2 mingw-w64-x86_64-openssl - - - name: 'install prereqs' - timeout-minutes: 3 - run: | - if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - --location "https://github.com/Kitware/CMake/releases/download/v${OLD_CMAKE_VERSION}/cmake-${OLD_CMAKE_VERSION}-win64-x64.zip" --output pkg.bin - sha256sum pkg.bin && sha256sum pkg.bin | grep -qwF -- "${OLD_CMAKE_SHA256_WIN_INTEL}" && unzip -q pkg.bin && rm -f pkg.bin - printf '%s' ~/cmake-"${OLD_CMAKE_VERSION}"-win64-x64/bin/cmake.exe > ~/old-cmake-path.txt - elif [[ "${MATRIX_IMAGE}" = *'ubuntu'* ]]; then - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 30 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install libpsl-dev libssl-dev - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - --location "https://github.com/Kitware/CMake/releases/download/v${OLD_CMAKE_VERSION}/cmake-${OLD_CMAKE_VERSION}-Linux-aarch64.tar.gz" --output pkg.bin - sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${OLD_CMAKE_SHA256_LINUX_ARM}" && tar -xzf pkg.bin && rm -f pkg.bin - printf '%s' ~/cmake-"${OLD_CMAKE_VERSION}"-Linux-aarch64/bin/cmake > ~/old-cmake-path.txt - else - brew install libpsl openssl - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - --location "https://github.com/Kitware/CMake/releases/download/v${OLD_CMAKE_VERSION}/cmake-${OLD_CMAKE_VERSION}-macos-universal.tar.gz" --output pkg.bin - sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${OLD_CMAKE_SHA256_MACOS_UNI}" && tar -xzf pkg.bin && rm -f pkg.bin - printf '%s' ~/cmake-"${OLD_CMAKE_VERSION}"-macos-universal/CMake.app/Contents/bin/cmake > ~/old-cmake-path.txt - fi - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'via ExternalProject' - if: ${{ !contains(matrix.image, 'ubuntu') }} - run: ./tests/cmake/test.sh ExternalProject ${TESTOPTS} - - name: 'via FetchContent' - run: ./tests/cmake/test.sh FetchContent ${TESTOPTS} -DCURL_USE_OPENSSL=ON - - name: 'via add_subdirectory' - run: ./tests/cmake/test.sh add_subdirectory ${TESTOPTS} -DCURL_USE_OPENSSL=ON - - name: 'via find_package' - run: ./tests/cmake/test.sh find_package ${TESTOPTS} -DCURL_USE_OPENSSL=ON - - name: 'via find_package (C++)' - if: ${{ contains(matrix.image, 'ubuntu') }} - run: TEST_CMAKE_FLAGS=-DTEST_CPP=ON ./tests/cmake/test.sh find_package ${TESTOPTS} -DCURL_USE_OPENSSL=ON - - name: 'via find_package (PREFER_CONFIG=ON)' - if: ${{ contains(matrix.image, 'windows') }} - run: | - export TEST_CMAKE_FLAGS_PROVIDER='-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DCURL_ZSTD=OFF' - TEST_CMAKE_FLAGS_PROVIDER+=' -DNGHTTP2_INCLUDE_DIR=C:/msys64/mingw64/include -DNGHTTP2_LIBRARY=C:/msys64/mingw64/lib/libnghttp2.dll.a' - export TEST_CMAKE_FLAGS_CONSUMER="${TEST_CMAKE_FLAGS_PROVIDER}" - ./tests/cmake/test.sh find_package ${TESTOPTS} -DCURL_USE_OPENSSL=ON - - - name: 'via ExternalProject (old cmake)' - if: ${{ contains(matrix.image, 'ubuntu') }} - run: | - export TEST_CMAKE_CONSUMER; TEST_CMAKE_CONSUMER="$(cat ~/old-cmake-path.txt)" - if [[ "${MATRIX_IMAGE}" = *'macos'* ]]; then - export CFLAGS='-arch arm64' - fi - if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then - export TEST_CMAKE_GENERATOR='MSYS Makefiles' - export TEST_CMAKE_FLAGS='-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc' - fi - ./tests/cmake/test.sh ExternalProject ${TESTOPTS} - - - name: 'via add_subdirectory OpenSSL (old cmake)' - run: | - export TEST_CMAKE_CONSUMER; TEST_CMAKE_CONSUMER="$(cat ~/old-cmake-path.txt)" - if [[ "${MATRIX_IMAGE}" = *'macos'* ]]; then - export CFLAGS='-arch arm64' - export TEST_CMAKE_FLAGS='-DCURL_USE_LIBPSL=OFF' # auto-detection does not work with old-cmake - fi - if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then - export TEST_CMAKE_GENERATOR='MSYS Makefiles' - export TEST_CMAKE_FLAGS='-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DOPENSSL_ROOT_DIR=C:/msys64/mingw64' - fi - ./tests/cmake/test.sh add_subdirectory ${TESTOPTS} -DCURL_USE_OPENSSL=ON - - - name: 'via find_package OpenSSL (old cmake)' - run: | - export TEST_CMAKE_CONSUMER; TEST_CMAKE_CONSUMER="$(cat ~/old-cmake-path.txt)" - if [[ "${MATRIX_IMAGE}" = *'macos'* ]]; then - export CFLAGS='-arch arm64' - export TEST_CMAKE_FLAGS='-DCURL_USE_LIBPSL=OFF' # auto-detection does not work with old-cmake - fi - if [[ "${MATRIX_IMAGE}" = *'windows'* ]]; then - export TEST_CMAKE_GENERATOR='MSYS Makefiles' - export TEST_CMAKE_FLAGS='-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DOPENSSL_ROOT_DIR=C:/msys64/mingw64' - fi - ./tests/cmake/test.sh find_package ${TESTOPTS} -DCURL_USE_OPENSSL=ON diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml deleted file mode 100644 index 45884515e8..0000000000 --- a/.github/workflows/fuzz.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'Fuzzer' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '**/*.md' - - '**/CMakeLists.txt' - - '.circleci/**' - - 'appveyor.*' - - 'CMake/**' - - 'Dockerfile' - - 'projects/**' - - 'tests/data/**' - pull_request: - branches: - - master - paths-ignore: - - '**/*.md' - - '**/CMakeLists.txt' - - '.circleci/**' - - 'appveyor.*' - - 'CMake/**' - - 'Dockerfile' - - 'projects/**' - - 'tests/data/**' - -concurrency: - # Hard-coded workflow name to avoid colliding with curl-fuzzer's group - group: curl-fuzz-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -jobs: - Fuzzing: - uses: curl/curl-fuzzer/.github/workflows/ci.yml@master # zizmor: ignore[unpinned-uses] diff --git a/.github/workflows/http3-linux.yml b/.github/workflows/http3-linux.yml deleted file mode 100644 index 226e10844c..0000000000 --- a/.github/workflows/http3-linux.yml +++ /dev/null @@ -1,861 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'Linux HTTP/3' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - pull_request: - branches: - - master - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -env: - MAKEFLAGS: -j 5 - CURL_CI: github - CURL_TEST_MIN: 1600 - # handled in renovate.json - OPENSSL_VERSION: 3.6.2 - # manually bumped - OPENSSL4_VERSION: 4.0.0-beta1 - # renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com - LIBRESSL_VERSION: 4.2.1 - # renovate: datasource=github-tags depName=awslabs/aws-lc versioning=semver registryUrl=https://github.com - AWSLC_VERSION: 1.69.0 - # renovate: datasource=github-tags depName=google/boringssl versioning=semver registryUrl=https://github.com - BORINGSSL_VERSION: 0.20260327.0 - # renovate: datasource=github-tags depName=gnutls/nettle versioning=semver registryUrl=https://github.com - NETTLE_VERSION: 3.10.2 - # renovate: datasource=github-tags depName=gnutls/gnutls versioning=semver extractVersion=^nettle_?(?.+)_release_.+$ registryUrl=https://github.com - GNUTLS_VERSION: 3.8.11 - # renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?.+)-stable$ registryUrl=https://github.com - WOLFSSL_VERSION: 5.9.0 - # renovate: datasource=github-tags depName=ngtcp2/nghttp3 versioning=semver registryUrl=https://github.com - NGHTTP3_VERSION: 1.15.0 - # renovate: datasource=github-tags depName=ngtcp2/ngtcp2 versioning=semver registryUrl=https://github.com - NGTCP2_VERSION: 1.22.0 - # renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com - NGHTTP2_VERSION: 1.68.1 - # renovate: datasource=github-tags depName=cloudflare/quiche versioning=semver registryUrl=https://github.com - QUICHE_VERSION: 0.24.7 - -jobs: - build-cache: - name: 'Build caches' - runs-on: ubuntu-latest - - steps: - - name: 'cache openssl' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-openssl-http3-no-deprecated - env: - cache-name: cache-openssl-http3-no-deprecated - with: - path: ~/openssl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL_VERSION }} - - - name: 'cache openssl4' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-openssl4-http3-no-deprecated - env: - cache-name: cache-openssl4-http3-no-deprecated - with: - path: ~/openssl4/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL4_VERSION }} - - - name: 'cache libressl' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-libressl - env: - cache-name: cache-libressl - with: - path: ~/libressl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }} - - - name: 'cache awslc' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-awslc - env: - cache-name: cache-awslc - with: - path: ~/awslc/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.AWSLC_VERSION }} - - - name: 'cache boringssl' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-boringssl - env: - cache-name: cache-boringssl - with: - path: ~/boringssl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.BORINGSSL_VERSION }} - - - name: 'cache nettle' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-nettle - env: - cache-name: cache-nettle - with: - path: ~/nettle/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NETTLE_VERSION }} - - - name: 'cache gnutls' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-gnutls - env: - cache-name: cache-gnutls - with: - path: ~/gnutls/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.GNUTLS_VERSION }}-${{ env.NETTLE_VERSION }} - - - name: 'cache wolfssl' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-wolfssl - env: - cache-name: cache-wolfssl - with: - path: ~/wolfssl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }} - - - name: 'cache nghttp3' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-nghttp3 - env: - cache-name: cache-nghttp3 - with: - path: ~/nghttp3/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP3_VERSION }} - - - name: 'cache ngtcp2' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-ngtcp2 - env: - cache-name: cache-ngtcp2 - with: - path: ~/ngtcp2/build - key: "${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_VERSION }}-\ - ${{ env.LIBRESSL_VERSION }}-${{ env.AWSLC_VERSION }}-${{ env.NETTLE_VERSION }}-${{ env.GNUTLS_VERSION }}-${{ env.WOLFSSL_VERSION }}" - - - name: 'cache ngtcp2 openssl4' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-ngtcp2-openssl4 - env: - cache-name: cache-ngtcp2-openssl4 - with: - path: ~/ngtcp2-openssl4/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL4_VERSION }} - - - name: 'cache ngtcp2 boringssl' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-ngtcp2-boringssl - env: - cache-name: cache-ngtcp2-boringssl - with: - path: ~/ngtcp2-boringssl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.BORINGSSL_VERSION }} - - - name: 'cache nghttp2' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-nghttp2 - env: - cache-name: cache-nghttp2 - with: - path: ~/nghttp2/build - key: "${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP2_VERSION }}-${{ env.OPENSSL_VERSION }}-\ - ${{ env.NGTCP2_VERSION }}-${{ env.NGHTTP3_VERSION }}" - - - id: settings - if: >- - ${{ steps.cache-openssl-http3-no-deprecated.outputs.cache-hit != 'true' || - steps.cache-openssl4-http3-no-deprecated.outputs.cache-hit != 'true' || - steps.cache-libressl.outputs.cache-hit != 'true' || - steps.cache-awslc.outputs.cache-hit != 'true' || - steps.cache-boringssl.outputs.cache-hit != 'true' || - steps.cache-nettle.outputs.cache-hit != 'true' || - steps.cache-gnutls.outputs.cache-hit != 'true' || - steps.cache-wolfssl.outputs.cache-hit != 'true' || - steps.cache-nghttp3.outputs.cache-hit != 'true' || - steps.cache-ngtcp2.outputs.cache-hit != 'true' || - steps.cache-ngtcp2-openssl4.outputs.cache-hit != 'true' || - steps.cache-ngtcp2-boringssl.outputs.cache-hit != 'true' || - steps.cache-nghttp2.outputs.cache-hit != 'true' }} - - run: echo 'needs-build=true' >> "$GITHUB_OUTPUT" - - - name: 'install build prereqs' - if: ${{ steps.settings.outputs.needs-build == 'true' }} - run: | - sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources} - sudo apt-get -o Dpkg::Use-Pty=0 update - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 60 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install \ - libtool autoconf automake pkgconf \ - libbrotli-dev libzstd-dev zlib1g-dev \ - libev-dev \ - libc-ares-dev \ - libp11-kit-dev autopoint bison gperf gtk-doc-tools libtasn1-bin # for GnuTLS - echo 'CC=gcc-12' >> "$GITHUB_ENV" - echo 'CXX=g++-12' >> "$GITHUB_ENV" - - - name: 'build openssl' - if: ${{ steps.cache-openssl-http3-no-deprecated.outputs.cache-hit != 'true' }} - run: | - cd ~ - git clone --quiet --depth 1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl - cd openssl - ./config --prefix="$PWD"/build --libdir=lib no-makedepend no-apps no-docs no-tests no-deprecated - make - make -j1 install_sw - - - name: 'build openssl4' - if: ${{ steps.cache-openssl4-http3-no-deprecated.outputs.cache-hit != 'true' }} - run: | - cd ~ - git clone --quiet --depth 1 -b "openssl-${OPENSSL4_VERSION}" https://github.com/openssl/openssl openssl4 - cd openssl4 - ./config --prefix="$PWD"/build --libdir=lib no-makedepend no-apps no-docs no-tests no-deprecated - make - make -j1 install_sw - - - name: 'build libressl' - if: ${{ steps.cache-libressl.outputs.cache-hit != 'true' }} - run: | - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "libressl-${LIBRESSL_VERSION}" - cmake -B . -G Ninja -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/libressl/build - cmake --build . - cmake --install . - - - name: 'build awslc' - if: ${{ steps.cache-awslc.outputs.cache-hit != 'true' }} - run: | - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/awslabs/aws-lc/archive/refs/tags/v${AWSLC_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "aws-lc-${AWSLC_VERSION}" - cmake -B . -G Ninja -DBUILD_SHARED_LIBS=ON -DBUILD_TOOL=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/awslc/build - cmake --build . - cmake --install . - - - name: 'build boringssl' - if: ${{ steps.cache-boringssl.outputs.cache-hit != 'true' }} - run: | - mkdir boringssl-src - cd boringssl-src - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - "https://boringssl.googlesource.com/boringssl/+archive/${BORINGSSL_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cmake -B . -G Ninja -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/boringssl/build - cmake --build . - cmake --install . - - - name: 'build nettle' - if: ${{ steps.cache-nettle.outputs.cache-hit != 'true' }} - run: | - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://ftpmirror.gnu.org/nettle/nettle-${NETTLE_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "nettle-${NETTLE_VERSION}" - autoreconf -fi - ./configure --disable-dependency-tracking --prefix=/home/runner/nettle/build \ - --disable-static --disable-openssl --disable-documentation - make install - - - name: 'build gnutls' - if: ${{ steps.cache-gnutls.outputs.cache-hit != 'true' }} - run: | - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - "https://www.gnupg.org/ftp/gcrypt/gnutls/v${GNUTLS_VERSION%.*}/gnutls-${GNUTLS_VERSION}.tar.xz" --output pkg.bin - sha256sum pkg.bin && tar -xJf pkg.bin && rm -f pkg.bin - cd "gnutls-${GNUTLS_VERSION}" - autoreconf -fi - # required: libp11-kit-dev libev-dev autopoint bison gperf gtk-doc-tools libtasn1-bin - ./configure --disable-dependency-tracking --prefix=/home/runner/gnutls/build \ - PKG_CONFIG_PATH=/home/runner/nettle/build/lib64/pkgconfig \ - LDFLAGS=-Wl,-rpath,/home/runner/nettle/build/lib64 \ - --with-included-libtasn1 --with-included-unistring \ - --disable-guile --disable-doc --disable-tests --disable-tools - make install - - - name: 'build wolfssl' - if: ${{ steps.cache-wolfssl.outputs.cache-hit != 'true' }} - run: | - cd ~ - git clone --quiet --depth 1 -b "v${WOLFSSL_VERSION}-stable" https://github.com/wolfSSL/wolfssl - cd wolfssl - ./autogen.sh - ./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-all --enable-quic \ - --disable-benchmark --disable-crypttests --disable-examples - make - make install - - - name: 'build nghttp3' - if: ${{ steps.cache-nghttp3.outputs.cache-hit != 'true' }} - run: | - cd ~ - git clone --quiet --depth 1 -b "v${NGHTTP3_VERSION}" https://github.com/ngtcp2/nghttp3 - cd nghttp3 - git submodule update --init --depth 1 - autoreconf -fi - ./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only - make - make install - - - name: 'build ngtcp2' - if: ${{ steps.cache-ngtcp2.outputs.cache-hit != 'true' }} - # building twice to get crypto libs for ossl, libressl and awslc installed - run: | - cd ~ - git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 - cd ngtcp2 - autoreconf -fi - ./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only \ - PKG_CONFIG_PATH=/home/runner/libressl/build/lib/pkgconfig \ - --with-openssl - make install - make clean - export PKG_CONFIG_PATH=/home/runner/openssl/build/lib/pkgconfig - PKG_CONFIG_PATH+=:/home/runner/nettle/build/lib64/pkgconfig - PKG_CONFIG_PATH+=:/home/runner/gnutls/build/lib/pkgconfig - PKG_CONFIG_PATH+=:/home/runner/wolfssl/build/lib/pkgconfig - ./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only \ - --with-openssl --with-gnutls --with-wolfssl --with-boringssl \ - BORINGSSL_LIBS='-L/home/runner/awslc/build/lib -lssl -lcrypto' \ - BORINGSSL_CFLAGS='-I/home/runner/awslc/build/include' - make install - - - name: 'build ngtcp2 openssl4' - if: ${{ steps.cache-ngtcp2-openssl4.outputs.cache-hit != 'true' }} - run: | - cd ~ - git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-openssl4 - cd ngtcp2-openssl4 - autoreconf -fi - ./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only \ - PKG_CONFIG_PATH=/home/runner/openssl4/build/lib/pkgconfig \ - --with-openssl - make install - - - name: 'build ngtcp2 boringssl' - if: ${{ steps.cache-ngtcp2-boringssl.outputs.cache-hit != 'true' }} - run: | - cd ~ - git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-boringssl - cd ngtcp2-boringssl - autoreconf -fi - ./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only \ - --with-openssl=no --with-boringssl \ - BORINGSSL_LIBS='-L/home/runner/boringssl/build/lib -lssl -lcrypto' \ - BORINGSSL_CFLAGS='-I/home/runner/boringssl/build/include' - make install - - - name: 'build nghttp2' - if: ${{ steps.cache-nghttp2.outputs.cache-hit != 'true' }} - run: | - cd ~ - git clone --quiet --depth 1 -b "v${NGHTTP2_VERSION}" https://github.com/nghttp2/nghttp2 - cd nghttp2 - git submodule update --init --depth 1 - autoreconf -fi - # required (for nghttpx application): libc-ares-dev libev-dev zlib1g-dev - # optional (for nghttpx application): libbrotli-dev - export PKG_CONFIG_PATH=/home/runner/openssl/build/lib/pkgconfig - PKG_CONFIG_PATH+=:/home/runner/nghttp3/build/lib/pkgconfig - PKG_CONFIG_PATH+=:/home/runner/ngtcp2/build/lib/pkgconfig - ./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-app --enable-http3 \ - LDFLAGS=-Wl,-rpath,/home/runner/openssl/build/lib \ - --with-libbrotlienc --with-libbrotlidec - make install - - linux: - name: ${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.name }} - needs: build-cache - runs-on: ubuntu-latest - timeout-minutes: 10 - env: - CURL_TRACE_PKG_CONFIG: '1' - MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }} - MATRIX_INSTALL_PACKAGES: '${{ matrix.build.install_packages }}' - strategy: - fail-fast: false - matrix: - build: - - name: 'openssl' - tflags: '--min=1640' - LDFLAGS: -Wl,-rpath,/home/runner/openssl/build/lib - PKG_CONFIG_PATH: /home/runner/openssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - configure: >- - --with-openssl=/home/runner/openssl/build --with-ngtcp2=/home/runner/ngtcp2/build --enable-ssls-export - - - name: 'openssl' - install_steps: skipall - PKG_CONFIG_PATH: /home/runner/openssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - generate: >- - -DOPENSSL_ROOT_DIR=/home/runner/openssl/build -DUSE_NGTCP2=ON - -DCURL_DISABLE_LDAP=ON - -DCMAKE_UNITY_BUILD=ON - - - name: 'openssl4' - install_steps: skipall - LDFLAGS: -Wl,-rpath,/home/runner/openssl4/build/lib - PKG_CONFIG_PATH: "/home/runner/openssl4/build/lib/pkgconfig:\ - /home/runner/nghttp3/build/lib/pkgconfig:\ - /home/runner/nghttp2-openssl4/build/lib/pkgconfig" - configure: >- - --with-openssl=/home/runner/openssl4/build --with-ngtcp2=/home/runner/ngtcp2-openssl4/build --enable-ech --enable-ssls-export - - - name: 'openssl4' - tflags: '--min=1640' - PKG_CONFIG_PATH: "/home/runner/openssl4/build/lib/pkgconfig:\ - /home/runner/nghttp3/build/lib/pkgconfig:\ - /home/runner/ngtcp2-openssl4/build/lib/pkgconfig:\ - /home/runner/nghttp2/build/lib/pkgconfig" - generate: >- - -DOPENSSL_ROOT_DIR=/home/runner/openssl4/build -DUSE_NGTCP2=ON - -DCURL_DISABLE_LDAP=ON - -DUSE_ECH=ON - - - name: 'libressl' - install_steps: skipall - LDFLAGS: -Wl,-rpath,/home/runner/libressl/build/lib - PKG_CONFIG_PATH: /home/runner/libressl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - # Intentionally using '--with-ngtcp2=' to test this way of configuration, in addition to bare '--with-ngtcp2' + 'PKG_CONFIG_PATH' in other jobs. - configure: >- - --with-openssl=/home/runner/libressl/build --with-ngtcp2=/home/runner/ngtcp2/build --enable-ssls-export - --enable-unity - - - name: 'libressl' - tflags: '--min=1790' - PKG_CONFIG_PATH: /home/runner/libressl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - generate: >- - -DOPENSSL_ROOT_DIR=/home/runner/libressl/build -DUSE_NGTCP2=ON - - - name: 'awslc' - install_steps: skipall - LDFLAGS: -Wl,-rpath,/home/runner/awslc/build/lib - PKG_CONFIG_PATH: /home/runner/awslc/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - # Intentionally using bare '--with-ngtcp2' + 'PKG_CONFIG_PATH' to test this way of configuration, in addition to '--with-ngtcp2=' in other jobs. - configure: >- - --with-openssl=/home/runner/awslc/build --with-ngtcp2 --enable-ssls-export - - - name: 'awslc' - tflags: '--min=1790' - PKG_CONFIG_PATH: /home/runner/awslc/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - generate: >- - -DOPENSSL_ROOT_DIR=/home/runner/awslc/build -DUSE_NGTCP2=ON -DBUILD_SHARED_LIBS=OFF - -DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON - - - name: 'boringssl' - install_steps: skipall - LDFLAGS: -Wl,-rpath,/home/runner/boringssl/build/lib - PKG_CONFIG_PATH: /home/runner/boringssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - configure: >- - --with-openssl=/home/runner/boringssl/build --with-ngtcp2=/home/runner/ngtcp2-boringssl/build --enable-ssls-export - - - name: 'boringssl' - tflags: '--min=1790' - PKG_CONFIG_PATH: "/home/runner/boringssl/build/lib/pkgconfig:\ - /home/runner/nghttp3/build/lib/pkgconfig:\ - /home/runner/ngtcp2-boringssl/build/lib/pkgconfig:\ - /home/runner/nghttp2/build/lib/pkgconfig" - generate: >- - -DOPENSSL_ROOT_DIR=/home/runner/boringssl/build -DUSE_NGTCP2=ON -DBUILD_SHARED_LIBS=OFF - -DCMAKE_UNITY_BUILD=ON - - - name: 'gnutls' - install_packages: libp11-kit-dev libssh-dev - install_steps: skipall - LDFLAGS: -Wl,-rpath,/home/runner/gnutls/build/lib -Wl,-rpath,/home/runner/nettle/build/lib64 -Wl,-rpath,/home/runner/ngtcp2/build/lib - PKG_CONFIG_PATH: /home/runner/nettle/build/lib64/pkgconfig:/home/runner/gnutls/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - configure: >- - --with-gnutls=/home/runner/gnutls/build --with-ngtcp2=/home/runner/ngtcp2/build --with-libssh --enable-ssls-export - - - name: 'gnutls' - install_packages: libp11-kit-dev libssh-dev - tflags: '--min=1840' - LDFLAGS: -Wl,-rpath,/home/runner/gnutls/build/lib - PKG_CONFIG_PATH: "/home/runner/nettle/build/lib64/pkgconfig:\ - /home/runner/gnutls/build/lib/pkgconfig:\ - /home/runner/nghttp3/build/lib/pkgconfig:\ - /home/runner/ngtcp2/build/lib/pkgconfig:\ - /home/runner/nghttp2/build/lib/pkgconfig" - generate: >- - -DCURL_USE_GNUTLS=ON -DUSE_NGTCP2=ON -DCURL_USE_LIBSSH=ON - -DCMAKE_UNITY_BUILD=ON - - - name: 'wolfssl' - install_packages: libssh2-1-dev - install_steps: skipall - LDFLAGS: -Wl,-rpath,/home/runner/wolfssl/build/lib - PKG_CONFIG_PATH: /home/runner/wolfssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - configure: >- - --with-wolfssl=/home/runner/wolfssl/build --with-ngtcp2=/home/runner/ngtcp2/build --enable-ech --with-libssh2 --enable-ssls-export - --enable-unity - - - name: 'wolfssl' - install_packages: libssh2-1-dev - tflags: '--min=1840' - PKG_CONFIG_PATH: /home/runner/wolfssl/build/lib/pkgconfig:/home/runner/nghttp3/build/lib/pkgconfig:/home/runner/ngtcp2/build/lib/pkgconfig:/home/runner/nghttp2/build/lib/pkgconfig - generate: >- - -DCURL_USE_WOLFSSL=ON -DUSE_NGTCP2=ON - -DUSE_ECH=ON - - - name: 'quiche' - install_steps: skipall - LDFLAGS: -Wl,-rpath,/home/runner/quiche/target/release - PKG_CONFIG_PATH: /home/runner/nghttp2/build/lib/pkgconfig - configure: >- - --with-openssl=/home/runner/quiche/quiche/deps/boringssl/src - --with-quiche=/home/runner/quiche/target/release - --with-ca-fallback - --enable-unity - - - name: 'quiche' - tflags: '--min=1790' - PKG_CONFIG_PATH: /home/runner/nghttp2/build/lib/pkgconfig:/home/runner/quiche/target/release - generate: >- - -DOPENSSL_ROOT_DIR=/home/runner/quiche/quiche/deps/boringssl/src - -DUSE_QUICHE=ON - -DCURL_CA_FALLBACK=ON - - steps: - - name: 'install prereqs' - env: - INSTALL_PACKAGES: >- - ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && 'stunnel4 ' || '' }} - ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && - 'apache2 apache2-dev libnghttp2-dev vsftpd dante-server libev-dev' || '' }} - - run: | - sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources} - sudo apt-get -o Dpkg::Use-Pty=0 update - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 45 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install \ - libtool autoconf automake pkgconf \ - libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libidn2-0-dev libldap-dev libuv1-dev valgrind \ - ${INSTALL_PACKAGES} \ - ${MATRIX_INSTALL_PACKAGES} - echo 'CC=gcc-12' >> "$GITHUB_ENV" - echo 'CXX=g++-12' >> "$GITHUB_ENV" - - - name: 'cache openssl' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-openssl-http3-no-deprecated - env: - cache-name: cache-openssl-http3-no-deprecated - with: - path: ~/openssl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL_VERSION }} - fail-on-cache-miss: true - - - name: 'cache openssl4' - if: ${{ contains(matrix.build.name, 'openssl4') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-openssl4-http3-no-deprecated - env: - cache-name: cache-openssl4-http3-no-deprecated - with: - path: ~/openssl4/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.OPENSSL4_VERSION }} - fail-on-cache-miss: true - - - name: 'cache libressl' - if: ${{ contains(matrix.build.name, 'libressl') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-libressl - env: - cache-name: cache-libressl - with: - path: ~/libressl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }} - fail-on-cache-miss: true - - - name: 'cache awslc' - if: ${{ contains(matrix.build.name, 'awslc') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-awslc - env: - cache-name: cache-awslc - with: - path: ~/awslc/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.AWSLC_VERSION }} - fail-on-cache-miss: true - - - name: 'cache boringssl' - if: ${{ contains(matrix.build.name, 'boringssl') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-boringssl - env: - cache-name: cache-boringssl - with: - path: ~/boringssl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.BORINGSSL_VERSION }} - fail-on-cache-miss: true - - - name: 'cache nettle' - if: ${{ contains(matrix.build.name, 'gnutls') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-nettle - env: - cache-name: cache-nettle - with: - path: ~/nettle/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NETTLE_VERSION }} - fail-on-cache-miss: true - - - name: 'cache gnutls' - if: ${{ contains(matrix.build.name, 'gnutls') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-gnutls - env: - cache-name: cache-gnutls - with: - path: ~/gnutls/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.GNUTLS_VERSION }}-${{ env.NETTLE_VERSION }} - fail-on-cache-miss: true - - - name: 'cache wolfssl' - if: ${{ contains(matrix.build.name, 'wolfssl') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-wolfssl - env: - cache-name: cache-wolfssl - with: - path: ~/wolfssl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }} - fail-on-cache-miss: true - - - name: 'cache nghttp3' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-nghttp3 - env: - cache-name: cache-nghttp3 - with: - path: ~/nghttp3/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP3_VERSION }} - fail-on-cache-miss: true - - - name: 'cache ngtcp2' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-ngtcp2 - env: - cache-name: cache-ngtcp2 - with: - path: ~/ngtcp2/build - key: "${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL_VERSION }}-\ - ${{ env.LIBRESSL_VERSION }}-${{ env.AWSLC_VERSION }}-${{ env.NETTLE_VERSION }}-${{ env.GNUTLS_VERSION }}-${{ env.WOLFSSL_VERSION }}" - fail-on-cache-miss: true - - - name: 'cache ngtcp2 openssl4' - if: ${{ contains(matrix.build.name, 'openssl4') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-ngtcp2-openssl4 - env: - cache-name: cache-ngtcp2-openssl4 - with: - path: ~/ngtcp2-openssl4/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.OPENSSL4_VERSION }} - fail-on-cache-miss: true - - - name: 'cache ngtcp2 boringssl' - if: ${{ contains(matrix.build.name, 'boringssl') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-ngtcp2-boringssl - env: - cache-name: cache-ngtcp2-boringssl - with: - path: ~/ngtcp2-boringssl/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGTCP2_VERSION }}-${{ env.BORINGSSL_VERSION }} - fail-on-cache-miss: true - - - name: 'cache nghttp2' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-nghttp2 - env: - cache-name: cache-nghttp2 - with: - path: ~/nghttp2/build - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.NGHTTP2_VERSION }}-${{ env.OPENSSL_VERSION }}-${{ env.NGTCP2_VERSION }}-${{ env.NGHTTP3_VERSION }} - fail-on-cache-miss: true - - - name: 'cache quiche' - if: ${{ contains(matrix.build.name, 'quiche') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-quiche - env: - cache-name: cache-quiche - with: - path: ~/quiche - key: ${{ runner.os }}-http3-build-${{ env.cache-name }}-${{ env.QUICHE_VERSION }} - - - name: 'build quiche and boringssl' - if: ${{ contains(matrix.build.name, 'quiche') && steps.cache-quiche.outputs.cache-hit != 'true' }} - run: | - cd ~ - git clone --quiet --depth 1 -b "${QUICHE_VERSION}" --recursive https://github.com/cloudflare/quiche - cd quiche - #### Work-around https://github.com/curl/curl/issues/7927 ####### - #### See https://github.com/alexcrichton/cmake-rs/issues/131 #### - sed -i -e 's/cmake = "0.1"/cmake = "=0.1.45"/' quiche/Cargo.toml - - cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose - ln -s libquiche.so target/release/libquiche.so.0 - mkdir -v quiche/deps/boringssl/src/lib - find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf -- '{}' quiche/deps/boringssl/src/lib \; - - # include dir - # /home/runner/quiche/quiche/deps/boringssl/src/include - # lib dir - # /home/runner/quiche/quiche/deps/boringssl/src/lib - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build.configure }} - run: autoreconf -fi - - - name: 'configure' - env: - LDFLAGS: '${{ matrix.build.LDFLAGS }}' - MATRIX_CONFIGURE: '${{ matrix.build.configure }}' - MATRIX_GENERATE: '${{ matrix.build.generate }}' - MATRIX_PKG_CONFIG_PATH: '${{ matrix.build.PKG_CONFIG_PATH }}' - run: | - [ -n "${MATRIX_PKG_CONFIG_PATH}" ] && export PKG_CONFIG_PATH="${MATRIX_PKG_CONFIG_PATH}" - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - [[ "${MATRIX_GENERATE}" = *'boringssl'* ]] && options=" -DBORINGSSL_VERSION=${BORINGSSL_VERSION}" - cmake -B bld -G Ninja \ - -DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \ - -DCURL_WERROR=ON -DENABLE_DEBUG=ON \ - -DCURL_USE_LIBUV=ON -DCURL_ENABLE_NTLM=ON \ - -DTEST_NGHTTPX=/home/runner/nghttp2/build/bin/nghttpx \ - -DHTTPD_NGHTTPX=/home/runner/nghttp2/build/bin/nghttpx \ - ${MATRIX_GENERATE} ${options} - else - [[ "${MATRIX_CONFIGURE}" = *'boringssl'* ]] && export CPPFLAGS="-DCURL_BORINGSSL_VERSION=\\\"${BORINGSSL_VERSION}\\\"" - mkdir bld && cd bld && ../configure --enable-warnings --enable-werror --enable-debug --disable-static \ - --disable-dependency-tracking --enable-option-checking=fatal \ - --with-libuv --enable-ntlm \ - --with-test-nghttpx=/home/runner/nghttp2/build/bin/nghttpx \ - ${MATRIX_CONFIGURE} - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'test configs' - run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true - - - name: 'build' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose - else - make -C bld V=1 - fi - - - name: 'curl -V' - run: | - find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 file -- - find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- - bld/src/curl --disable -V - - - name: 'build tests' - if: ${{ !contains(matrix.build.install_steps, 'skipall') }} - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target testdeps - else - make -C bld V=1 -C tests - fi - - - name: 'install test prereqs' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }} - run: | - python3 -m venv ~/venv - if bld/src/curl --disable -V 2>/dev/null | grep smb; then - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt - fi - - - name: 'run tests' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }} - env: - TFLAGS: '${{ matrix.build.tflags }}' - run: | - TFLAGS+=' -n' - source ~/venv/bin/activate - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target test-ci - else - make -C bld V=1 test-ci - fi - - - name: 'run tests (valgrind)' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }} - run: | - export TFLAGS='-j6 --min=4 HTTP/3' - source ~/venv/bin/activate - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target test-ci - else - make -C bld V=1 test-ci - fi - - - name: 'install pytest prereqs' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }} - run: | - [ -d ~/venv ] || python3 -m venv ~/venv - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/http/requirements.txt - - - name: 'run pytest (event based)' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }} - env: - CURL_TEST_EVENT: 1 - PYTEST_ADDOPTS: '--color=yes' - PYTEST_XDIST_AUTO_NUM_WORKERS: 4 - run: | - source ~/venv/bin/activate - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target curl-pytest-ci - else - make -C bld V=1 pytest-ci - fi diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml deleted file mode 100644 index 7e0ae094ee..0000000000 --- a/.github/workflows/label.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) Daniel Fandrich, , et al. -# -# SPDX-License-Identifier: curl - -# This workflow will triage pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler - -name: 'Labeler' - -'on': [pull_request_target] # zizmor: ignore[dangerous-triggers] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -jobs: - label: - name: 'Labeler' - runs-on: ubuntu-slim - permissions: - contents: read # To comply with https://github.com/actions/labeler documentation - pull-requests: write # To edit labels on PRs - - steps: - - uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1 - with: - repo-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/linux-old.yml b/.github/workflows/linux-old.yml index c96da5c7f0..b64557b008 100644 --- a/.github/workflows/linux-old.yml +++ b/.github/workflows/linux-old.yml @@ -58,6 +58,11 @@ jobs: container: 'debian:stretch' steps: + - uses: actions/cache@v4 + id: cache + with: + path: ~/packagecache + - name: 'install prereqs' # Remember, this shell is dash, not bash run: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index 11cff3e174..0000000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,971 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'Linux' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - pull_request: - branches: - - master - paths-ignore: - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -env: - MAKEFLAGS: -j 5 - CURL_CI: github - CURL_TEST_MIN: 1600 - # renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com - LIBRESSL_VERSION: 4.2.1 - # renovate: datasource=github-tags depName=wolfSSL/wolfssl versioning=semver extractVersion=^v?(?.+)-stable$ registryUrl=https://github.com - WOLFSSL_VERSION: 5.9.0 - # renovate: datasource=github-tags depName=Mbed-TLS/mbedtls versioning=semver registryUrl=https://github.com - MBEDTLS_VERSION: 4.0.0 - # renovate: datasource=github-tags depName=Mbed-TLS/mbedtls versioning=semver:^3.0.0 registryUrl=https://github.com - MBEDTLS_VERSION_PREV: 3.6.5 - MBEDTLS_SHA256_PREV: 4a11f1777bb95bf4ad96721cac945a26e04bf19f57d905f241fe77ebeddf46d8 - # renovate: datasource=github-tags depName=awslabs/aws-lc versioning=semver registryUrl=https://github.com - AWSLC_VERSION: 1.69.0 - # renovate: datasource=github-tags depName=google/boringssl versioning=semver registryUrl=https://github.com - BORINGSSL_VERSION: 0.20260327.0 - # handled in renovate.json - OPENSSL_VERSION: 3.6.2 - # renovate: datasource=github-tags depName=rustls/rustls-ffi versioning=semver registryUrl=https://github.com - RUSTLS_VERSION: 0.15.1 - # handled in renovate.json - OPENLDAP_VERSION: 2.6.10 - # renovate: datasource=github-tags depName=nghttp2/nghttp2 versioning=semver registryUrl=https://github.com - NGHTTP2_VERSION: 1.68.1 - # renovate: datasource=github-releases depName=pizlonator/fil-c versioning=semver-coerced registryUrl=https://github.com - FIL_C_VERSION: 0.678 - -jobs: - linux: - name: ${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.name }} - runs-on: ${{ matrix.build.image || 'ubuntu-latest' }} - container: ${{ matrix.build.container }} - timeout-minutes: 15 - env: - MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }} - MATRIX_INSTALL_PACKAGES: '${{ matrix.build.install_packages }}' - MATRIX_INSTALL_STEPS: '${{ matrix.build.install_steps }}' - strategy: - fail-fast: false - matrix: - build: - - name: 'libressl krb5' - image: ubuntu-24.04-arm - install_packages: libidn2-dev libnghttp2-dev libldap-dev libkrb5-dev - install_steps: libressl-c-arm pytest codeset-test - LDFLAGS: -Wl,-rpath,/home/runner/libressl/lib - configure: --with-openssl=/home/runner/libressl --with-gssapi --enable-debug - - - name: 'libressl krb5 valgrind 1' - image: ubuntu-24.04-arm - install_packages: libnghttp2-dev libldap-dev libkrb5-dev valgrind - install_steps: libressl-c-arm - tflags: '--min=870 1 to 950' - generate: -DOPENSSL_ROOT_DIR=/home/runner/libressl -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON -DCURL_ENABLE_NTLM=ON - - - name: 'libressl krb5 valgrind 2' - image: ubuntu-24.04-arm - install_packages: libnghttp2-dev libldap-dev libkrb5-dev valgrind - install_steps: libressl-c-arm - tflags: '--min=900 951 to 9999' - generate: -DOPENSSL_ROOT_DIR=/home/runner/libressl -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON -DCURL_ENABLE_NTLM=ON - - - name: 'libressl clang' - image: ubuntu-24.04-arm - install_packages: clang - install_steps: libressl-c-arm - CC: clang - LDFLAGS: -Wl,-rpath,/home/runner/libressl/lib - configure: --with-openssl=/home/runner/libressl --enable-debug - - - name: 'wolfssl-all' - image: ubuntu-24.04-arm - install_steps: wolfssl-all-arm - LDFLAGS: -Wl,-rpath,/home/runner/wolfssl-all/lib - configure: --with-wolfssl=/home/runner/wolfssl-all --enable-ech --enable-debug - - - name: 'wolfssl-opensslextra valgrind 1' - image: ubuntu-24.04-arm - install_packages: valgrind - install_steps: wolfssl-opensslextra-arm - tflags: '--min=780 1 to 950' - LDFLAGS: -Wl,-rpath,/home/runner/wolfssl-opensslextra/lib - configure: --with-wolfssl=/home/runner/wolfssl-opensslextra --enable-ech --enable-debug - - - name: 'wolfssl-opensslextra valgrind 2' - image: ubuntu-24.04-arm - install_packages: valgrind - install_steps: wolfssl-opensslextra-arm - tflags: '--min=800 951 to 9999' - LDFLAGS: -Wl,-rpath,/home/runner/wolfssl-opensslextra/lib - configure: --with-wolfssl=/home/runner/wolfssl-opensslextra --enable-ech --enable-debug - - - name: 'mbedtls gss valgrind 1' - image: ubuntu-24.04-arm - install_packages: libnghttp2-dev libidn2-dev libldap-dev libgss-dev valgrind - install_steps: mbedtls-latest-arm - tflags: '--min=830 1 to 950' - LDFLAGS: -Wl,-rpath,/home/runner/mbedtls/lib - PKG_CONFIG_PATH: /home/runner/mbedtls/lib/pkgconfig - generate: -DCURL_USE_MBEDTLS=ON -DENABLE_DEBUG=ON -DCURL_USE_GSSAPI=ON -DCURL_DROP_UNUSED=ON - - - name: 'mbedtls gss valgrind 2' - image: ubuntu-24.04-arm - install_packages: libnghttp2-dev libidn2-dev libldap-dev libgss-dev valgrind - install_steps: mbedtls-latest-arm - tflags: '--min=800 951 to 9999' - LDFLAGS: -Wl,-rpath,/home/runner/mbedtls/lib - PKG_CONFIG_PATH: /home/runner/mbedtls/lib/pkgconfig - generate: -DCURL_USE_MBEDTLS=ON -DENABLE_DEBUG=ON -DCURL_USE_GSSAPI=ON - - - name: 'mbedtls clang' - install_packages: libssh-dev libnghttp2-dev libldap-dev clang - install_steps: mbedtls-latest-intel pytest - CC: clang - LDFLAGS: -Wl,-rpath,/home/runner/mbedtls/lib - configure: --with-mbedtls=/home/runner/mbedtls --with-libssh --enable-debug --with-fish-functions-dir --with-zsh-functions-dir - - - name: 'mbedtls-prev' - install_packages: libssh2-1-dev libnghttp2-dev libuv1-dev - install_steps: mbedtls-prev pytest - PKG_CONFIG_PATH: /home/runner/mbedtls-prev/lib/pkgconfig # Requires v3.6.0 - generate: -DCURL_USE_MBEDTLS=ON -DCURL_USE_LIBUV=ON -DENABLE_DEBUG=ON - - - name: 'mbedtls-pkg MultiSSL !pc' - install_packages: libnghttp2-dev libmbedtls-dev - install_steps: mbedtls-latest-intel skipall - generate: >- - -DCURL_USE_MBEDTLS=ON -DENABLE_DEBUG=ON -DCURL_DEFAULT_SSL_BACKEND=mbedtls - -DMBEDTLS_INCLUDE_DIR=/home/runner/mbedtls/include - -DMBEDTLS_LIBRARY=/home/runner/mbedtls/lib/libmbedtls.a - -DMBEDX509_LIBRARY=/home/runner/mbedtls/lib/libmbedx509.a - -DMBEDCRYPTO_LIBRARY=/home/runner/mbedtls/lib/libmbedcrypto.a - -DCURL_USE_PKGCONFIG=OFF -DCURL_USE_OPENSSL=ON - -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF - -DCURL_COMPLETION_FISH=ON -DCURL_COMPLETION_ZSH=ON - - - name: 'awslc' - install_steps: awslc pytest - LDFLAGS: -Wl,-rpath,/home/runner/awslc/lib - configure: --with-openssl=/home/runner/awslc --enable-ech --enable-ntlm - - - name: 'awslc' - install_packages: libidn2-dev - install_steps: awslc - generate: -DOPENSSL_ROOT_DIR=/home/runner/awslc -DUSE_ECH=ON -DCMAKE_UNITY_BUILD=OFF -DCURL_DROP_UNUSED=ON -DCURL_PATCHSTAMP=test-patch -DCURL_ENABLE_NTLM=ON - - - name: 'boringssl' - install_steps: boringssl pytest - generate: -DOPENSSL_ROOT_DIR=/home/runner/boringssl -DUSE_ECH=ON -DCURL_ENABLE_NTLM=ON - - - name: 'openssl default' - install_steps: pytest - configure: --with-openssl --enable-debug --disable-unity - - - name: 'openssl libssh2 sync-resolver valgrind 1 +analyzer' - image: ubuntu-24.04-arm - install_packages: libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev valgrind - tflags: '--min=920 1 to 950' - generate: -DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF -DCURL_GCC_ANALYZER=ON -DCURL_ENABLE_NTLM=ON - - - name: 'openssl libssh2 sync-resolver valgrind 2' - image: ubuntu-24.04-arm - install_packages: libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev valgrind - tflags: '--min=910 951 to 9999' - generate: -DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF -DCURL_ENABLE_NTLM=ON - - - name: 'openssl intel C89' - install_packages: libssh-dev - install_steps: pytest - configure: CFLAGS=-std=gnu89 --with-openssl --with-libssh --enable-debug - - - name: 'openssl arm C89' - image: ubuntu-24.04-arm - install_packages: libssh2-1-dev - install_steps: pytest - configure: CFLAGS=-std=gnu89 --with-openssl --with-libssh2 --enable-debug --disable-verbose - - - name: 'openssl -O3 libssh valgrind 1' - install_packages: libssh-dev valgrind - CFLAGS: -O3 - tflags: '--min=920 1 to 950' - generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=50 -DCURL_ENABLE_NTLM=ON - - - name: 'openssl -O3 libssh valgrind 2' - install_packages: libssh-dev valgrind - CFLAGS: -O3 - tflags: '--min=890 951 to 9999' - generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=50 -DCURL_ENABLE_NTLM=ON - - - name: 'openssl clang krb5 openldap static' - install_steps: openldap-static - install_packages: libidn2-dev libkrb5-dev clang libssl-dev - CC: clang - configure: >- - --enable-static --disable-shared --with-openssl --with-gssapi --enable-debug --disable-docs - --disable-manual --with-ldap=/home/runner/openldap-static --with-ldap-lib=ldap --with-lber-lib=lber - - - name: 'openssl clang krb5 LTO' - image: ubuntu-24.04-arm - install_packages: libssh2-1-dev libkrb5-dev clang - install_steps: skiprun pytest - CC: clang - generate: -DCURL_USE_OPENSSL=ON -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LTO=ON - - - name: 'openssl !ipv6 !--libcurl !--digest-auth' - image: ubuntu-24.04-arm - configure: --with-openssl --disable-ipv6 --enable-debug --disable-unity --disable-libcurl-option --disable-digest-auth --enable-ntlm - - - name: 'curl_global_init_mem debug valgrind' - image: ubuntu-24.04-arm - install_packages: valgrind - tflags: '--min=1150' - configure: >- - --enable-init-mem-debug - --with-openssl --disable-debug --enable-unity - --enable-ntlm - - - name: 'openssl https-only' - image: ubuntu-24.04-arm - tflags: '--min=1150' - configure: >- - --with-openssl --enable-debug --disable-unity - --disable-dict --disable-gopher --disable-ldap --disable-telnet - --disable-imap --disable-pop3 --disable-smtp - --disable-rtsp - --without-libssh2 --without-libssh - --disable-tftp --disable-ftp --disable-file --disable-smb - --enable-ntlm - - - name: 'openssl torture 1' - install_packages: libnghttp2-dev libssh2-1-dev libc-ares-dev - tflags: '-t --shallow=25 --min=920 1 to 950' - torture: true - generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON -DCURL_ENABLE_NTLM=ON - - - name: 'openssl torture 2' - install_packages: libnghttp2-dev libssh2-1-dev libc-ares-dev - tflags: '-t --shallow=25 --min=900 951 to 9999' - torture: true - generate: -DCURL_USE_OPENSSL=ON -DENABLE_DEBUG=ON -DENABLE_ARES=ON -DCURL_ENABLE_NTLM=ON - - - name: 'openssl i686' - install_packages: gcc-14-i686-linux-gnu libssl-dev:i386 libssh2-1-dev:i386 libidn2-dev:i386 libc-ares-dev:i386 zlib1g-dev:i386 - CC: i686-linux-gnu-gcc-14 - LDFLAGS: -L/usr/lib/i386-linux-gnu - PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig - configure: >- - CPPFLAGS=-I/usr/include/i386-linux-gnu - --host=i686-linux-gnu - --with-openssl --with-libssh2 --with-libidn2 --enable-ares --enable-debug - - - name: '!ssl !http !smtp !imap' - image: ubuntu-24.04-arm - tflags: '--min=475' - configure: --without-ssl --enable-debug --disable-http --disable-smtp --disable-imap --disable-unity - - - name: 'libressl Fil-C' - install_steps: filc libressl-filc nghttp2-filc pytest - tflags: '!776' # adds 1-9 minutes to the test run step, and fails consistently - CC: /home/runner/filc/build/bin/filcc - PKG_CONFIG_PATH: /home/runner/nghttp2/lib/pkgconfig - generate: >- - -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_UNITY_BUILD=OFF -DCURL_DISABLE_TYPECHECK=ON - -DOPENSSL_ROOT_DIR=/home/runner/libressl -DCURL_USE_LIBPSL=OFF - -DCURL_ZLIB=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF - -DCURL_DISABLE_LDAP=ON -DUSE_LIBIDN2=OFF -DCURL_USE_LIBSSH2=OFF - -DCURL_ENABLE_NTLM=ON - - - name: 'clang-tidy' - install_packages: clang-20 clang-tidy-20 libssl-dev libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev libkrb5-dev libgnutls28-dev - install_steps: skiprun mbedtls-latest-intel rustls wolfssl-opensslextra-intel - install_steps_brew: gsasl - CC: clang-20 - LDFLAGS: >- - -Wl,-rpath,/home/runner/wolfssl-opensslextra/lib - -Wl,-rpath,/home/runner/mbedtls/lib - -Wl,-rpath,/home/runner/rustls/lib - -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/gsasl/lib - - PKG_CONFIG_PATH: "/home/runner/wolfssl-opensslextra/lib/pkgconfig:\ - /home/runner/mbedtls/lib/pkgconfig:\ - /home/runner/rustls/lib/pkgconfig:\ - /home/linuxbrew/.linuxbrew/opt/gsasl/lib/pkgconfig" - generate: >- - -DCURL_USE_OPENSSL=ON -DCURL_USE_WOLFSSL=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON - -DCURL_USE_GSASL=ON - -DUSE_ECH=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON - -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/usr/bin/clang-tidy-20 - - - name: 'clang-tidy H3 c-ares !examples' - install_packages: clang-20 clang-tidy-20 libidn2-dev libssh-dev libnghttp2-dev - install_steps: skiprun - install_steps_brew: openssl libngtcp2 libnghttp3 c-ares - CC: clang-20 - LDFLAGS: >- - -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/openssl/lib - -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib - -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/libnghttp3/lib - -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/c-ares/lib - - PKG_CONFIG_PATH: "/home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:\ - /home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:\ - /home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig" - generate: >- - -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/home/linuxbrew/.linuxbrew/opt/openssl -DUSE_NGTCP2=ON - -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_HTTPSRR=ON -DENABLE_ARES=ON - -DCURL_DISABLE_VERBOSE_STRINGS=ON - -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/usr/bin/clang-tidy-20 - - - name: 'address-sanitizer' - install_packages: clang-20 libssl-dev libssh-dev libidn2-dev libnghttp2-dev libubsan1 libasan8 libtsan2 - install_steps: pytest randcurl - CC: clang-20 - CFLAGS: -fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g - LDFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=undefined,integer -ldl -lubsan - generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH=ON - - - name: 'address-sanitizer H3 c-ares' - install_packages: clang-20 libubsan1 libasan8 libtsan2 - install_steps: pytest - install_steps_brew: openssl libssh2 libngtcp2 libnghttp3 c-ares - CC: clang-20 - CFLAGS: -fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g - LDFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=undefined,integer -ldl -lubsan -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/c-ares/lib - PKG_CONFIG_PATH: "/home/linuxbrew/.linuxbrew/opt/libssh2/lib/pkgconfig:\ - /home/linuxbrew/.linuxbrew/opt/libngtcp2/lib/pkgconfig:\ - /home/linuxbrew/.linuxbrew/opt/libnghttp3/lib/pkgconfig:\ - /home/linuxbrew/.linuxbrew/opt/c-ares/lib/pkgconfig" - generate: -DENABLE_DEBUG=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/home/linuxbrew/.linuxbrew/opt/openssl -DUSE_NGTCP2=ON -DUSE_SSLS_EXPORT=ON -DENABLE_ARES=ON - - - name: 'thread-sanitizer' - install_packages: clang-20 libtsan2 - install_steps: pytest openssl-tsan - CC: clang-20 - CFLAGS: -fsanitize=thread -g - LDFLAGS: -fsanitize=thread - generate: -DOPENSSL_ROOT_DIR=/home/runner/openssl -DENABLE_DEBUG=ON - - - name: 'memory-sanitizer' - install_packages: clang-20 - install_steps: randcurl - CC: clang-20 - CFLAGS: -fsanitize=memory -Wformat -Werror=format-security -Werror=array-bounds -g - LDFLAGS: -fsanitize=memory - LIBS: -ldl - configure: --without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug - tflags: '--min=1480' - - - name: 'event-based' - install_packages: libssh-dev - configure: --enable-debug --enable-static --disable-shared --disable-threaded-resolver --with-libssh --with-openssl --enable-ntlm - tflags: '-n --test-event --min=1350' - - - name: 'duphandle' - image: ubuntu-24.04-arm - install_packages: libssh-dev - configure: --enable-debug --enable-static --disable-shared --disable-threaded-resolver --with-libssh --with-openssl - tflags: '-n --test-duphandle' - - - name: 'rustls valgrind 1' - install_packages: libnghttp2-dev libldap-dev valgrind - install_steps: rust rustls - tflags: '--min=780 1 to 950' - generate: -DCURL_USE_RUSTLS=ON -DUSE_ECH=ON -DENABLE_DEBUG=ON - - - name: 'rustls valgrind 2' - install_packages: libnghttp2-dev libldap-dev valgrind - install_steps: rust rustls - tflags: '--min=820 951 to 9999' - generate: -DCURL_USE_RUSTLS=ON -DUSE_ECH=ON -DENABLE_DEBUG=ON - - - name: 'rustls' - install_packages: libnghttp2-dev libldap-dev - install_steps: rust rustls skiprun pytest - configure: --with-rustls --enable-ech --enable-debug - - - name: 'IntelC openssl' - install_packages: libssl-dev - install_steps: intelc - CC: icc - configure: --enable-debug --with-openssl - - - name: 'Slackware !ssl gssapi gcc' - # Flags used to build the curl Slackware package, except OpenSSL 1.1.0: - # https://ftpmirror.infania.net/slackware/slackware64-current/source/n/curl/curl.SlackBuild - configure: --enable-debug --without-ssl --with-libssh2 --with-gssapi --enable-ares --without-ca-bundle --with-ca-path=/etc/ssl/certs - # Docker Hub image that `container-job` executes in - container: 'andy5995/slackware-build-essential:15.0' - - - name: 'Alpine MUSL https-rr' - configure: --enable-debug --with-ssl --with-libssh2 --with-libidn2 --with-gssapi --enable-ldap --with-libpsl --enable-httpsrr --enable-ares --enable-threaded-resolver - container: 'alpine:3.20' - - - name: 'Alpine MUSL https-rr c-ares' - configure: --enable-debug --with-ssl --with-libssh2 --with-libidn2 --with-gssapi --enable-ldap --with-libpsl --enable-httpsrr --enable-ares --disable-threaded-resolver - container: 'alpine:3.20' - - steps: - - name: 'install prereqs' - if: ${{ matrix.build.container == null && !contains(matrix.build.name, 'i686') }} - env: - INSTALL_PACKAGES_BREW: '${{ matrix.build.install_steps_brew }}' - INSTALL_PACKAGES: >- - ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && 'stunnel4' || '' }} - ${{ contains(matrix.build.install_steps, 'pytest') && 'apache2 apache2-dev libnghttp2-dev vsftpd dante-server' || '' }} - - run: | - sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources} - sudo apt-get -o Dpkg::Use-Pty=0 update - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 45 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install \ - libtool autoconf automake pkgconf \ - libpsl-dev zlib1g-dev libbrotli-dev libzstd-dev \ - ${INSTALL_PACKAGES} \ - ${MATRIX_INSTALL_PACKAGES} - if [ -n "${INSTALL_PACKAGES_BREW}" ]; then - HOMEBREW_NO_AUTO_UPDATE=1 /home/linuxbrew/.linuxbrew/bin/brew install ${INSTALL_PACKAGES_BREW} - fi - # Workaround for ubuntu-24.04-arm images having 0777 for /home/runner, - # which breaks the test sshd server used in pytest. - if [[ "$(uname -m)" = *'aarch64'* ]]; then - ls -l /home - chmod 0755 /home/runner - fi - - - name: 'install prereqs (i686)' - if: ${{ contains(matrix.build.name, 'i686') }} - run: | - sudo rm -f /etc/apt/sources.list.d/{azure-cli.sources,microsoft-prod.list,ondrej-ubuntu-php-noble.sources} - sudo dpkg --add-architecture i386 - sudo apt-get -o Dpkg::Use-Pty=0 update - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 45 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install \ - libtool autoconf automake pkgconf stunnel4 \ - libpsl-dev:i386 libbrotli-dev:i386 libzstd-dev:i386 \ - ${MATRIX_INSTALL_PACKAGES} - - - name: 'install prereqs (alpine)' - if: ${{ startsWith(matrix.build.container, 'alpine') }} - run: | - apk add --no-cache build-base autoconf automake libtool perl openssl-dev \ - libssh2-dev zlib-dev brotli-dev zstd-dev libidn2-dev openldap-dev \ - krb5-dev libpsl-dev c-ares-dev \ - py3-impacket py3-asn1 py3-six py3-pycryptodomex \ - perl-time-hires openssh stunnel sudo git openssl - - - name: 'install Fil-C' - if: ${{ contains(matrix.build.install_steps, 'filc') }} - run: | - cd /home/runner - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/pizlonator/fil-c/releases/download/v${FIL_C_VERSION}/filc-${FIL_C_VERSION}-linux-x86_64.tar.xz" --output pkg.bin - sha256sum pkg.bin && tar -xJf pkg.bin && rm -f pkg.bin && mv "filc-${FIL_C_VERSION}-linux-x86_64" filc - cd filc - ./setup.sh - - - name: 'cache libressl (c-arm)' - if: ${{ contains(matrix.build.install_steps, 'libressl-c-arm') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-libressl-c-arm - env: - cache-name: cache-libressl-c-arm - with: - path: ~/libressl - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }} - - - name: 'build libressl (c-arm)' - if: ${{ contains(matrix.build.install_steps, 'libressl-c-arm') && steps.cache-libressl-c-arm.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "libressl-${LIBRESSL_VERSION}" - cmake -B . -G Ninja -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/libressl -DCURL_ENABLE_NTLM=ON - cmake --build . - cmake --install . - - - name: 'cache libressl (filc)' - if: ${{ contains(matrix.build.install_steps, 'libressl-filc') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-libressl-filc - env: - cache-name: cache-libressl-filc - with: - path: ~/libressl - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }}-${{ env.FIL_C_VERSION }} - - - name: 'build libressl (filc)' - if: ${{ contains(matrix.build.install_steps, 'libressl-filc') && steps.cache-libressl-filc.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "libressl-${LIBRESSL_VERSION}" - cmake -B . -G Ninja -DLIBRESSL_APPS=OFF -DLIBRESSL_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/libressl \ - -DCMAKE_C_COMPILER=/home/runner/filc/build/bin/filcc -DENABLE_ASM=OFF - cmake --build . - cmake --install . - - - name: 'cache nghttp2 (filc)' - if: ${{ contains(matrix.build.install_steps, 'nghttp2-filc') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-nghttp2-filc - env: - cache-name: cache-nghttp2-filc - with: - path: ~/nghttp2 - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.NGHTTP2_VERSION }}-${{ env.FIL_C_VERSION }} - - - name: 'build nghttp2 (filc)' - if: ${{ contains(matrix.build.install_steps, 'nghttp2-filc') && steps.cache-nghttp2-filc.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/nghttp2/nghttp2/releases/download/v${NGHTTP2_VERSION}/nghttp2-${NGHTTP2_VERSION}.tar.xz" --output pkg.bin - sha256sum pkg.bin && tar -xJf pkg.bin && rm -f pkg.bin - cd "nghttp2-${NGHTTP2_VERSION}" - cmake -B . -G Ninja -DENABLE_LIB_ONLY=ON -DBUILD_TESTING=OFF -DENABLE_DOC=OFF -DCMAKE_INSTALL_PREFIX=/home/runner/nghttp2 \ - -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_C_COMPILER=/home/runner/filc/build/bin/filcc - cmake --build . - cmake --install . - - - name: 'cache wolfssl (all-arm)' - if: ${{ contains(matrix.build.install_steps, 'wolfssl-all-arm') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-wolfssl-all-arm - env: - cache-name: cache-wolfssl-all-arm - with: - path: ~/wolfssl-all - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }} - - - name: 'build wolfssl (all-arm)' # does not support `OPENSSL_COEXIST` - if: ${{ contains(matrix.build.install_steps, 'wolfssl-all-arm') && steps.cache-wolfssl-all-arm.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/wolfSSL/wolfssl/archive/v${WOLFSSL_VERSION}-stable.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "wolfssl-${WOLFSSL_VERSION}-stable" - ./autogen.sh - ./configure --disable-dependency-tracking --prefix=/home/runner/wolfssl-all --enable-tls13 --enable-harden --enable-all \ - --disable-benchmark --disable-crypttests --disable-examples - make install - - - name: 'cache wolfssl (opensslextra-intel)' # does support `OPENSSL_COEXIST` - if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra-intel') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-wolfssl-opensslextra-intel - env: - cache-name: cache-wolfssl-opensslextra-intel - with: - path: ~/wolfssl-opensslextra - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }} - - - name: 'build wolfssl (opensslextra-intel)' - if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra-intel') && steps.cache-wolfssl-opensslextra-intel.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/wolfSSL/wolfssl/archive/v${WOLFSSL_VERSION}-stable.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "wolfssl-${WOLFSSL_VERSION}-stable" - ./autogen.sh - ./configure --disable-dependency-tracking --prefix=/home/runner/wolfssl-opensslextra --enable-tls13 --enable-harden --enable-ech --enable-opensslextra \ - --disable-benchmark --disable-crypttests --disable-examples - make install - - - name: 'cache wolfssl (opensslextra-arm)' # does support `OPENSSL_COEXIST` - if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra-arm') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-wolfssl-opensslextra-arm - env: - cache-name: cache-wolfssl-opensslextra-arm - with: - path: ~/wolfssl-opensslextra - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.WOLFSSL_VERSION }} - - - name: 'build wolfssl (opensslextra-arm)' - if: ${{ contains(matrix.build.install_steps, 'wolfssl-opensslextra-arm') && steps.cache-wolfssl-opensslextra-arm.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/wolfSSL/wolfssl/archive/v${WOLFSSL_VERSION}-stable.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "wolfssl-${WOLFSSL_VERSION}-stable" - ./autogen.sh - ./configure --disable-dependency-tracking --prefix=/home/runner/wolfssl-opensslextra --enable-tls13 --enable-harden --enable-ech --enable-opensslextra \ - --disable-benchmark --disable-crypttests --disable-examples - make install - - - name: 'cache mbedtls (latest-intel)' - if: ${{ contains(matrix.build.install_steps, 'mbedtls-latest-intel') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-mbedtls-latest-intel - env: - cache-name: cache-mbedtls-latest-intel - with: - path: ~/mbedtls - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MBEDTLS_VERSION }} - - - name: 'build mbedtls (latest-intel)' - if: ${{ contains(matrix.build.install_steps, 'mbedtls-latest-intel') && steps.cache-mbedtls-latest-intel.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${MBEDTLS_VERSION}/mbedtls-${MBEDTLS_VERSION}.tar.bz2" --output pkg.bin - sha256sum pkg.bin && tar -xjf pkg.bin && rm -f pkg.bin - cd "mbedtls-${MBEDTLS_VERSION}" - ./scripts/config.py set MBEDTLS_THREADING_C - ./scripts/config.py set MBEDTLS_THREADING_PTHREAD - cmake -B . -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/home/runner/mbedtls \ - -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF - cmake --build . - cmake --install . - - - name: 'cache mbedtls (latest-arm)' - if: ${{ contains(matrix.build.install_steps, 'mbedtls-latest-arm') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-mbedtls-latest-arm - env: - cache-name: cache-mbedtls-latest-arm - with: - path: ~/mbedtls - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MBEDTLS_VERSION }} - - - name: 'build mbedtls (latest-arm)' - if: ${{ contains(matrix.build.install_steps, 'mbedtls-latest-arm') && steps.cache-mbedtls-latest-arm.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${MBEDTLS_VERSION}/mbedtls-${MBEDTLS_VERSION}.tar.bz2" --output pkg.bin - sha256sum pkg.bin && tar -xjf pkg.bin && rm -f pkg.bin - cd "mbedtls-${MBEDTLS_VERSION}" - ./scripts/config.py set MBEDTLS_THREADING_C - ./scripts/config.py set MBEDTLS_THREADING_PTHREAD - cmake -B . -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/home/runner/mbedtls \ - -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF - cmake --build . - cmake --install . - - - name: 'cache mbedtls (prev)' - if: ${{ contains(matrix.build.install_steps, 'mbedtls-prev') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-mbedtls-prev - env: - cache-name: cache-mbedtls-prev - with: - path: ~/mbedtls-prev - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.MBEDTLS_VERSION_PREV }} - - - name: 'build mbedtls (prev)' - if: ${{ contains(matrix.build.install_steps, 'mbedtls-prev') && steps.cache-mbedtls-prev.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-${MBEDTLS_VERSION_PREV}/mbedtls-${MBEDTLS_VERSION_PREV}.tar.bz2" --output pkg.bin - sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${MBEDTLS_SHA256_PREV}" && tar -xjf pkg.bin && rm -f pkg.bin - cd "mbedtls-${MBEDTLS_VERSION_PREV}" - ./scripts/config.py set MBEDTLS_THREADING_C - ./scripts/config.py set MBEDTLS_THREADING_PTHREAD - cmake -B . -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/home/runner/mbedtls-prev \ - -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF - cmake --build . - cmake --install . - - - name: 'cache openldap (static)' - if: ${{ contains(matrix.build.install_steps, 'openldap-static') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-openldap-static - env: - cache-name: cache-openldap-static - with: - path: ~/openldap-static - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.OPENLDAP_VERSION }} - - - name: 'build openldap (static)' - if: ${{ contains(matrix.build.install_steps, 'openldap-static') && steps.cache-openldap-static.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-${OPENLDAP_VERSION}.tgz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "openldap-${OPENLDAP_VERSION}" - autoreconf -fi - ./configure --prefix=/home/runner/openldap-static --enable-static --disable-shared --disable-slapd - make install - - - name: 'cache openssl (thread sanitizer)' - if: ${{ contains(matrix.build.install_steps, 'openssl-tsan') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-openssl-tsan - env: - cache-name: cache-openssl-tsan - with: - path: ~/openssl - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.OPENSSL_VERSION }} - - - name: 'build openssl (thread sanitizer)' - if: ${{ contains(matrix.build.install_steps, 'openssl-tsan') && steps.cache-openssl-tsan.outputs.cache-hit != 'true' }} - run: | - git clone --quiet --depth 1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl - cd openssl - CC=clang CFLAGS='-fsanitize=thread' LDFLAGS='-fsanitize=thread' ./config --prefix=/home/runner/openssl --libdir=lib no-makedepend no-apps no-docs no-tests - make - make -j1 install_sw - - - name: 'cache awslc' - if: ${{ contains(matrix.build.install_steps, 'awslc') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-awslc - env: - cache-name: cache-awslc - with: - path: ~/awslc - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.AWSLC_VERSION }} - - - name: 'build awslc' - if: ${{ contains(matrix.build.install_steps, 'awslc') && steps.cache-awslc.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/awslabs/aws-lc/archive/refs/tags/v${AWSLC_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "aws-lc-${AWSLC_VERSION}" - cmake -B . -G Ninja -DCMAKE_INSTALL_PREFIX=/home/runner/awslc -DBUILD_TOOL=OFF -DBUILD_TESTING=OFF - cmake --build . - cmake --install . - - - name: 'cache boringssl' - if: ${{ contains(matrix.build.install_steps, 'boringssl') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-boringssl - env: - cache-name: cache-boringssl - with: - path: ~/boringssl - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.BORINGSSL_VERSION }} - - - name: 'build boringssl' - if: ${{ contains(matrix.build.install_steps, 'boringssl') && steps.cache-boringssl.outputs.cache-hit != 'true' }} - run: | - mkdir boringssl-src - cd boringssl-src - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - "https://boringssl.googlesource.com/boringssl/+archive/${BORINGSSL_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cmake -B . -G Ninja -DCMAKE_INSTALL_PREFIX=/home/runner/boringssl -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON - cmake --build . - cmake --install . - - - name: 'cache rustls' - if: ${{ contains(matrix.build.install_steps, 'rustls') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-rustls - env: - cache-name: cache-rustls - with: - path: ~/rustls - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.RUSTLS_VERSION }} - - - name: 'fetch rustls deb' - if: ${{ contains(matrix.build.install_steps, 'rustls') && steps.cache-rustls.outputs.cache-hit != 'true' }} - run: | - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --location "https://github.com/rustls/rustls-ffi/releases/download/v${RUSTLS_VERSION}/librustls_${RUSTLS_VERSION}_amd64.deb.zip" --output pkg.bin - sha256sum pkg.bin && unzip pkg.bin -d rustls && rm -f pkg.bin - - - name: 'build rustls' - # Note: we do not check cache-hit here. If the cache is hit, we need to dpkg install the deb. - if: ${{ contains(matrix.build.install_steps, 'rustls') }} - run: sudo dpkg -i ~/rustls/"librustls_${RUSTLS_VERSION}_amd64.deb" - - - name: 'install Intel compilers' - if: ${{ contains(matrix.build.install_steps, 'intelc') }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 6 --retry-connrefused \ - --compressed https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \ - sudo tee /etc/apt/trusted.gpg.d/intel-sw.asc >/dev/null - sudo add-apt-repository 'deb https://apt.repos.intel.com/oneapi all main' - sudo apt-get -o Dpkg::Use-Pty=0 install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic - source /opt/intel/oneapi/setvars.sh - printenv >> "$GITHUB_ENV" - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build.configure }} - run: autoreconf -fi - - - name: 'configure' - env: - CC: '${{ matrix.build.CC }}' - CFLAGS: '${{ matrix.build.CFLAGS }}' - LDFLAGS: '${{ matrix.build.LDFLAGS }}' - LIBS: '${{ matrix.build.LIBS }}' - MATRIX_CONFIGURE: '${{ matrix.build.configure }}' - MATRIX_GENERATE: '${{ matrix.build.generate }}' - MATRIX_PKG_CONFIG_PATH: '${{ matrix.build.PKG_CONFIG_PATH }}' - run: | - [[ "${MATRIX_INSTALL_STEPS}" = *'awslc'* ]] && sudo apt-get -o Dpkg::Use-Pty=0 purge libssl-dev - [ -n "${MATRIX_PKG_CONFIG_PATH}" ] && export PKG_CONFIG_PATH="${MATRIX_PKG_CONFIG_PATH}" - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake -B bld -G Ninja \ - -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ - -DCMAKE_C_COMPILER_TARGET="$(uname -m)-pc-linux-gnu" -DBUILD_STATIC_LIBS=ON \ - -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON \ - ${MATRIX_GENERATE} - else - mkdir bld && cd bld && \ - ../configure --prefix="$HOME"/curl-install --enable-unity --enable-warnings --enable-werror --disable-static \ - --disable-dependency-tracking --enable-option-checking=fatal \ - ${MATRIX_CONFIGURE} - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'test configs' - run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true - - - name: 'build' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose - else - make -C bld V=1 - fi - - - name: 'single-use function check' - if: ${{ (contains(matrix.build.configure, '--disable-unity') || contains(matrix.build.generate, '-DCMAKE_UNITY_BUILD=OFF')) && !contains(matrix.build.install_steps, 'filc') }} - run: | - git config --global --add safe.directory "*" - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - libcurla=bld/lib/libcurl.a - else - libcurla=bld/lib/.libs/libcurl.a - fi - ./scripts/singleuse.pl --unit "${libcurla}" - - - name: 'curl -V' - run: | - find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 file -- - find . -type f \( -name curl -o -name '*.so.*' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- - bld/src/curl --disable -V - - - name: 'curl install' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --install bld --strip - else - make -C bld V=1 install - fi - - - name: 'build tests' - if: ${{ !contains(matrix.build.install_steps, 'skipall') }} - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target testdeps - else - make -C bld V=1 -C tests - fi - - - name: 'install test prereqs' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && matrix.build.container == null }} - run: | - python3 -m venv ~/venv - if bld/src/curl --disable -V 2>/dev/null | grep smb; then - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt - fi - - - name: 'run tests' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }} - timeout-minutes: ${{ contains(matrix.build.install_packages, 'valgrind') && 20 || 10 }} - env: - TEST_TARGET: ${{ matrix.build.torture && 'test-torture' || 'test-ci' }} - TFLAGS: '${{ matrix.build.tflags }}' - run: | - if [ "${TEST_TARGET}" = 'test-ci' ] && [[ "${MATRIX_INSTALL_PACKAGES}" = *'valgrind'* ]]; then - TFLAGS+=' -j6' - TFLAGS+=' !776' # skip long-running flaky test - if [[ "${MATRIX_INSTALL_PACKAGES}" = *'libgss-dev'* ]]; then - TFLAGS+=' ~2077 ~2078' # memory leaks from Curl_auth_decode_spnego_message() -> gss_init_sec_context() - fi - elif [ "${TEST_TARGET}" != 'test-ci' ]; then - TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture - fi - [ -f ~/venv/bin/activate ] && source ~/venv/bin/activate - if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test'* ]]; then - locale || true - export LC_ALL=C - export LC_CTYPE=C - export LC_NUMERIC=fr_FR.UTF-8 - fi - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target "${TEST_TARGET}" - else - make -C bld V=1 "${TEST_TARGET}" - fi - - - name: 'install pytest prereqs' - if: ${{ contains(matrix.build.install_steps, 'pytest') }} - run: | - [ -d ~/venv ] || python3 -m venv ~/venv - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/http/requirements.txt - - - name: 'run pytest' - if: ${{ contains(matrix.build.install_steps, 'pytest') }} - env: - PYTEST_ADDOPTS: '--color=yes' - PYTEST_XDIST_AUTO_NUM_WORKERS: 4 - run: | - [ -f ~/venv/bin/activate ] && source ~/venv/bin/activate - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target curl-pytest-ci - else - make -C bld V=1 pytest-ci - fi - - - name: 'randcurl' - if: ${{ contains(matrix.build.install_steps, 'randcurl') }} - run: | - mkdir run - cd run - ../.github/scripts/randcurl.pl 60 ../bld/src/curl - - - name: 'build examples' - if: ${{ !contains(matrix.build.install_packages, 'valgrind') && !contains(matrix.build.name, '!examples') }} - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target curl-examples-build - else - make -C bld V=1 examples - fi diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 54c50e50a3..0000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,770 +0,0 @@ -# Copyright (C) Daniel Stenberg, , et al. -# -# SPDX-License-Identifier: curl - -name: 'macOS' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - pull_request: - branches: - - master - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -# Apple APIs and the macos-version-min value required to avoid deprecation -# warnings with llvm/clang, and/or the feature getting enabled at build-time -# or runtime: -# -# - 10.7 Lion (2011) - GSS (build-time, deprecated MIT Kerberos shim) -# - 10.9 Mavericks (2013) - LDAP (build-time, deprecated), OCSP (runtime) -# - 10.11 El Capitan (2015) - connectx() (runtime) -# - 10.12 Sierra (2016) - clock_gettime() (build-time, runtime) -# - 10.14 Mojave (2018) - SecTrustEvaluateWithError() (runtime) - -env: - CURL_CI: github - CURL_TEST_MIN: 1700 - MAKEFLAGS: -j 4 - LDFLAGS: -w # suppress 'object file was built for newer macOS version than being linked' warnings - -jobs: - ios: - name: "iOS, ${{ (matrix.build.generator && format('CM-{0}', matrix.build.generator)) || (matrix.build.generate && 'CM' || 'AM' )}} ${{ matrix.build.name }} arm64" - runs-on: macos-latest - timeout-minutes: 10 - env: - DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer" - CC: 'clang' - LDFLAGS: '' - MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }} - MATRIX_OPTIONS: ${{ matrix.build.options }} - # renovate: datasource=github-tags depName=libressl/portable versioning=semver registryUrl=https://github.com - LIBRESSL_VERSION: 4.2.1 - strategy: - fail-fast: false - matrix: - build: - - name: 'libressl' - install_steps: libressl - configure: --with-openssl=/Users/runner/libressl --without-libpsl - - - name: 'libressl' - install_steps: libressl - # FIXME: Could not make OPENSSL_ROOT_DIR work. CMake seems to prepend sysroot to it. - generator: Xcode - xcode: '' # default Xcode. Set it once to silence actionlint. - options: --config Debug - generate: >- - -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=OFF - -DMACOSX_BUNDLE_GUI_IDENTIFIER=se.curl - -DOPENSSL_INCLUDE_DIR=/Users/runner/libressl/include - -DOPENSSL_SSL_LIBRARY=/Users/runner/libressl/lib/libssl.a - -DOPENSSL_CRYPTO_LIBRARY=/Users/runner/libressl/lib/libcrypto.a - -DCURL_USE_LIBPSL=OFF -DCURL_ENABLE_NTLM=ON - - steps: - - name: 'brew install' - if: ${{ matrix.build.configure }} - timeout-minutes: 5 - run: | - # shellcheck disable=SC2181 - while [[ $? == 0 ]]; do - for i in 1 2 3; do - if brew update && brew install automake libtool; then - break 2 - else - echo "Error: wait to try again: $i" - sleep 10 - fi - done - false Too many retries - done - - - name: 'toolchain versions' - run: | - command -v "${CC}"; "${CC}" --version || true - xcodebuild -version || true - xcodebuild -sdk -version | grep '^Path:' || true - xcrun --sdk iphoneos --show-sdk-path 2>/dev/null || true - xcrun --sdk iphoneos --show-sdk-version || true - echo '::group::compiler defaults'; echo 'int main(void) {}' | "${CC}" -v -x c -; echo '::endgroup::' - echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::' - echo '::group::brew packages installed'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::' - - - name: 'cache libressl' - if: ${{ contains(matrix.build.install_steps, 'libressl') }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-libressl - env: - cache-name: cache-libressl - with: - path: ~/libressl - key: iOS-${{ env.cache-name }}-${{ env.LIBRESSL_VERSION }} - - - name: 'build libressl' - if: ${{ contains(matrix.build.install_steps, 'libressl') && steps.cache-libressl.outputs.cache-hit != 'true' }} - run: | - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - --location "https://github.com/libressl/portable/releases/download/v${LIBRESSL_VERSION}/libressl-${LIBRESSL_VERSION}.tar.gz" --output pkg.bin - sha256sum pkg.bin && tar -xzf pkg.bin && rm -f pkg.bin - cd "libressl-${LIBRESSL_VERSION}" - cmake -B . -G Ninja \ - -DCMAKE_INSTALL_PREFIX=/Users/runner/libressl \ - -DCMAKE_SYSTEM_NAME=iOS \ - -DCMAKE_SYSTEM_PROCESSOR=aarch64 \ - -DBUILD_SHARED_LIBS=OFF \ - -DLIBRESSL_APPS=OFF \ - -DLIBRESSL_TESTS=OFF - cmake --build . - cmake --install . --verbose - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build.configure }} - run: autoreconf -fi - - - name: 'configure' - env: - MATRIX_CONFIGURE: '${{ matrix.build.configure }}' - MATRIX_GENERATE: '${{ matrix.build.generate }}' - MATRIX_GENERATOR: '${{ matrix.build.generator }}' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - # https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-visionos-or-watchos - [ -n "${MATRIX_GENERATOR}" ] && options="-G ${MATRIX_GENERATOR}" - cmake -B bld -G Ninja -D_CURL_PREFILL=ON \ - -DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \ - -DCMAKE_SYSTEM_NAME=iOS \ - -DUSE_APPLE_IDN=ON \ - ${MATRIX_GENERATE} ${options} - else - mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror \ - --disable-dependency-tracking --enable-option-checking=fatal \ - CFLAGS="-isysroot $(xcrun --sdk iphoneos --show-sdk-path 2>/dev/null)" \ - --host=aarch64-apple-darwin \ - --with-apple-idn \ - ${MATRIX_CONFIGURE} - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'build' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --verbose - else - make -C bld V=1 - fi - - - name: 'curl info' - run: | - find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file -- - find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' -- - - - name: 'build tests' - if: ${{ matrix.build.generate }} # skip for autotools to save time - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --target testdeps --verbose - else - make -C bld V=1 -C tests - fi - - - name: 'build examples' - if: ${{ matrix.build.generate }} # skip for autotools to save time - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld ${MATRIX_OPTIONS} --parallel 4 --target curl-examples-build --verbose - else - make -C bld examples V=1 - fi - - macos: - name: "${{ matrix.build.generate && 'CM' || 'AM' }} ${{ matrix.build.compiler }} ${{ matrix.build.name }}" - runs-on: ${{ matrix.build.image || 'macos-15' }} - timeout-minutes: 15 - env: - DEVELOPER_DIR: "/Applications/Xcode${{ matrix.build.xcode && format('_{0}', matrix.build.xcode) || '' }}.app/Contents/Developer" - CC: '${{ matrix.build.compiler }}' - MATRIX_BUILD: ${{ matrix.build.generate && 'cmake' || 'autotools' }} - MATRIX_COMPILER: '${{ matrix.build.compiler }}' - MATRIX_INSTALL: '${{ matrix.build.install }}' - MATRIX_INSTALL_STEPS: '${{ matrix.build.install_steps }}' - MATRIX_MACOS_VERSION_MIN: '${{ matrix.build.macos-version-min }}' - strategy: - fail-fast: false - matrix: - build: - - name: '!ssl !debug brotli zstd' - compiler: gcc-13 - configure: --without-ssl --with-brotli --with-zstd --with-apple-idn - tflags: '--min=1450' - xcode: '' # default Xcode. Set it once to silence actionlint. - - - name: '!ssl libssh2 AppleIDN' - compiler: clang - generate: -DENABLE_DEBUG=ON -DCURL_USE_LIBSSH2=ON -DUSE_APPLE_IDN=ON -DCURL_ENABLE_SSL=OFF -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF - tflags: '--min=1550' - - - name: 'OpenSSL libssh c-ares' - compiler: clang - install: libssh - configure: --enable-debug --with-libssh --with-openssl=/opt/homebrew/opt/openssl --enable-ares --with-fish-functions-dir --with-zsh-functions-dir - - - name: 'OpenSSL libssh' - compiler: llvm@18 - install: libssh libnghttp3 - 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 - - - name: '!ssl HTTP-only c-ares' - macos-version-min: '10.15' # Catalina (2019) - compiler: clang - tflags: '--min=930' - generate: >- - -DENABLE_DEBUG=ON -DENABLE_ARES=ON - -DCURL_ENABLE_SSL=OFF -DHTTP_ONLY=ON - -DCURL_DISABLE_ALTSVC=ON -DENABLE_UNIX_SOCKETS=OFF - -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=OFF -DUSE_NGHTTP2=OFF - -DCURL_USE_GSSAPI=OFF -DUSE_LIBIDN2=OFF -DCURL_USE_LIBPSL=OFF - -DCURL_BROTLI=OFF -DCURL_ZLIB=OFF -DCURL_ZSTD=OFF - -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF - - - name: 'LibreSSL !ldap +examples' - compiler: clang - install: libressl - install_steps: pytest - generate: >- - -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF - -DCURL_USE_LIBSSH2=OFF -DCURL_ENABLE_NTLM=ON - - - name: 'OpenSSL 10.15 C89' - macos-version-min: '10.15' - compiler: clang - install: libnghttp3 libngtcp2 - install_steps: pytest - generate: >- - -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_NGTCP2=ON -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_USE_LIBSSH2=OFF - -DCMAKE_C_STANDARD=90 -DCURL_ENABLE_NTLM=ON - - - name: 'OpenSSL SecTrust' - compiler: clang - install: libnghttp3 libngtcp2 - install_steps: pytest - configure: --enable-debug --with-openssl=/opt/homebrew/opt/openssl --with-ngtcp2 --with-apple-sectrust --enable-ntlm - - - name: 'OpenSSL event-based' - compiler: clang - generate: -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_BROTLI=OFF -DCURL_ZSTD=OFF -DCURL_USE_LIBSSH2=OFF -DCURL_ENABLE_NTLM=ON - tflags: '--test-event --min=1300' - - - name: 'OpenSSL gsasl AppleIDN SecTrust +examples' - compiler: clang - install: libnghttp3 libngtcp2 gsasl - generate: >- - -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_USE_GSASL=ON -DUSE_APPLE_IDN=ON -DUSE_NGTCP2=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON - -DUSE_APPLE_SECTRUST=ON -DCURL_ENABLE_NTLM=ON - - - name: 'MultiSSL AppleIDN clang-tidy +examples' - image: macos-26 - compiler: clang - install: llvm gnutls nettle libressl krb5 mbedtls gsasl rustls-ffi libssh fish - install_steps: skiprun - chkprefill: _chkprefill - generate: >- - -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DCURL_DEFAULT_SSL_BACKEND=openssl - -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON -DENABLE_ARES=ON -DCURL_USE_GSASL=ON - -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_APPLE_IDN=ON -DUSE_SSLS_EXPORT=ON - -DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5 - -DCURL_BROTLI=ON -DCURL_ZSTD=ON - -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/opt/homebrew/opt/llvm/bin/clang-tidy - -DCURL_COMPLETION_FISH=ON -DCURL_COMPLETION_ZSH=ON - -DCURL_ENABLE_NTLM=ON - - - name: 'HTTP/3 clang-tidy' - image: macos-26 - compiler: clang - install: llvm libnghttp3 libngtcp2 openldap krb5 - install_steps: skipall - generate: >- - -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DUSE_NGTCP2=ON - -DLDAP_INCLUDE_DIR=/opt/homebrew/opt/openldap/include - -DLDAP_LIBRARY=/opt/homebrew/opt/openldap/lib/libldap.dylib - -DLDAP_LBER_LIBRARY=/opt/homebrew/opt/openldap/lib/liblber.dylib - -DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5 - -DCURL_BROTLI=ON -DCURL_ZSTD=ON - -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/opt/homebrew/opt/llvm/bin/clang-tidy - -DCURL_ENABLE_NTLM=ON - - - name: 'LibreSSL openldap krb5 c-ares +examples' - compiler: clang - install: libressl krb5 openldap - generate: >- - -DENABLE_DEBUG=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/libressl -DENABLE_ARES=ON -DCURL_USE_GSSAPI=ON - -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5 - -DLDAP_INCLUDE_DIR=/opt/homebrew/opt/openldap/include - -DLDAP_LIBRARY=/opt/homebrew/opt/openldap/lib/libldap.dylib - -DLDAP_LBER_LIBRARY=/opt/homebrew/opt/openldap/lib/liblber.dylib - - - name: 'wolfSSL !ldap brotli zstd' - compiler: clang - install: brotli wolfssl zstd - install_steps: pytest - generate: -DCURL_USE_WOLFSSL=ON -DCURL_DISABLE_LDAP=ON -DUSE_ECH=ON -DCURL_ENABLE_NTLM=ON - - - name: 'mbedTLS !ldap brotli zstd MultiSSL AppleIDN' - compiler: llvm@18 - install: brotli mbedtls zstd - install_steps: codeset-test - generate: -DCURL_USE_MBEDTLS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DEFAULT_SSL_BACKEND=mbedtls -DCURL_USE_OPENSSL=ON -DUSE_APPLE_IDN=ON -DCURL_ENABLE_NTLM=ON - - - name: 'GnuTLS !ldap krb5 +examples' - compiler: clang - install: gnutls nettle krb5 - generate: >- - -DENABLE_DEBUG=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_OPENSSL=OFF - -DCURL_USE_GSSAPI=ON -DGSS_ROOT_DIR=/opt/homebrew/opt/krb5 - -DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON -DCURL_ENABLE_NTLM=ON - - - name: 'aws-lc +analyzer' - compiler: gcc-15 - install: aws-lc - generate: >- - -DENABLE_DEBUG=ON -DCURL_USE_OPENSSL=ON -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/aws-lc -DUSE_ECH=ON - -DCURL_DISABLE_LDAP=ON -DUSE_SSLS_EXPORT=ON -DCURL_GCC_ANALYZER=ON - - - name: 'Rustls' - compiler: clang - install: rustls-ffi - generate: -DENABLE_DEBUG=ON -DCURL_USE_RUSTLS=ON -DUSE_ECH=ON -DCURL_DISABLE_LDAP=ON -DCURL_ENABLE_NTLM=ON - tflags: '--min=1650' - - - name: 'OpenSSL torture 1' - compiler: clang - install: libnghttp3 - install_steps: torture - generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_ENABLE_NTLM=ON - tflags: '-t --shallow=25 --min=480 1 to 500' - - - name: 'OpenSSL torture 2' - compiler: clang - install: libnghttp3 - install_steps: torture - generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_ENABLE_NTLM=ON - tflags: '-t --shallow=25 --min=730 501 to 1250' - - - name: 'OpenSSL torture 3' - compiler: clang - install: libnghttp3 - install_steps: torture - generate: -DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DENABLE_THREADED_RESOLVER=OFF -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl -DCURL_ENABLE_NTLM=ON - tflags: '-t --shallow=25 --min=628 1251 to 9999' - - steps: - - name: 'brew install' - timeout-minutes: 5 - # Run this command with retries because of spurious failures seen - # while running the tests, for example - # https://github.com/curl/curl/runs/4095721123?check_suite_focus=true - env: - INSTALL_PACKAGES: >- - ${{ matrix.build.generate && 'ninja' || 'automake libtool' }} - ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') && 'nghttp2 stunnel' || '' }} - ${{ contains(matrix.build.install_steps, 'pytest') && 'caddy httpd vsftpd' || '' }} - - run: | - # shellcheck disable=SC2181 - while [[ $? == 0 ]]; do - for i in 1 2 3; do - if brew update && brew install pkgconf libpsl libssh2 ${INSTALL_PACKAGES} ${MATRIX_INSTALL}; then - break 2 - else - echo "Error: wait to try again: $i" - sleep 10 - fi - done - false Too many retries - done - - - name: 'brew unlink openssl' - if: ${{ contains(matrix.build.install, 'aws-lc') || contains(matrix.build.install, 'libressl') }} - run: | - if [ -d "$(brew --prefix)"/include/openssl ]; then - brew unlink openssl - fi - - - name: 'toolchain versions' - run: | - [[ "${MATRIX_COMPILER}" = 'llvm'* ]] && CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang" - [[ "${MATRIX_COMPILER}" = 'gcc'* ]] && "${CC}" --print-sysroot - command -v "${CC}"; "${CC}" --version || true - xcodebuild -version || true - xcrun --sdk macosx --show-sdk-path 2>/dev/null || true - xcrun --sdk macosx --show-sdk-version || true - ls -l /Library/Developer/CommandLineTools/SDKs || true - echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::' - echo '::group::brew packages installed'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::' - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build.configure }} - run: autoreconf -fi - - - name: 'configure' - env: - MATRIX_CHKPREFILL: '${{ matrix.build.chkprefill }}' - MATRIX_CONFIGURE: '${{ matrix.build.configure }}' - MATRIX_GENERATE: '${{ matrix.build.generate }}' - run: | - if [[ "${MATRIX_COMPILER}" = 'gcc'* ]]; then - sysroot="$("${CC}" --print-sysroot)" # Must match the SDK gcc was built for - else - sysroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)" - fi - - if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then - CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang" - CC+=" --sysroot=${sysroot}" - CC+=" --target=$(uname -m)-apple-darwin" - fi - - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - for _chkprefill in '' ${MATRIX_CHKPREFILL}; do - options='' - [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && options+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MATRIX_MACOS_VERSION_MIN}" - [[ "${MATRIX_INSTALL_STEPS}" = *'pytest'* ]] && options+=' -DVSFTPD=NO' # Skip ~20 tests that stretch run time by 7x on macOS - [ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF' - cmake -B "bld${_chkprefill}" -G Ninja -D_CURL_PREFILL=ON \ - -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ - -DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \ - -DCMAKE_OSX_SYSROOT="${sysroot}" \ - -DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64e/')-apple-darwin$(uname -r)" \ - ${MATRIX_GENERATE} ${options} - done - if [ -d bld_chkprefill ] && ! diff -u bld/lib/curl_config.h bld_chkprefill/lib/curl_config.h; then - echo '::group::reference configure log'; cat bld_chkprefill/CMakeFiles/CMake*.yaml 2>/dev/null || true; echo '::endgroup::' - false - fi - else - export CFLAGS - if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then - options+=" --target=$(uname -m)-apple-darwin" - fi - if [ "${MATRIX_COMPILER}" != 'clang' ]; then - options+=" --with-sysroot=${sysroot}" - CFLAGS+=" --sysroot=${sysroot}" - fi - [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && CFLAGS+=" -mmacosx-version-min=${MATRIX_MACOS_VERSION_MIN}" - [[ "${MATRIX_INSTALL_STEPS}" = *'pytest'* ]] && options+=' --with-test-vsftpd=no' # Skip ~20 tests that stretch run time by 7x on macOS - mkdir bld && cd bld && ../configure --prefix="$PWD"/curl-install --enable-unity --enable-warnings --enable-werror --disable-static \ - --disable-dependency-tracking --enable-option-checking=fatal \ - --with-libpsl="$(brew --prefix libpsl)" \ - ${MATRIX_CONFIGURE} ${options} - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'test configs' - run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true - - - name: 'build' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose - else - make -C bld V=1 - fi - - - name: 'curl -V' - run: | - find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file -- - find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' -- - bld/src/curl --disable --version - - - name: 'curl install' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --install bld --strip - else - make -C bld V=1 install - fi - - - name: 'build tests' - if: ${{ !contains(matrix.build.install_steps, 'skipall') }} - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target testdeps - else - make -C bld V=1 -C tests - fi - - - name: 'install test prereqs' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }} - run: | - python3 -m venv ~/venv - if bld/src/curl --disable -V 2>/dev/null | grep smb; then - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt - fi - - - name: 'run tests' - if: ${{ !contains(matrix.build.install_steps, 'skipall') && !contains(matrix.build.install_steps, 'skiprun') }} - timeout-minutes: ${{ contains(matrix.build.install_steps, 'torture') && 20 || 10 }} - env: - TEST_TARGET: ${{ contains(matrix.build.install_steps, 'torture') && 'test-torture' || 'test-ci' }} - TFLAGS: '${{ matrix.build.tflags }}' - run: | - TFLAGS="-j20 ${TFLAGS}" - if [ "${TEST_TARGET}" != 'test-ci' ]; then - TFLAGS+=' --buildinfo' # only test-ci sets this by default, set it manually for test-torture - fi - source ~/venv/bin/activate - if [[ "${MATRIX_INSTALL_STEPS}" = *'codeset-test'* ]]; then - locale || true - export LC_ALL=C - export LC_CTYPE=C - export LC_NUMERIC=fr_FR.UTF-8 - fi - rm -f ~/.curlrc - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target "${TEST_TARGET}" - else - make -C bld V=1 "${TEST_TARGET}" - fi - - - name: 'install pytest prereqs' - if: ${{ contains(matrix.build.install_steps, 'pytest') }} - run: | - [ -d ~/venv ] || python3 -m venv ~/venv - ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/http/requirements.txt - - - name: 'run pytest' - if: ${{ contains(matrix.build.install_steps, 'pytest') }} - env: - PYTEST_ADDOPTS: '--color=yes' - PYTEST_XDIST_AUTO_NUM_WORKERS: 4 - run: | - source ~/venv/bin/activate - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target curl-pytest-ci - else - make -C bld V=1 pytest-ci - fi - - - name: 'build examples' - if: ${{ contains(matrix.build.name, '+examples') }} - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target curl-examples-build - else - make -C bld examples V=1 - fi - - combinations: # Test buildability with host OS, Xcode / SDK, compiler, target-OS, built tool, combinations - name: "${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }} ${{ matrix.image }} ${{ matrix.xcode }}" - runs-on: ${{ matrix.image }} - timeout-minutes: 10 - env: - DEVELOPER_DIR: "/Applications/Xcode${{ matrix.xcode && format('_{0}', matrix.xcode) || '' }}.app/Contents/Developer" - CC: '${{ matrix.compiler }}' - MATRIX_BUILD: '${{ matrix.build }}' - MATRIX_COMPILER: '${{ matrix.compiler }}' - MATRIX_IMAGE: '${{ matrix.image }}' - MATRIX_MACOS_VERSION_MIN: '${{ matrix.macos-version-min }}' - strategy: - fail-fast: false - matrix: - # Sources: - # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md - # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md - # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md - compiler: [gcc-13, gcc-14, gcc-15, llvm@15, llvm@18, llvm@20, clang] - # Xcode support matrix as of 2025-10, with default macOS SDK versions and OS names, years: - # * = default Xcode on the runner. - # macos-14: 15.0.1, 15.1, 15.2, 15.3,*15.4 - # macos-15: 16.0, 16.1, 16.2, 16.3,*16.4, 26.0 - # macos-26: 16.4 *26.0 - # macOSSDK: 14.0, 14.2, 14.2, 14.4, 14.5, 15.0, 15.1, 15.2, 15.4, 15.5, 26.0 - # Sonoma (2023) Sequoia (2024) Tahoe (2025) - # https://github.com/actions/runner-images/tree/main/images/macos - # https://en.wikipedia.org/wiki/MacOS_version_history - image: [macos-14, macos-15, macos-26] - xcode: [''] # default Xcodes - macos-version-min: [''] - build: [autotools, cmake] - exclude: - # Combinations not covered by runner images: - - { image: macos-14, compiler: 'llvm@18' } - - { image: macos-14, compiler: 'llvm@20' } - - { image: macos-15, compiler: 'llvm@15' } - - { image: macos-15, compiler: 'llvm@20' } - - { image: macos-26, compiler: 'llvm@15' } - - { image: macos-26, compiler: 'llvm@18' } - # Covered by the main workflow - - { image: macos-15, compiler: 'gcc-13' } - - { image: macos-15, compiler: 'llvm@18' } - - { image: macos-15, compiler: 'clang' } - # Reduce build combinations, by dropping less interesting ones - - { image: macos-26, compiler: 'gcc-13' } - - { compiler: 'gcc-14' , build: cmake } - # Reduce autotools to just one job that is also build with cmake - - { compiler: 'gcc-13' , build: autotools } - - { compiler: 'gcc-14' , build: autotools } - - { compiler: 'gcc-15' , build: autotools } - - { compiler: 'llvm@15', build: autotools } - - { compiler: 'llvm@18', build: autotools } - - { compiler: 'llvm@20', build: autotools } - - { image: macos-14, build: autotools } - - { image: macos-15, build: autotools } - steps: - - name: 'install autotools' - if: ${{ matrix.build == 'autotools' }} - run: | - # shellcheck disable=SC2181 - while [[ $? == 0 ]]; do - for i in 1 2 3; do - if brew update && brew install automake libtool; then - break 2 - else - echo "Error: wait to try again: $i" - sleep 10 - fi - done - false Too many retries - done - - - name: 'toolchain versions' - run: | - [[ "${MATRIX_COMPILER}" = 'llvm'* ]] && CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang" - [[ "${MATRIX_COMPILER}" = 'gcc'* ]] && "${CC}" --print-sysroot - command -v "${CC}"; "${CC}" --version || true - xcodebuild -version || true - xcrun --sdk macosx --show-sdk-path 2>/dev/null || true - xcrun --sdk macosx --show-sdk-version || true - ls -l /Library/Developer/CommandLineTools/SDKs || true - echo '::group::compiler defaults'; echo 'int main(void) {}' | "${CC}" -v -x c -; echo '::endgroup::' - echo '::group::macros predefined'; "${CC}" -dM -E - < /dev/null | sort || true; echo '::endgroup::' - echo '::group::brew packages preinstalled'; ls -l "$(brew --prefix)"/opt; echo '::endgroup::' - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build == 'autotools' }} - run: autoreconf -fi - - - name: 'configure / ${{ matrix.build }}' - run: | - if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ]; then - # Ref: https://github.com/Homebrew/homebrew-core/issues/194778#issuecomment-2793243409 - "$(brew --prefix gcc@13)"/libexec/gcc/aarch64-apple-darwin24/13/install-tools/mkheaders - fi - - if [[ "${MATRIX_COMPILER}" = 'gcc'* ]]; then - sysroot="$("${CC}" --print-sysroot)" # Must match the SDK gcc was built for - else - sysroot="$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)" - fi - - if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then - CC="$(brew --prefix "${MATRIX_COMPILER}")/bin/clang" - CC+=" --sysroot=${sysroot}" - CC+=" --target=$(uname -m)-apple-darwin" - fi - - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && options+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${MATRIX_MACOS_VERSION_MIN}" - # would pick up nghttp2, libidn2, and libssh2 - cmake -B bld -G Ninja -D_CURL_PREFILL=ON \ - -DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON -DCURL_WERROR=ON \ - -DCMAKE_OSX_SYSROOT="${sysroot}" \ - -DCMAKE_C_COMPILER_TARGET="$(uname -m | sed 's/arm64/aarch64e/')-apple-darwin$(uname -r)" \ - -DCMAKE_IGNORE_PREFIX_PATH="$(brew --prefix)" \ - -DBUILD_LIBCURL_DOCS=OFF -DBUILD_MISC_DOCS=OFF -DENABLE_CURL_MANUAL=OFF \ - -DCURL_USE_OPENSSL=ON \ - -DUSE_NGHTTP2=OFF -DUSE_LIBIDN2=OFF \ - -DCURL_USE_LIBPSL=OFF -DCURL_USE_LIBSSH2=OFF \ - -DUSE_APPLE_IDN=ON -DUSE_APPLE_SECTRUST=ON \ - ${options} - else - export CFLAGS - if [[ "${MATRIX_COMPILER}" = 'llvm'* ]]; then - options+=" --target=$(uname -m)-apple-darwin" - fi - if [ "${MATRIX_COMPILER}" != 'clang' ]; then - options+=" --with-sysroot=${sysroot}" - CFLAGS+=" --sysroot=${sysroot}" - fi - [ -n "${MATRIX_MACOS_VERSION_MIN}" ] && CFLAGS+=" -mmacosx-version-min=${MATRIX_MACOS_VERSION_MIN}" - # would pick up nghttp2, libidn2, but libssh2 is disabled by default - mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-static \ - --disable-dependency-tracking --enable-option-checking=fatal \ - --disable-docs --disable-manual \ - --with-openssl="$(brew --prefix openssl)" \ - --without-nghttp2 --without-libidn2 \ - --without-libpsl \ - --with-apple-idn --with-apple-sectrust \ - ${options} - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'build / ${{ matrix.build }}' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose - else - make -C bld V=1 - fi - - - name: 'curl -V' - run: | - find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 file -- - find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -print0 | xargs -0 stat -f '%10z bytes: %N' -- - bld/src/curl --disable --version diff --git a/.github/workflows/non-native.yml b/.github/workflows/non-native.yml deleted file mode 100644 index a482431ecc..0000000000 --- a/.github/workflows/non-native.yml +++ /dev/null @@ -1,448 +0,0 @@ -# Copyright (C) Viktor Szakats -# -# SPDX-License-Identifier: curl - -name: 'non-native' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - pull_request: - branches: - - master - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -env: - CURL_CI: github - CURL_TEST_MIN: 1750 - -jobs: - netbsd: - name: 'NetBSD, CM clang openssl ${{ matrix.arch }}' - runs-on: ubuntu-latest - timeout-minutes: 10 - strategy: - matrix: - arch: ['x86_64'] - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - name: 'cmake' - uses: cross-platform-actions/action@492b0c80085400348c599edace11141a4ee73524 # v0.32.0 - env: - MATRIX_ARCH: '${{ matrix.arch }}' - with: - environment_variables: CURL_CI CURL_TEST_MIN MATRIX_ARCH - operating_system: 'netbsd' - version: '10.1' - architecture: ${{ matrix.arch }} - run: | - # https://pkgsrc.se/ - time sudo pkgin -y install cmake ninja-build pkg-config perl brotli mit-krb5 openldap-client libssh2 libidn2 libpsl nghttp2 py311-impacket - time cmake -B bld -G Ninja \ - -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ - -DCMAKE_UNITY_BUILD=ON \ - -DCURL_WERROR=ON \ - -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \ - -DCURL_USE_OPENSSL=ON \ - -DCURL_USE_GSSAPI=ON \ - -DCURL_ENABLE_NTLM=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::' - time cmake --build bld - time cmake --install bld - bld/src/curl --disable --version - if [ "${MATRIX_ARCH}" = 'x86_64' ]; then # Slow on emulated CPU - time cmake --build bld --target testdeps - export TFLAGS='-j8' - time cmake --build bld --target test-ci - fi - echo '::group::build examples' - time cmake --build bld --target curl-examples-build - echo '::endgroup::' - - openbsd: - name: 'OpenBSD, CM clang libressl ${{ matrix.arch }}' - runs-on: ubuntu-latest - timeout-minutes: 10 - strategy: - matrix: - arch: ['x86_64'] - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - name: 'cmake' - uses: cross-platform-actions/action@492b0c80085400348c599edace11141a4ee73524 # v0.32.0 - env: - MATRIX_ARCH: '${{ matrix.arch }}' - with: - environment_variables: CURL_CI CURL_TEST_MIN MATRIX_ARCH - operating_system: 'openbsd' - version: '7.7' - architecture: ${{ matrix.arch }} - run: | - # https://openbsd.app/ - # https://www.openbsd.org/faq/faq15.html - time sudo pkg_add cmake ninja brotli openldap-client-- libssh2 libidn2 libpsl nghttp2 py3-six py3-impacket - time cmake -B bld -G Ninja \ - -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ - -DCMAKE_UNITY_BUILD=ON \ - -DCURL_WERROR=ON \ - -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \ - -DCURL_USE_OPENSSL=ON \ - -DCURL_ENABLE_NTLM=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::' - time cmake --build bld - time cmake --install bld - bld/src/curl --disable --version - if [ "${MATRIX_ARCH}" = 'x86_64' ]; then # Slow on emulated CPU - time cmake --build bld --target testdeps - export TFLAGS='-j8 !2707' # Skip 2707 'ws: Peculiar frame sizes' on suspicion of hangs - time cmake --build bld --target test-ci - fi - echo '::group::build examples' - time cmake --build bld --target curl-examples-build - echo '::endgroup::' - - freebsd: - name: "FreeBSD, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }} openssl${{ matrix.desc }} ${{ matrix.arch }}" - runs-on: ubuntu-latest - timeout-minutes: 15 - strategy: - matrix: - include: - - { build: 'autotools', arch: 'x86_64', compiler: 'clang' } - - { build: 'cmake' , arch: 'x86_64', compiler: 'clang', options: '-DCMAKE_UNITY_BUILD=OFF', desc: ' !unity !runtests !examples' } - - { build: 'autotools', arch: 'arm64' , compiler: 'clang', desc: ' !examples' } - - { build: 'cmake' , arch: 'arm64' , compiler: 'clang' } - fail-fast: false - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - name: '${{ matrix.build }}' - uses: cross-platform-actions/action@492b0c80085400348c599edace11141a4ee73524 # v0.32.0 - env: - CC: '${{ matrix.compiler }}' - CURL_TEST_MIN: 1800 - MATRIX_ARCH: '${{ matrix.arch }}' - MATRIX_BUILD: '${{ matrix.build }}' - MATRIX_DESC: '${{ matrix.desc }}' - MATRIX_OPTIONS: '${{ matrix.options }}' - with: - environment_variables: CC CURL_CI CURL_TEST_MIN MATRIX_ARCH MATRIX_BUILD MATRIX_DESC MATRIX_OPTIONS - operating_system: 'freebsd' - version: '14.3' - architecture: ${{ matrix.arch }} - run: | - export CURL_CI=github - - # https://ports.freebsd.org/ - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - time sudo pkg install -y cmake-core ninja perl5 \ - pkgconf brotli krb5-devel openldap26-client libidn2 libnghttp2 stunnel py311-impacket - else - time sudo pkg install -y autoconf automake libtool \ - pkgconf brotli krb5-devel openldap26-client libidn2 libnghttp2 stunnel py311-impacket - export MAKEFLAGS=-j3 - fi - - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - time cmake -B bld -G Ninja \ - -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ - -DCMAKE_C_COMPILER="${CC}" \ - -DCMAKE_UNITY_BUILD=ON \ - -DCURL_WERROR=ON \ - -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug \ - -DCURL_USE_OPENSSL=ON \ - -DCURL_USE_GSSAPI=ON \ - ${MATRIX_OPTIONS} \ - || { cat bld/CMakeFiles/CMake*.yaml; false; } - else - time autoreconf -fi - if [ "${MATRIX_ARCH}" != 'x86_64' ]; then - options='--disable-manual --disable-docs' # Slow with autotools, skip on emulated CPU - fi - mkdir bld && cd bld - time ../configure --prefix="$HOME"/curl-install --enable-unity --enable-debug --enable-warnings --enable-werror --disable-static \ - --disable-dependency-tracking --enable-option-checking=fatal \ - --with-openssl \ - --with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \ - ${options} \ - ${MATRIX_OPTIONS} \ - || { tail -n 1000 config.log; false; } - cd .. - fi - - 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::' - - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - time cmake --build bld - time cmake --install bld - else - time make -C bld install - fi - - bld/src/curl --disable --version - - if [ "${MATRIX_ARCH}" = 'x86_64' ]; then # Slow on emulated CPU - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - time cmake --build bld --target testdeps - else - time make -C bld -C tests - fi - if [ "${MATRIX_DESC#*!runtests*}" = "${MATRIX_DESC}" ]; then - export TFLAGS='-j8' - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - time cmake --build bld --verbose --target test-ci - else - time make -C bld V=1 test-ci - fi - fi - fi - - if [ "${MATRIX_DESC#*!examples*}" = "${MATRIX_DESC}" ]; then - echo '::group::build examples' - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - time cmake --build bld --target curl-examples-build - else - time make -C bld examples - fi - echo '::endgroup::' - fi - - android: - name: "Android ${{ matrix.platform }}, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.name }} arm64" - runs-on: ubuntu-latest - timeout-minutes: 5 - env: - LDFLAGS: -s - MAKEFLAGS: -j 5 - MATRIX_BUILD: '${{ matrix.build }}' - strategy: - matrix: - include: - - { build: 'autotools', platform: '21', name: "!ssl !zstd", - options: '--without-ssl --without-libpsl --without-zstd' } - - - { build: 'cmake' , platform: '21', name: "!ssl !zstd", - options: '-DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF -DCURL_ZSTD=OFF' } - - - { build: 'autotools', platform: '35', name: "!ssl !zstd", - options: '--without-ssl --without-libpsl --without-zstd' } - - - { build: 'cmake' , platform: '35', name: "!ssl !zstd", - options: '-DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF -DCURL_ZSTD=OFF' } - - fail-fast: false - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build == 'autotools' }} - run: autoreconf -fi - - - name: 'configure' - env: - MATRIX_OPTIONS: '${{ matrix.options }}' - MATRIX_PLATFORM: '${{ matrix.platform }}' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then # https://developer.android.com/ndk/guides/cmake - cmake -B bld -G Ninja \ - -DANDROID_ABI=arm64-v8a \ - -DANDROID_PLATFORM="android-${MATRIX_PLATFORM}" \ - -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" -DCMAKE_WARN_DEPRECATED=OFF \ - -DCMAKE_UNITY_BUILD=ON \ - -DCURL_WERROR=ON \ - ${MATRIX_OPTIONS} - else - TOOLCHAIN="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64" - mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-shared \ - --disable-dependency-tracking --enable-option-checking=fatal \ - CC="$TOOLCHAIN/bin/aarch64-linux-android${MATRIX_PLATFORM}-clang" \ - AR="$TOOLCHAIN/bin/llvm-ar" \ - RANLIB="$TOOLCHAIN/bin/llvm-ranlib" \ - --host="aarch64-linux-android${MATRIX_PLATFORM}" \ - ${MATRIX_OPTIONS} - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'build' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose - else - make -C bld V=1 - fi - - - name: 'curl info' - run: | - find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -print0 | xargs -0 file -- - find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- - - - name: 'build tests' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --target testdeps - else - make -C bld -C tests - fi - - - name: 'build examples' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --target curl-examples-build - else - make -C bld examples - fi - - msdos: - name: "MS-DOS, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} djgpp !ssl i586" - runs-on: ubuntu-latest - timeout-minutes: 5 - env: - LDFLAGS: -s - MAKEFLAGS: -j 5 - MATRIX_BUILD: '${{ matrix.build }}' - # renovate: datasource=github-releases depName=andrewwutw/build-djgpp versioning=semver-coerced registryUrl=https://github.com - TOOLCHAIN_VERSION: 3.4 - TOOLCHAIN_SHA256: 8464f17017d6ab1b2bb2df4ed82357b5bf692e6e2b7fee37e315638f3d505f00 - strategy: - matrix: - build: [autotools, cmake] - fail-fast: false - steps: - - name: 'install packages' - run: | - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 30 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install libfl2 - - - name: 'cache compiler (djgpp)' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-compiler - with: - path: ~/djgpp - key: ${{ runner.os }}-djgpp-${{ env.TOOLCHAIN_VERSION }}-amd64 - - - name: 'install compiler (djgpp)' - if: ${{ steps.cache-compiler.outputs.cache-hit != 'true' }} - run: | - cd ~ - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 120 --retry 3 --retry-connrefused \ - --location "https://github.com/andrewwutw/build-djgpp/releases/download/v${TOOLCHAIN_VERSION}/djgpp-linux64-gcc1220.tar.bz2" --output pkg.bin - sha256sum pkg.bin | tee /dev/stderr | grep -qwF -- "${TOOLCHAIN_SHA256}" && tar -xjf pkg.bin && rm -f pkg.bin - cd djgpp - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - https://www.delorie.com/pub/djgpp/current/v2tk/wat3211b.zip --output pkg.bin - sha256sum pkg.bin | tee /dev/stderr | grep -qwF faa2222ab5deb2c2aac229c760bf4d45aca5379f5af97865c308a0467046b67a && unzip -q pkg.bin && rm -f pkg.bin - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - https://www.delorie.com/pub/djgpp/current/v2tk/zlb13b.zip --output pkg.bin - sha256sum pkg.bin | tee /dev/stderr | grep -qwF f3d2fa8129e7591c7e79074306d8ab91a70ec172cc01baedeae74992285dd3a3 && unzip -q pkg.bin && rm -f pkg.bin - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'configure' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake -B bld -G Ninja \ - -DCMAKE_SYSTEM_NAME=DOS \ - -DCMAKE_SYSTEM_PROCESSOR=x86 \ - -DCMAKE_C_COMPILER_TARGET=i586-pc-msdosdjgpp \ - -DCMAKE_C_COMPILER="$HOME"/djgpp/bin/i586-pc-msdosdjgpp-gcc \ - -DCMAKE_UNITY_BUILD=ON \ - -DCURL_WERROR=ON \ - -DCURL_ENABLE_SSL=OFF -DCURL_USE_LIBPSL=OFF \ - -DZLIB_INCLUDE_DIR="$HOME"/djgpp/include \ - -DZLIB_LIBRARY="$HOME"/djgpp/lib/libz.a \ - -DWATT_ROOT="$HOME"/djgpp/net/watt - else - autoreconf -fi - mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-shared \ - --disable-dependency-tracking --enable-option-checking=fatal \ - CC="$HOME"/djgpp/bin/i586-pc-msdosdjgpp-gcc \ - AR="$HOME"/djgpp/bin/i586-pc-msdosdjgpp-ar \ - RANLIB="$HOME"/djgpp/bin/i586-pc-msdosdjgpp-ranlib \ - WATT_ROOT="$HOME"/djgpp/net/watt \ - --host=i586-pc-msdosdjgpp \ - --without-ssl --without-libpsl \ - --with-zlib="$HOME"/djgpp - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'build' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld - else - make -C bld - fi - - - name: 'curl info' - run: | - find . \( -name '*.exe' -o -name '*.a' \) -print0 | xargs -0 file -- - find . \( -name '*.exe' -o -name '*.a' \) -print0 | xargs -0 stat -c '%10s bytes: %n' -- - - - name: 'build tests' - if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --target testdeps - else - make -C bld -C tests - fi - - - name: 'build examples' - if: ${{ matrix.build == 'cmake' }} # skip for autotools to save time - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --target curl-examples-build - else - make -C bld examples - fi diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 3e326acf01..0000000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,1190 +0,0 @@ -# Copyright (C) Viktor Szakats -# -# SPDX-License-Identifier: curl - -name: 'Windows' - -'on': - push: - branches: - - master - - '*/ci' - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - pull_request: - branches: - - master - paths-ignore: - - '**/*.md' - - '.circleci/**' - - 'appveyor.*' - - 'Dockerfile' - - 'projects/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: {} - -env: - CURL_CI: github - CURL_TEST_MIN: 1700 - CURL_TEST_SSH_KEYALGO: ed25519 - OPENSSH_WINDOWS_VERSION: 10.0.0.0p2-Preview - OPENSSH_WINDOWS_SHA256_ARM64: 698c6aec31c1dd0fb996206e8741f4531a97355686b5431ef347d531b07fcd42 - OPENSSH_WINDOWS_SHA256_WIN64: 23f50f3458c4c5d0b12217c6a5ddfde0137210a30fa870e98b29827f7b43aba5 - STUNNEL_VERSION: 5.77 - STUNNEL_SHA256: 59ba0c5330de85ef474164b40cc559b2eb4e2b8d788c48b564e2257efa236384 - -jobs: - build-cache: - name: 'Build caches' - runs-on: ${{ matrix.image }} - strategy: - matrix: - image: [windows-11-arm, windows-2022] # Cannot share cache between arm and intel: https://github.com/actions/cache/issues/1622 - steps: - - name: 'cache test prereqs (stunnel)' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-stunnel - with: - path: C:\my-stunnel - key: ${{ runner.os }}-stunnel-${{ env.STUNNEL_VERSION }}-amd64 - lookup-only: true - - - name: 'install test prereqs (stunnel)' - if: ${{ steps.cache-stunnel.outputs.cache-hit != 'true' }} - timeout-minutes: 2 - shell: bash - run: | - cd /c && mkdir my-stunnel && cd my-stunnel - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 240 --retry 3 --retry-connrefused \ - "https://www.stunnel.org/archive/5.x/stunnel-${STUNNEL_VERSION}-win64-installer.exe" --output pkg.bin - sha256sum pkg.bin && sha256sum pkg.bin | grep -qwF -- "${STUNNEL_SHA256}" && 7z x -y pkg.bin >/dev/null && rm -f pkg.bin && ls -l && bin/tstunnel -version - - cygwin: - name: "cygwin, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.platform }} ${{ matrix.name }}" - needs: build-cache - runs-on: windows-2022 - timeout-minutes: 10 - defaults: - run: - shell: D:\cygwin\bin\bash.exe '{0}' # zizmor: ignore[misfeature] - env: - CURL_TEST_MIN: 1800 - LDFLAGS: -s - MAKEFLAGS: -j 5 - SHELLOPTS: 'igncr' - MATRIX_BUILD: '${{ matrix.build }}' - strategy: - matrix: - include: - - { name: 'openssl R', - build: 'autotools', platform: 'x86_64', tflags: 'skiprun', - config: '--with-openssl', - install: 'libssl-devel libssh2-devel' } - - { name: 'openssl', - build: 'cmake', platform: 'x86_64', tflags: '', - config: '-DENABLE_DEBUG=ON -DCURL_USE_OPENSSL=ON -DENABLE_THREADED_RESOLVER=OFF -DCURL_ENABLE_NTLM=ON', - install: 'libssl-devel libssh2-devel' } - - fail-fast: false - steps: - - uses: cygwin/cygwin-install-action@711d29f3da23c9f4a1798e369a6f01198c13b11a # v6.1 - with: - platform: ${{ matrix.platform }} - work-vol: 'D:' - # https://cygwin.com/mirrors.html - # Main mirror status: https://archlinux.org/mirrors/kernel.org/ - site: https://mirrors.kernel.org/sourceware/cygwin/ - # https://cygwin.com/cgi-bin2/package-grep.cgi - packages: >- - ${{ matrix.build == 'autotools' && 'autoconf automake libtool make' || 'cmake ninja' }} - gcc-core binutils perl - openssh - libpsl-devel - zlib-devel - libbrotli-devel - libzstd-devel - libnghttp2-devel - ${{ matrix.install }} - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build == 'autotools' }} - timeout-minutes: 2 - run: | - PATH=/usr/bin - autoreconf -fi - - - name: 'configure' - timeout-minutes: 5 - env: - MATRIX_CONFIG: '${{ matrix.config }}' - run: | - PATH=/usr/bin - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake -B bld -G Ninja -D_CURL_PREFILL=ON ${options} \ - -DCMAKE_INSTALL_PREFIX="$HOME"/curl-install \ - -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 \ - -DCURL_WERROR=ON \ - ${MATRIX_CONFIG} - else - mkdir bld && cd bld && ../configure --prefix="$HOME"/curl-install --enable-unity --enable-warnings --enable-werror --disable-static \ - --disable-dependency-tracking --enable-option-checking=fatal \ - --with-libssh2 \ - ${MATRIX_CONFIG} - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: | - PATH=/usr/bin - cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - PATH=/usr/bin - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'build' - timeout-minutes: 10 - run: | - PATH=/usr/bin - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose - cmake --install bld --verbose - else - make -C bld V=1 install - fi - - - name: 'curl -V' - timeout-minutes: 1 - run: | - PATH=/usr/bin - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 file -- - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - PATH="$PWD/bld/lib:$PATH" - fi - bld/src/curl.exe --disable --version - - - name: 'build tests' - if: ${{ matrix.tflags != 'skipall' }} - timeout-minutes: 15 - run: | - PATH=/usr/bin - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target testdeps - else - make -C bld V=1 -C tests - fi - - - name: 'cache test prereqs (stunnel)' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-stunnel - with: - path: C:\my-stunnel - key: ${{ runner.os }}-stunnel-${{ env.STUNNEL_VERSION }}-amd64 - fail-on-cache-miss: true - - - name: 'run tests' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - timeout-minutes: 15 - env: - TFLAGS: '${{ matrix.tflags }}' - run: | - PATH=/usr/bin:/cygdrive/c/my-stunnel/bin - TFLAGS="-j8 ${TFLAGS}" - if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then - TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")" - fi - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - PATH="$PWD/bld/lib:$PATH" - cmake --build bld --verbose --target test-ci - else - make -C bld V=1 test-ci - fi - - - name: 'build examples' - if: ${{ matrix.build == 'cmake' }} - timeout-minutes: 5 - run: | - PATH=/usr/bin - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target curl-examples-build - else - make -C bld V=1 examples - fi - - - name: 'disk space used' - run: du -sh .; echo; du -sh -t 250KB ./*; echo; du -h -t 250KB bld - - msys2: # both msys and mingw-w64 - name: "${{ matrix.sys == 'msys' && 'msys2' || 'mingw' }}, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.env }} ${{ matrix.name }} ${{ matrix.test }}" - needs: build-cache - runs-on: ${{ matrix.image || 'windows-2022' }} - timeout-minutes: ${{ contains(matrix.tflags, '-t') && 14 || 10 }} - defaults: - run: - shell: msys2 {0} # zizmor: ignore[misfeature] - env: - LDFLAGS: -s - MAKEFLAGS: -j 5 - MATRIX_BUILD: '${{ matrix.build }}' - MATRIX_OPENSSH: '${{ matrix.openssh }}' - MATRIX_SYS: '${{ matrix.sys }}' - MATRIX_TEST: '${{ matrix.test }}' - strategy: - matrix: - include: - # MSYS - - { name: '!proxy', - build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '--min=1550', - config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-proxy --enable-ntlm', - install: 'openssl-devel libssh2-devel' } - - { name: 'default', - build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: 'skiprun' , - config: '--enable-debug --with-openssl --disable-threaded-resolver --enable-ntlm', - install: 'openssl-devel libssh2-devel' } - - { name: 'default', - build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: '' , - config: '-DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF -DCURL_ENABLE_NTLM=ON', - install: 'openssl-devel libssh2-devel' } - - { name: 'default R', - build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '' , - config: '--with-openssl --enable-ntlm', install: 'openssl-devel libssh2-devel' } - # MinGW - - { name: 'default', - build: 'autotools', sys: 'mingw64' , env: 'x86_64' , tflags: 'skiprun' , - config: '--enable-debug --with-openssl --disable-threaded-resolver --enable-static --without-zlib', - install: 'mingw-w64-x86_64-openssl mingw-w64-x86_64-libssh2' } - - { name: 'c-ares U', - build: 'autotools', sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: '' , - config: '--enable-debug --with-openssl --enable-windows-unicode --enable-ares --enable-static --disable-shared --enable-ca-native --enable-ntlm', - install: 'mingw-w64-ucrt-x86_64-c-ares mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-nghttp3 mingw-w64-ucrt-x86_64-libssh2' } - - { name: 'schannel c-ares U', type: 'Debug', - build: 'cmake' , sys: 'mingw64' , env: 'x86_64' , tflags: '--min=1650', - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON -DCURL_DROP_UNUSED=ON', - install: 'mingw-w64-x86_64-c-ares mingw-w64-x86_64-libssh2' } - # MinGW torture - - { name: 'schannel U torture 1', type: 'Debug', - build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: '-t --shallow=13 --min=700 1 to 950' , - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON', - install: 'mingw-w64-ucrt-x86_64-c-ares mingw-w64-ucrt-x86_64-libssh2' } - - { name: 'schannel U torture 2', type: 'Debug', - build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: '-t --shallow=13 --min=700 951 to 9999', - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON', - install: 'mingw-w64-ucrt-x86_64-c-ares mingw-w64-ucrt-x86_64-libssh2' } - # WARNING: libssh uses hard-coded world-writable paths (C:ProgramData/, /etc/..., ~/.ssh/) - # to read its configuration from, making it vulnerable to attacks on - # Windows. Do not use this component till there is a fix for these. - # Holds true after CVE-2025-14821 mitigations in 0.12.0. - # https://github.com/curl/curl-for-win/blob/471a065705a16c61a343b15d3e4ef195e2df2f9e/libssh.sh#L6-L94 - - { name: 'gnutls libssh', type: 'Debug', openssh: 'OpenSSH-Windows', - build: 'cmake' , sys: 'clang64' , env: 'clang-x86_64' , tflags: '' , - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_GNUTLS=ON -DENABLE_UNICODE=OFF -DUSE_NGTCP2=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DCURL_ENABLE_NTLM=ON', - install: 'mingw-w64-clang-x86_64-gnutls mingw-w64-clang-x86_64-nghttp3 mingw-w64-clang-x86_64-ngtcp2 mingw-w64-clang-x86_64-libssh unzip' } - - { name: 'schannel R', type: 'Release', image: 'windows-11-arm', - build: 'cmake' , sys: 'clangarm64', env: 'clang-aarch64', tflags: 'skiprun' , - config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DCURL_DROP_UNUSED=ON', - install: 'mingw-w64-clang-aarch64-libssh2' } - - { name: 'openssl', type: 'Release', chkprefill: '_chkprefill', - build: 'cmake' , sys: 'clang64' , env: 'clang-x86_64' , tflags: 'skiprun' , - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=OFF -DUSE_NGTCP2=ON', - install: 'mingw-w64-clang-x86_64-openssl mingw-w64-clang-x86_64-nghttp3 mingw-w64-clang-x86_64-ngtcp2 mingw-w64-clang-x86_64-libssh2' } - - { name: 'schannel', type: 'Release', test: 'uwp', - build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , - config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_OPENSSL=ON', - install: 'mingw-w64-ucrt-x86_64-openssl mingw-w64-ucrt-x86_64-libssh2' } - # { name: 'schannel', type: 'Release', test: 'uwp', - # build: 'autotools', sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , - # config: '--without-debug --with-schannel --disable-static', - # install: 'mingw-w64-ucrt-x86_64-libssh2' } - - { name: 'schannel dev debug', type: 'Debug', cppflags: '-DCURL_SCHANNEL_DEV_DEBUG', image: 'windows-2025', - build: 'cmake' , sys: 'mingw64' , env: 'x86_64' , tflags: 'skiprun' , - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DCMAKE_VERBOSE_MAKEFILE=ON', - install: 'mingw-w64-x86_64-libssh2' } - - { name: 'MultiSSL R', type: 'Release', - build: 'cmake' , sys: 'mingw32' , env: 'i686' , tflags: 'skiprun' , - config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_OPENSSL=ON -DCURL_USE_SCHANNEL=ON -DENABLE_ARES=ON -DENABLE_UNICODE=ON', - install: 'mingw-w64-i686-c-ares mingw-w64-i686-gnutls mingw-w64-i686-libssh2 mingw-w64-i686-openssl' } - fail-fast: false - steps: - - uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0 - if: ${{ matrix.sys == 'msys' }} - with: - msystem: ${{ matrix.sys }} - # https://packages.msys2.org/search - install: >- - gcc - ${{ matrix.build }} ${{ matrix.build == 'autotools' && 'make' || 'ninja' }} - diffutils - zlib-devel - brotli-devel - libzstd-devel - libnghttp2-devel - libpsl-devel - ${{ matrix.install }} - - - uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0 - if: ${{ matrix.sys != 'msys' }} - with: - msystem: ${{ matrix.sys }} - install: >- - mingw-w64-${{ matrix.env }}-cc - mingw-w64-${{ matrix.env }}-${{ matrix.build }} ${{ matrix.build == 'autotools' && 'make' || '' }} - mingw-w64-${{ matrix.env }}-diffutils - mingw-w64-${{ matrix.env }}-libpsl - ${{ matrix.install }} - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build == 'autotools' }} - timeout-minutes: 2 - run: autoreconf -fi - - - name: 'configure' - timeout-minutes: 5 - env: - CPPFLAGS: '${{ matrix.cppflags }}' - MATRIX_CHKPREFILL: '${{ matrix.chkprefill }}' - MATRIX_CONFIG: '${{ matrix.config }}' - MATRIX_ENV: '${{ matrix.env }}' - MATRIX_TYPE: '${{ matrix.type }}' - TFLAGS: '${{ matrix.tflags }}' - run: | - if [ "${MATRIX_TEST}" = 'uwp' ]; then - CPPFLAGS+=' -DWINSTORECOMPAT -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0a00' - if [[ "${MATRIX_ENV}" != 'clang'* ]]; then - specs="$(realpath gcc-specs-uwp)" - gcc -dumpspecs | sed -e 's/-lmingwex/-lwindowsapp -lmingwex -lwindowsapp/' -e 's/-lmsvcrt/-lucrtapp/' > "${specs}" - CFLAGS="-specs=${specs}" - CFLAGS_CMAKE="-specs=$(cygpath -w "${specs}")" - fi - fi - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - for _chkprefill in '' ${MATRIX_CHKPREFILL}; do - if [[ "${MATRIX_ENV}" = 'clang'* ]]; then - options='-DCMAKE_C_COMPILER=clang' - else - options='-DCMAKE_C_COMPILER=gcc' - fi - [ "${MATRIX_SYS}" = 'msys' ] && options+=' -D_CURL_PREFILL=ON' - [ "${MATRIX_TEST}" = 'uwp' ] && options+=' -DCMAKE_SYSTEM_NAME=WindowsStore' - [ "${TFLAGS}" = 'skiprun' ] && options+=' -D_CURL_SKIP_BUILD_CERTS=ON' - [ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF' - cmake -B "bld${_chkprefill}" -G Ninja ${options} \ - -DCMAKE_INSTALL_PREFIX="${HOME}"/curl-install \ - -DCMAKE_C_FLAGS="${CFLAGS_CMAKE} ${CPPFLAGS}" \ - -DCMAKE_BUILD_TYPE="${MATRIX_TYPE}" \ - -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 \ - -DCURL_WERROR=ON \ - ${MATRIX_CONFIG} - done - if [ -d bld_chkprefill ] && ! diff -u bld/lib/curl_config.h bld_chkprefill/lib/curl_config.h; then - echo '::group::reference configure log'; cat bld_chkprefill/CMakeFiles/CMake*.yaml 2>/dev/null || true; echo '::endgroup::' - false - fi - else - export CFLAGS - mkdir bld && cd bld && ../configure --prefix="$HOME"/curl-install --enable-unity --enable-warnings --enable-werror --disable-static \ - --disable-dependency-tracking --enable-option-checking=fatal \ - --with-libssh2 \ - ${MATRIX_CONFIG} - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - cat bld/cmake_install.cmake || true - - - name: 'build' - timeout-minutes: 10 - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose - cmake --install bld --verbose - else - make -C bld V=1 install - fi - - - name: 'curl -V' - timeout-minutes: 1 - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - PATH="$PWD/bld/lib:$PATH" - else - PATH="$PWD/bld/lib/.libs:$PATH" - # avoid libtool's curl.exe wrapper for shared builds - mv bld/src/.libs/curl.exe bld/src/curl.exe || true - fi - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 file -- - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- - if [ "${MATRIX_TEST}" != 'uwp' ]; then # curl: error initializing curl library - bld/src/curl.exe --disable --version - fi - - - name: 'build tests' - if: ${{ matrix.tflags != 'skipall' }} # Save time by skipping this for autotools - timeout-minutes: 10 - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target testdeps - else - make -C bld V=1 -C tests - fi - if [ "${MATRIX_BUILD}" != 'cmake' ]; then - # avoid libtool's .exe wrappers for shared builds - mv bld/tests/libtest/.libs/*.exe bld/tests/libtest || true - mv bld/tests/server/.libs/*.exe bld/tests/server || true - mv bld/tests/tunit/.libs/*.exe bld/tests/tunit || true - mv bld/tests/unit/.libs/*.exe bld/tests/unit || true - fi - - - name: 'cache test prereqs (stunnel)' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-stunnel - with: - path: C:\my-stunnel - key: ${{ runner.os }}-stunnel-${{ env.STUNNEL_VERSION }}-amd64 - fail-on-cache-miss: true - - - name: 'install test prereqs' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - timeout-minutes: 2 - run: | - if [ -z "${MATRIX_OPENSSH}" ]; then # MSYS2 openssh - /usr/bin/pacman --noconfirm --noprogressbar --sync --needed openssh - elif [ "${MATRIX_OPENSSH}" = 'OpenSSH-Windows-builtin' ]; then - # https://learn.microsoft.com/windows-server/administration/openssh/openssh_install_firstuse - if [[ "${MATRIX_IMAGE}" = *'windows-2025'* ]]; then - pwsh -Command 'Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0' - pwsh -Command 'Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0' - fi - else # OpenSSH-Windows - cd /c # no D: drive on windows-11-arm runners - if [[ "${MATRIX_IMAGE}" = *'-arm'* ]]; then - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - --location "https://github.com/PowerShell/Win32-OpenSSH/releases/download/${OPENSSH_WINDOWS_VERSION}/OpenSSH-ARM64.zip" --output pkg.bin - sha256sum pkg.bin && sha256sum pkg.bin | grep -qwF -- "${OPENSSH_WINDOWS_SHA256_ARM64}" && unzip pkg.bin && rm -f pkg.bin - else - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - --location "https://github.com/PowerShell/Win32-OpenSSH/releases/download/${OPENSSH_WINDOWS_VERSION}/OpenSSH-Win64.zip" --output pkg.bin - sha256sum pkg.bin && sha256sum pkg.bin | grep -qwF -- "${OPENSSH_WINDOWS_SHA256_WIN64}" && unzip pkg.bin && rm -f pkg.bin - fi - fi - - - name: 'run tests' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - timeout-minutes: ${{ contains(matrix.tflags, '-t') && 15 || 10 }} - env: - MATRIX_ENV: '${{ matrix.env }}' - MATRIX_INSTALL: '${{ matrix.install }}' - TFLAGS: '${{ matrix.tflags }}' - run: | - TFLAGS="-j8 ${TFLAGS}" - if [ "${MATRIX_SYS}" != 'msys' ]; then - TFLAGS+=' !498' # 'Reject too large HTTP response headers on endless redirects' HTTP, HTTP GET (runtests detecting result code 2009 instead of 56 returned by curl) - TFLAGS+=' ~3000 ~3001 ~3023 ~3024' # 'HTTPS localhost, first/last subject alt name matches, CN does not match' HTTPS, HTTP GET, PEM certificate (returning 56) - if [[ "${MATRIX_INSTALL}" = *'libssh2-wincng'* ]]; then - TFLAGS+=' ~SCP ~SFTP' # Flaky: `-8, Unable to exchange encryption keys`. https://github.com/libssh2/libssh2/issues/804 - fi - if [[ "${TFLAGS}" = *'-t'* ]]; then - TFLAGS+=' !2300' # Leaks memory and file handle via tool_doswin.c / win32_stdin_read_thread() - export CURL_TEST_NO_TASKKILL=1 # experiment to see if it reduces flaky failures - fi - if [[ "${MATRIX_INSTALL} " = *'-libssh '* && \ - "${MATRIX_ENV}" = *'x86_64'* ]]; then - export CURL_TEST_SSH_DISABLE_KEX=mlkem768x25519-sha256 # broken with libssh 0.12.0 Windows x64 - fi - fi - if [ -n "${MATRIX_OPENSSH}" ]; then # OpenSSH-Windows - TFLAGS+=' ~601 ~603 ~617 ~619 ~621 ~641 ~665 ~2004' # SCP - if [[ "${MATRIX_INSTALL} " = *'libssh '* ]]; then - TFLAGS+=' ~614' # 'SFTP pre-quote chmod' SFTP, pre-quote, directory - else - TFLAGS+=' ~3022' # 'SCP correct sha256 host key' SCP, server sha256 key check - fi - fi - if [ "${MATRIX_OPENSSH}" = 'OpenSSH-Windows' ]; then - if [[ "${MATRIX_IMAGE}" = *'-arm'* ]]; then - PATH="/c/OpenSSH-ARM64:$PATH" - else - PATH="/c/OpenSSH-Win64:$PATH" - fi - fi - if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then - TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")" - fi - PATH="$PATH:/c/my-stunnel/bin" - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - PATH="$PWD/bld/lib:$PATH" - cmake --build bld --verbose --target test-ci - else - PATH="$PWD/bld/lib/.libs:$PATH" - make -C bld V=1 test-ci - fi - - - name: 'build examples' - if: ${{ matrix.build == 'cmake' || (matrix.tflags == 'skipall' || matrix.tflags == 'skiprun') }} # Save time by skipping this for autotools running tests - timeout-minutes: 5 - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --verbose --target curl-examples-build - else - make -C bld V=1 examples - fi - - - name: 'disk space used' - run: du -sh .; echo; du -sh -t 250KB ./*; echo; du -h -t 250KB bld - - mingw-w64-standalone-downloads: - name: 'dl-mingw, CM ${{ matrix.ver }}-${{ matrix.env }} ${{ matrix.name }}' - needs: build-cache - runs-on: windows-2022 - timeout-minutes: 10 - defaults: - run: - shell: msys2 {0} # zizmor: ignore[misfeature] - env: - CURL_TEST_MIN: 1550 - LDFLAGS: -s - MAKEFLAGS: -j 5 - MATRIX_DIR: '${{ matrix.dir }}' - strategy: - matrix: - include: - - name: 'schannel +analyzer' # mingw-w64 12.0 - sys: 'mingw64' - dir: 'w64devkit' - env: 'x86_64' - ver: '15.1.0' - url: 'https://github.com/skeeto/w64devkit/releases/download/v2.2.0/w64devkit-x64-2.2.0.7z.exe' - SHA256: e02de30b97196329662007d64bc4509fbd7f5e14339d344075c7f1223dead4a2 - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF -DENABLE_UNIX_SOCKETS=OFF -DCURL_GCC_ANALYZER=ON' - type: 'Release' - - name: 'schannel' # mingw-w64 10.0 - sys: 'mingw64' - dir: 'mingw64' - env: 'x86_64' - ver: '9.5.0' - url: 'https://github.com/brechtsanders/winlibs_mingw/releases/download/9.5.0-10.0.0-msvcrt-r1/winlibs-x86_64-posix-seh-gcc-9.5.0-mingw-w64msvcrt-10.0.0-r1.7z' - SHA256: 41637132ea7dc36a7f86a1961eaa334c380b5a3423d36aecb481cabcd006e3fe - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=OFF -DCURL_DISABLE_VERBOSE_STRINGS=ON' - type: 'Release' - tflags: 'skiprun' - - name: 'schannel mbedtls U' # mingw-w64 6.0 - sys: 'mingw64' - dir: 'mingw64' - env: 'x86_64' - ver: '7.3.0' - url: 'https://downloads.sourceforge.net/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/7.3.0/threads-win32/seh/x86_64-7.3.0-release-win32-seh-rt_v5-rev0.7z' - SHA256: 9dc08c9c2bdd5d8173f87791bed644f6e290624f739de474f117b590dfd8a721 - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DCURL_USE_MBEDTLS=ON -DCURL_TARGET_WINDOWS_VERSION=0x0600' - install: mingw-w64-x86_64-mbedtls - type: 'Release' - tflags: 'skiprun' - - name: 'schannel !unity' # mingw-w64 5.0 - sys: 'mingw32' - dir: 'mingw32' - env: 'i686' - ver: '6.4.0' - url: 'https://downloads.sourceforge.net/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/6.4.0/threads-win32/dwarf/i686-6.4.0-release-win32-dwarf-rt_v5-rev0.7z' - SHA256: 12d2c62ad4527ec8a52275ea8485678dcbe20bec4716a3c7ba274f225d696085 - config: '-DENABLE_DEBUG=ON -DCURL_USE_SCHANNEL=ON -DCURL_USE_LIBSSH=ON -DENABLE_UNICODE=OFF -DCMAKE_UNITY_BUILD=OFF -DCURL_TARGET_WINDOWS_VERSION=0x0600' - install: mingw-w64-i686-libssh - type: 'Debug' - tflags: 'skiprun' - - name: 'schannel !examples' # mingw-w64 3.0 - sys: 'mingw64' - dir: 'mingw64' - env: 'x86_64' - ver: '4.8.1' - url: 'https://downloads.sourceforge.net/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.1/threads-win32/seh/x86_64-4.8.1-release-win32-seh-rt_v3-rev2.7z' - SHA256: 1353d997e85bb4494ebbebb432d824848d66b32c6045900da9a38a767b3c4ab4 - config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DCURL_TARGET_WINDOWS_VERSION=0x0600' - type: 'Debug' - tflags: 'skipall' - chkprefill: '' # Set it once to silence actionlint - fail-fast: false - steps: - - uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0 - with: - msystem: ${{ matrix.sys }} - release: false - update: false - cache: false - path-type: inherit - install: >- - mingw-w64-${{ matrix.env }}-libpsl - ${{ matrix.install }} - - - name: 'cache compiler (gcc ${{ matrix.ver }}-${{ matrix.env }})' - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-compiler - with: - path: D:\my-cache - key: ${{ runner.os }}-mingw-w64-${{ matrix.ver }}-${{ matrix.env }} - - - name: 'install compiler (gcc ${{ matrix.ver }}-${{ matrix.env }})' - if: ${{ steps.cache-compiler.outputs.cache-hit != 'true' }} - timeout-minutes: 5 - env: - MATRIX_URL: '${{ matrix.url }}' - MATRIX_SHA256: '${{ matrix.SHA256 }}' - run: | - cd /d - mkdir my-cache - cd my-cache - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 240 --retry 3 --retry-connrefused \ - --location --proto-redir =https "${MATRIX_URL}" --output pkg.bin - pwd - sha256sum pkg.bin && sha256sum pkg.bin | grep -qwF -- "${MATRIX_SHA256}" && 7z x -y pkg.bin >/dev/null && rm -f pkg.bin && ls -l - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'configure' - timeout-minutes: 5 - env: - MATRIX_CHKPREFILL: '${{ matrix.chkprefill }}' - MATRIX_CONFIG: '${{ matrix.config }}' - MATRIX_TYPE: '${{ matrix.type }}' - TFLAGS: '${{ matrix.tflags }}' - run: | - PATH="/d/my-cache/${MATRIX_DIR}/bin:$PATH" - for _chkprefill in '' ${MATRIX_CHKPREFILL}; do - options='' - [ "${TFLAGS}" = 'skiprun' ] && options+=' -D_CURL_SKIP_BUILD_CERTS=ON' - [ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF' - cmake -B "bld${_chkprefill}" -G Ninja ${options} \ - -DCMAKE_C_COMPILER=gcc \ - -DCMAKE_BUILD_TYPE="${MATRIX_TYPE}" \ - -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=30 \ - -DCURL_DROP_UNUSED=ON \ - -DCURL_WERROR=ON \ - -DUSE_LIBIDN2=OFF \ - ${MATRIX_CONFIG} - done - if [ -d bld_chkprefill ] && ! diff -u bld/lib/curl_config.h bld_chkprefill/lib/curl_config.h; then - echo '::group::reference configure log'; cat bld_chkprefill/CMakeFiles/CMake*.yaml 2>/dev/null || true; echo '::endgroup::' - false - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'build' - timeout-minutes: 5 - run: | - PATH="/d/my-cache/${MATRIX_DIR}/bin:$PATH" - cmake --build bld - - - name: 'curl -V' - timeout-minutes: 1 - run: | - /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 file -- - /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- - PATH="$PWD/bld/lib:$PATH" - bld/src/curl.exe --disable --version - - - name: 'build tests' - if: ${{ matrix.tflags != 'skipall' }} - timeout-minutes: 10 - run: | - PATH="/d/my-cache/${MATRIX_DIR}/bin:$PATH" - cmake --build bld --target testdeps - - - name: 'cache test prereqs (stunnel)' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-stunnel - with: - path: C:\my-stunnel - key: ${{ runner.os }}-stunnel-${{ env.STUNNEL_VERSION }}-amd64 - fail-on-cache-miss: true - - - name: 'install test prereqs' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - timeout-minutes: 2 - run: | - if "bld/src/curl.exe" --disable -V 2>/dev/null | grep smb; then - python3 -m pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt - fi - - - name: 'run tests' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - timeout-minutes: 10 - env: - TFLAGS: '${{ matrix.tflags }}' - run: | - PATH="/d/my-cache/${MATRIX_DIR}/bin:$PATH" - TFLAGS="-j8 ${TFLAGS}" - TFLAGS+=' !498' # 'Reject too large HTTP response headers on endless redirects' HTTP, HTTP GET (runtests detecting result code 2009 instead of 56 returned by curl) - TFLAGS+=' ~3000 ~3001 ~3023 ~3024' # 'HTTPS localhost, last subject alt name matches, CN does not match' HTTPS, HTTP GET, PEM certificate (returning 56) - if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then - TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")" - fi - PATH="$PWD/bld/lib:$PATH:/c/my-stunnel/bin" - cmake --build bld --target test-ci - - - name: 'build examples' - if: ${{ !contains(matrix.name, '!examples') }} - timeout-minutes: 5 - run: | - PATH="/d/my-cache/${MATRIX_DIR}/bin:$PATH" - cmake --build bld --target curl-examples-build - - - name: 'disk space used' - run: du -sh .; echo; du -sh -t 250KB ./*; echo; du -h -t 250KB bld - - linux-cross-mingw-w64: - name: "linux-mingw, ${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }}" - runs-on: ubuntu-latest - timeout-minutes: 10 - env: - LDFLAGS: -s - MAKEFLAGS: -j 5 - TRIPLET: 'x86_64-w64-mingw32' - MATRIX_BUILD: '${{ matrix.build }}' - MATRIX_COMPILER: '${{ matrix.compiler }}' - strategy: - fail-fast: false - matrix: - include: - - { build: 'autotools', compiler: 'gcc' } - - { build: 'cmake' , compiler: 'gcc' } - - { build: 'cmake' , compiler: 'clang-tidy', install_packages: 'clang-20 clang-tidy-20' } - steps: - - name: 'install packages' - env: - MATRIX_INSTALL_PACKAGES: '${{ matrix.install_packages }}' - run: | - printf "#!/bin/sh - while [ \$? = 0 ]; do for i in 1 2 3; do timeout 30 \"\$@\" && break 2; echo \"Error: slow server, retry \$i\"; sleep 1 - dpkg --configure -a; done; false; done" > "$HOME"/my-apt; chmod +x "$HOME"/my-apt - sudo "$HOME"/my-apt apt-get -o Dpkg::Use-Pty=0 install gcc-mingw-w64-x86-64-win32 ${MATRIX_INSTALL_PACKAGES} - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'autoreconf' - if: ${{ matrix.build == 'autotools' }} - run: autoreconf -fi - - - name: 'configure' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - if [ "${MATRIX_COMPILER}" = 'clang-tidy' ]; then - options+=' -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/usr/bin/clang-tidy-20' - options+=' -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON' - options+=' -DCMAKE_C_COMPILER=clang-20' - options+=" -DCMAKE_RC_COMPILER=llvm-windres-$(clang-20 -dumpversion | cut -d '.' -f 1)" - else - options+=" -DCMAKE_C_COMPILER=${TRIPLET}-gcc" - fi - cmake -B bld -G Ninja \ - -DCMAKE_SYSTEM_NAME=Windows \ - -DCMAKE_C_COMPILER_TARGET="${TRIPLET}" \ - -DCMAKE_UNITY_BUILD=ON -D_CURL_TESTS_CONCAT=ON \ - -DCURL_WERROR=ON \ - -DCURL_USE_SCHANNEL=ON -DUSE_WIN32_IDN=ON \ - -DCURL_USE_LIBPSL=OFF \ - -DCURL_ENABLE_NTLM=ON \ - -D_CURL_SKIP_BUILD_CERTS=ON \ - ${options} - else - mkdir bld && cd bld && ../configure --enable-unity --enable-warnings --enable-werror --disable-static \ - --disable-dependency-tracking --enable-option-checking=fatal \ - --host="${TRIPLET}" \ - --with-schannel --with-winidn \ - --without-libpsl - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'build' - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld - else - make -C bld - fi - - - name: 'curl info' - run: | - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 file -- - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- - - - name: 'build tests' - if: ${{ matrix.build == 'cmake' }} # Save time by skipping this for autotools and clang-tidy - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --target testdeps - else - make -C bld -C tests - fi - - - name: 'build examples' - if: ${{ matrix.compiler != 'clang-tidy' }} # Save time by skipping this for clang-tidy - run: | - if [ "${MATRIX_BUILD}" = 'cmake' ]; then - cmake --build bld --target curl-examples-build - else - make -C bld examples - fi - - - name: 'disk space used' - run: du -sh .; echo; du -sh -t 250KB ./*; echo; du -h -t 250KB bld - - msvc: - name: 'msvc, CM ${{ matrix.arch }}-${{ matrix.plat }} ${{ matrix.name }}' - needs: build-cache - runs-on: ${{ matrix.image || 'windows-2022' }} - timeout-minutes: ${{ matrix.arch == 'arm64' && 12 || 10 }} - defaults: - run: - shell: msys2 {0} # zizmor: ignore[misfeature] - env: - MATRIX_ARCH: '${{ matrix.arch }}' - MATRIX_IMAGE: '${{ matrix.image }}' - MATRIX_INSTALL_MSYS2: '${{ matrix.install-msys2 }}' - MATRIX_INSTALL_VCPKG: '${{ matrix.install-vcpkg }}' - MATRIX_OPENSSH: '${{ matrix.openssh }}' - MATRIX_PLAT: '${{ matrix.plat }}' - MATRIX_TYPE: '${{ matrix.type }}' - VCPKG_DISABLE_METRICS: '1' - strategy: - matrix: - include: - - name: '!ssl +examples' - install-vcpkg: 'zlib libssh2[core,zlib]' - arch: 'x64' - env: 'ucrt-x86_64' - plat: 'uwp' - type: 'Debug' - image: 'windows-2025' - tflags: 'skiprun' - config: >- - -DENABLE_DEBUG=ON - -DCURL_ENABLE_SSL=OFF - -DUSE_WIN32_IDN=ON - - - name: 'openssl +examples' - install-msys2: >- - mingw-w64-ucrt-x86_64-brotli - mingw-w64-ucrt-x86_64-zlib - mingw-w64-ucrt-x86_64-zstd - mingw-w64-ucrt-x86_64-openssl - mingw-w64-ucrt-x86_64-libssh2 - mingw-w64-ucrt-x86_64-nghttp2 - mingw-w64-ucrt-x86_64-nghttp3 - mingw-w64-ucrt-x86_64-ngtcp2 - - arch: 'x64' - env: 'ucrt-x86_64' - plat: 'windows' - type: 'Debug' - image: 'windows-2025-vs2026' - chkprefill: '_chkprefill' - config: >- - -DENABLE_DEBUG=ON - -DCURL_USE_OPENSSL=ON -DUSE_NGTCP2=ON - -DOPENSSL_INCLUDE_DIR=/ucrt64/include - -DSSL_EAY_DEBUG=/ucrt64/lib/libssl.dll.a - -DSSL_EAY_RELEASE=/ucrt64/lib/libssl.dll.a - -DLIB_EAY_DEBUG=/ucrt64/lib/libcrypto.dll.a - -DLIB_EAY_RELEASE=/ucrt64/lib/libcrypto.dll.a - -DUSE_WIN32_IDN=ON -DUSE_SSLS_EXPORT=ON - -DBROTLI_INCLUDE_DIR=/ucrt64/include - -DBROTLICOMMON_LIBRARY=/ucrt64/lib/libbrotlicommon.dll.a - -DBROTLIDEC_LIBRARY=/ucrt64/lib/libbrotlidec.dll.a - -DZSTD_INCLUDE_DIR=/ucrt64/include - -DZSTD_LIBRARY=/ucrt64/lib/libzstd.dll.a - -DZLIB_INCLUDE_DIR=/ucrt64/include - -DZLIB_LIBRARY=/ucrt64/lib/libz.dll.a - -DLIBSSH2_INCLUDE_DIR=/ucrt64/include - -DLIBSSH2_LIBRARY=/ucrt64/lib/libssh2.dll.a - -DNGHTTP2_INCLUDE_DIR=/ucrt64/include - -DNGHTTP2_LIBRARY=/ucrt64/lib/libnghttp2.dll.a - -DNGHTTP3_INCLUDE_DIR=/ucrt64/include - -DNGHTTP3_LIBRARY=/ucrt64/lib/libnghttp3.dll.a - -DNGTCP2_INCLUDE_DIR=/ucrt64/include - -DNGTCP2_LIBRARY=/ucrt64/lib/libngtcp2.dll.a - -DNGTCP2_CRYPTO_OSSL_LIBRARY=/ucrt64/lib/libngtcp2_crypto_ossl.dll.a - -DCURL_CA_NATIVE=ON - -DCURL_ENABLE_NTLM=ON - - - name: 'schannel U' - install-vcpkg: 'zlib libssh2[core,zlib]' - arch: 'arm64' - env: 'clang-aarch64' - plat: 'windows' - type: 'Debug' - image: 'windows-11-arm' - openssh: 'OpenSSH-Windows' - tflags: '--min=1650' - # leave SMB disabled to save 30-60 seconds by omitting prereqs, - # to counteract the slower test run step - config: >- - -DENABLE_DEBUG=ON - -DCURL_USE_SCHANNEL=ON - -DUSE_WIN32_IDN=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON - - fail-fast: false - steps: - - uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0 - with: - msystem: ${{ matrix.arch == 'arm64' && 'clangarm64' || 'ucrt64' }} - release: ${{ contains(matrix.image, 'arm') }} - cache: ${{ contains(matrix.image, 'arm') }} - path-type: inherit - install: >- - mingw-w64-${{ matrix.env }}-libpsl - ${{ matrix.install-msys2 }} - - - name: 'vcpkg versions' - if: ${{ matrix.install-vcpkg }} - timeout-minutes: 1 - run: | - git -C "$VCPKG_INSTALLATION_ROOT" show --no-patch --format='%H %ai' - vcpkg version - - - name: 'vcpkg build' - if: ${{ matrix.install-vcpkg }} - timeout-minutes: 45 - run: vcpkg x-set-installed ${MATRIX_INSTALL_VCPKG} --triplet="${MATRIX_ARCH}-${MATRIX_PLAT}" - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - name: 'configure' - timeout-minutes: 5 - env: - MATRIX_CHKPREFILL: '${{ matrix.chkprefill }}' - MATRIX_CONFIG: '${{ matrix.config }}' - TFLAGS: '${{ matrix.tflags }}' - run: | - [ -f "${MINGW_PREFIX}/include/zconf.h" ] && sed -i -E 's|(# +define +Z_HAVE_UNISTD_H)|/*\1*/|g' "${MINGW_PREFIX}/include/zconf.h" # Patch MSYS2 zconf.h for MSVC - for _chkprefill in '' ${MATRIX_CHKPREFILL}; do - options='' - cflags='' - rcflags='' - ldflags='' - if [ "${MATRIX_PLAT}" = 'uwp' ]; then - options+=' -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0' - cflags+=' -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP' - ldflags+=' -OPT:NOREF -OPT:NOICF -APPCONTAINER:NO' - vsglobals=';AppxPackage=false;WindowsAppContainer=false' - fi - if [ "${TFLAGS}" = 'skiprun' ]; then - [ "${MATRIX_ARCH}" = 'arm64' ] && options+=' -A ARM64' - [ "${MATRIX_ARCH}" = 'x64' ] && options+=' -A x64' - [ "${MATRIX_ARCH}" = 'x86' ] && options+=' -A Win32' - options+=" -DCMAKE_VS_GLOBALS=TrackFileAccess=false${vsglobals}" - options+=' -D_CURL_SKIP_BUILD_CERTS=ON' - unset CMAKE_GENERATOR - else - # Use Ninja when running tests to avoid MSBuild heuristics picking - # up "error messages" in the test log output and making the job fail. - # Officially this requires the vcvarsall.bat MS-DOS batch file (as of - # VS2022). Since it integrates badly with CI steps and shell scripts, - # reproduce the necessary build configuration manually, without envs. - MSVC_EDITION='2022/Enterprise/vc/tools/msvc' - [[ "${MATRIX_IMAGE}" = *'vs2026'* ]] && MSVC_EDITION='18/Enterprise/vc/tools/msvc' - [[ "$(uname -s)" = *'ARM64'* ]] && MSVC_HOST='arm64' || MSVC_HOST='x64' # x86 - MSVC_ROOTD="$(cygpath --mixed --short-name "$PROGRAMFILES/Microsoft Visual Studio")" # to avoid spaces in directory names - MSVC_ROOTU="$(/usr/bin/find "$(cygpath --unix "$MSVC_ROOTD/$MSVC_EDITION")" -mindepth 1 -maxdepth 1 -type d -name '*.*' | sort | tail -n 1)" - MSVC_ROOTW="$(cygpath --mixed "$MSVC_ROOTU")" - MSVC_ROOTU="$(cygpath --unix "$MSVC_ROOTW")" - MSVC_BINU="$MSVC_ROOTU/bin/Host$MSVC_HOST/$MATRIX_ARCH" - MSDK_ROOTW="$(cygpath --mixed --short-name "$(printenv 'ProgramFiles(x86)')/Windows Kits")/10" - MSDK_ROOTU="$(cygpath --unix "$MSDK_ROOTW")" - MSDK_VER="$(basename "$(/usr/bin/find "$MSDK_ROOTU/lib" -mindepth 1 -maxdepth 1 -type d -name '*.*' | sort | tail -n 1)")" - MSDK_LIBW="$MSDK_ROOTW/lib/$MSDK_VER" - MSDK_INCW="$MSDK_ROOTW/include/$MSDK_VER" - MSDK_BINU="$MSDK_ROOTU/bin/$MSDK_VER/$MSVC_HOST" - cflags+=" -external:W0" - cflags+=" -external:I$MSVC_ROOTW/include" - cflags+=" -external:I$MSDK_INCW/shared" - cflags+=" -external:I$MSDK_INCW/ucrt" - cflags+=" -external:I$MSDK_INCW/um" - cflags+=" -external:I$MSDK_INCW/km" - rcflags+=" -I$MSDK_INCW/shared" - rcflags+=" -I$MSDK_INCW/um" - ldflags+=" -libpath:$MSVC_ROOTW/lib/$MATRIX_ARCH" - ldflags+=" -libpath:$MSDK_LIBW/ucrt/$MATRIX_ARCH" - ldflags+=" -libpath:$MSDK_LIBW/um/$MATRIX_ARCH" - ldflags+=" -libpath:$MSDK_LIBW/km/$MATRIX_ARCH" - options+=" -DCMAKE_RC_COMPILER=$MSDK_BINU/rc.exe" - options+=" -DCMAKE_MT=$MSDK_BINU/mt.exe" - options+=" -DCMAKE_C_COMPILER=$MSVC_BINU/cl.exe" - export CMAKE_GENERATOR='Ninja Multi-Config' # pass it via env to avoid space issues - echo "Using MSVC: ${MSVC_ROOTW}" - echo "Using Windows SDK: ${MSDK_VER}" - fi - [ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF' - if [ -n "${MATRIX_INSTALL_VCPKG}" ]; then - options+=" -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" - options+=" -DVCPKG_INSTALLED_DIR=$VCPKG_INSTALLATION_ROOT/installed" - options+=" -DVCPKG_TARGET_TRIPLET=${MATRIX_ARCH}-${MATRIX_PLAT}" - options+=" -DCMAKE_C_COMPILER_TARGET=${MATRIX_ARCH}-${MATRIX_PLAT}" - fi - cmake -B "bld${_chkprefill}" ${options} \ - -DCMAKE_C_FLAGS="${cflags}" \ - -DCMAKE_RC_FLAGS="${rcflags}" \ - -DCMAKE_EXE_LINKER_FLAGS="-INCREMENTAL:NO ${ldflags}" \ - -DCMAKE_SHARED_LINKER_FLAGS="-INCREMENTAL:NO ${ldflags}" \ - -DCMAKE_UNITY_BUILD=ON \ - -DCURL_DROP_UNUSED=ON \ - -DCURL_WERROR=ON \ - -DLIBPSL_INCLUDE_DIR="${MINGW_PREFIX}/include" \ - -DLIBPSL_LIBRARY="${MINGW_PREFIX}/lib/libpsl.dll.a" \ - -DBUILD_SHARED_LIBS=OFF \ - ${MATRIX_CONFIG} - done - if [ -d bld_chkprefill ] && ! diff -u bld/lib/curl_config.h bld_chkprefill/lib/curl_config.h; then - echo '::group::reference configure log'; cat bld_chkprefill/CMakeFiles/CMake*.yaml 2>/dev/null || true; echo '::endgroup::' - false - fi - - - name: 'configure log' - if: ${{ !cancelled() }} - run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - - - name: 'curl_config.h' - run: | - echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - grep -F '#define' bld/lib/curl_config.h | sort || true - - - name: 'build' - timeout-minutes: 5 - run: cmake --build bld --config "${MATRIX_TYPE}" --parallel 5 - - - name: 'curl -V' - timeout-minutes: 1 - run: | - /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -print0 | grep -z curl | xargs -0 file -- - /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -print0 | grep -z curl | xargs -0 stat -c '%10s bytes: %n' -- - if [ "${MATRIX_PLAT}" != 'uwp' ]; then # Missing: ucrtbased.dll, VCRUNTIME140D.dll, VCRUNTIME140D_APP.dll - PATH="$PWD/bld/lib/${MATRIX_TYPE}:$PATH" - "bld/src/${MATRIX_TYPE}/curl.exe" --disable --version - fi - - - name: 'build tests' - if: ${{ matrix.tflags != 'skipall' }} - timeout-minutes: 10 - run: cmake --build bld --config "${MATRIX_TYPE}" --parallel 5 --target testdeps - - - name: 'cache test prereqs (stunnel)' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 - id: cache-stunnel - with: - path: C:\my-stunnel - key: ${{ runner.os }}-stunnel-${{ env.STUNNEL_VERSION }}-amd64 - fail-on-cache-miss: true - - - name: 'install test prereqs' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - timeout-minutes: 2 - run: | - if [ -z "${MATRIX_OPENSSH}" ]; then # MSYS2 openssh - /usr/bin/pacman --noconfirm --noprogressbar --sync --needed openssh - elif [ "${MATRIX_OPENSSH}" = 'OpenSSH-Windows-builtin' ]; then - # https://learn.microsoft.com/windows-server/administration/openssh/openssh_install_firstuse - if [[ "${MATRIX_IMAGE}" = *'windows-2025'* ]]; then - pwsh -Command 'Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0' - pwsh -Command 'Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0' - fi - else # OpenSSH-Windows - cd /c # no D: drive on windows-11-arm runners - if [[ "${MATRIX_IMAGE}" = *'-arm'* ]]; then - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - --location "https://github.com/PowerShell/Win32-OpenSSH/releases/download/${OPENSSH_WINDOWS_VERSION}/OpenSSH-ARM64.zip" --output pkg.bin - sha256sum pkg.bin && sha256sum pkg.bin | grep -qwF -- "${OPENSSH_WINDOWS_SHA256_ARM64}" && unzip pkg.bin && rm -f pkg.bin - else - curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 60 --retry 3 --retry-connrefused \ - --location "https://github.com/PowerShell/Win32-OpenSSH/releases/download/${OPENSSH_WINDOWS_VERSION}/OpenSSH-Win64.zip" --output pkg.bin - sha256sum pkg.bin && sha256sum pkg.bin | grep -qwF -- "${OPENSSH_WINDOWS_SHA256_WIN64}" && unzip pkg.bin && rm -f pkg.bin - fi - fi - if "bld/src/${MATRIX_TYPE}/curl.exe" --disable -V 2>/dev/null | grep smb; then - python3 -m pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary -r tests/requirements.txt - fi - - - name: 'run tests' - if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }} - timeout-minutes: 10 - env: - TFLAGS: '${{ matrix.tflags }}' - run: | - TFLAGS="-j8 ${TFLAGS}" - TFLAGS+=' !498' # 'Reject too large HTTP response headers on endless redirects' HTTP, HTTP GET (runtests detecting result code 2009 instead of 56 returned by curl) - TFLAGS+=' ~3000 ~3001 ~3023 ~3024' # 'HTTPS localhost, last subject alt name matches, CN does not match' HTTPS, HTTP GET, PEM certificate (returning 56) - if [[ "${MATRIX_INSTALL_MSYS2}" = *'libssh2-wincng'* || \ - "${MATRIX_INSTALL_VCPKG}" = *'libssh2[core,zlib]'* ]]; then - TFLAGS+=' ~SCP ~SFTP' # Flaky: `-8, Unable to exchange encryption keys`. https://github.com/libssh2/libssh2/issues/804 - fi - if [ -n "${MATRIX_OPENSSH}" ]; then # OpenSSH-Windows - TFLAGS+=' ~601 ~603 ~617 ~619 ~621 ~641 ~665 ~2004' # SCP - if [[ "${MATRIX_INSTALL_MSYS2} " = *'libssh '* || \ - "${MATRIX_INSTALL_VCPKG} " = *'libssh '* ]]; then - TFLAGS+=' ~614' # 'SFTP pre-quote chmod' SFTP, pre-quote, directory - else - TFLAGS+=' ~3022' # 'SCP correct sha256 host key' SCP, server sha256 key check - fi - fi - if [ "${MATRIX_OPENSSH}" = 'OpenSSH-Windows' ]; then - if [[ "${MATRIX_IMAGE}" = *'-arm'* ]]; then - PATH="/c/OpenSSH-ARM64:$PATH" - else - PATH="/c/OpenSSH-Win64:$PATH" - fi - fi - PATH="$PWD/bld/lib/${MATRIX_TYPE}:$PATH:/c/my-stunnel/bin" - cmake --build bld --config "${MATRIX_TYPE}" --target test-ci - - - name: 'build examples' - timeout-minutes: 5 - if: ${{ contains(matrix.name, '+examples') }} - run: cmake --build bld --config "${MATRIX_TYPE}" --parallel 5 --target curl-examples-build - - - name: 'disk space used' - run: du -sh .; echo; du -sh -t 250KB ./*; echo; du -h -t 250KB bld diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index c33717c4e9..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,150 +0,0 @@ -#*************************************************************************** -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| -# -# Copyright (C) Daniel Stenberg, , et al. -# -# This software is licensed as described in the file COPYING, which -# you should have received as part of this distribution. The terms -# are also available at https://curl.se/docs/copyright.html. -# -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the COPYING file. -# -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. -# -# SPDX-License-Identifier: curl -# -########################################################################### - -# https://ci.appveyor.com/project/curlorg/curl/history -# AppVeyor configuration: -# https://www.appveyor.com/docs/appveyor-yml/ -# AppVeyor worker images: -# https://www.appveyor.com/docs/windows-images-software/ - -version: 7.50.0.{build} - -environment: - matrix: - # CMake Visual Studio builds - - - job_name: 'CM VS2022, Release, x64, OpenSSL 3.5, Shared, Build-tests' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' - CMAKE_GENERATOR: 'Visual Studio 17 2022' - CMAKE_GENERATE: '-A x64 -DCURL_USE_SCHANNEL=OFF -DCURL_USE_OPENSSL=ON' - - - job_name: 'CM VS2022, Release, arm64, Schannel, Static, !DEBUGBUILD, Build-tests' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' - CMAKE_GENERATOR: 'Visual Studio 17 2022' - CMAKE_GENERATE: '-A ARM64 -DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=OFF' - - - job_name: 'CM VS2010, Debug, x64, Schannel, Shared, Build-tests & examples' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' - CMAKE_VERSION: 3.18.4 - CMAKE_SHA256: a932bc0c8ee79f1003204466c525b38a840424d4ae29f9e5fb88959116f2407d - CMAKE_GENERATOR: 'Visual Studio 10 2010' - CMAKE_GENERATE: '-A x64' - - - job_name: 'CM VS2012, Release, x86, Schannel, Shared, Build-tests' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' - CMAKE_VERSION: 3.21.7 - CMAKE_SHA256: 4c4840e2dc2bf82e8a16081ff506bba54f3a228b91ce36317129fed4035ef2e3 - CMAKE_GENERATOR: 'Visual Studio 11 2012' - CMAKE_GENERATE: '-A Win32' - - - job_name: 'CM VS2013, Debug, x64, Schannel, Shared' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' - CMAKE_VERSION: 3.18.4 - CMAKE_SHA256: a932bc0c8ee79f1003204466c525b38a840424d4ae29f9e5fb88959116f2407d - CMAKE_GENERATOR: 'Visual Studio 12 2013' - CMAKE_GENERATE: '-A x64' - - - job_name: 'CM VS2015, Debug, x64, Schannel, Static' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' - CMAKE_VERSION: 3.19.8 - CMAKE_SHA256: 2a30877a3d6b50da305b289f4d1c03befdfaeb2edba02a563c681e883d810380 - CMAKE_GENERATOR: 'Visual Studio 14 2015' - CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF' - - - job_name: 'CM VS2017, Debug, x64, Schannel, Shared' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017' - CMAKE_VERSION: 3.20.6 - CMAKE_SHA256: f240a38c964712aac474644b3ba21bdc2b4e8d5e31179f67bd2e6f45fa349419 - CMAKE_GENERATOR: 'Visual Studio 15 2017' - CMAKE_GENERATE: '-A x64' - - - job_name: 'CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019' - CMAKE_GENERATOR: 'Visual Studio 16 2019' - CMAKE_GENERATE: '-A x64 -DCURL_USE_OPENSSL=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON' - - - job_name: 'CM VS2022, Debug, x64, OpenSSL 3.5 + Schannel, Static, Unicode, Build-tests & examples, clang-cl' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' - CMAKE_GENERATOR: 'Visual Studio 17 2022' - CMAKE_GENERATE: '-A x64 -T ClangCl -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=ON' - - - job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, !DEBUGBUILD, Build-tests' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' - CMAKE_GENERATOR: 'Visual Studio 17 2022' - ENABLE_UNICODE: 'ON' - CMAKE_GENERATE: '-A x64 -DENABLE_UNICODE=ON -DENABLE_DEBUG=OFF' - - - job_name: 'CM VS2022, Debug, x64, !ssl, Static, Build-tests' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' - CMAKE_GENERATOR: 'Visual Studio 17 2022' - CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=OFF' - - - job_name: 'CM VS2022, Debug, x64, !ssl, Static, HTTP-only, Build-tests' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022' - CMAKE_GENERATOR: 'Visual Studio 17 2022' - CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=OFF -DHTTP_ONLY=ON' - - # VisualStudioSolution builds - - - job_name: 'VisualStudioSolution VS2010, Release, x86, Schannel' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2013' - PRJ_CFG: 'DLL Release - DLL Windows SSPI - DLL WinIDN' - PLAT: 'Win32' - VC_VERSION: VC10 - - - job_name: 'VisualStudioSolution VS2013, Debug, x64, Schannel' - APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015' - PRJ_CFG: 'DLL Debug - DLL Windows SSPI - DLL WinIDN' - PLAT: 'x64' - VC_VERSION: VC12 - -install: - - ps: $env:PATH = "C:/msys64/usr/bin;$env:PATH" - -build_script: - - cmd: sh -c ./appveyor.sh - -clone_depth: 10 - -# select branches to avoid testing feature branches twice (as branch and as pull request) -branches: - only: - - master - - /\/ci$/ - -skip_commits: - files: - - '.circleci/*' - - '.github/**/*' - - 'Dockerfile' - - 'projects/OS400/*' - - 'projects/vms/*' - -#artifacts: -# - path: '**/curl.exe' -# name: curl -# - path: '**/*.dll' -# name: libcurl dll -# - path: '**/*.lib' -# name: libcurl lib