mirror of
https://github.com/curl/curl.git
synced 2026-08-13 02:30:52 +03:00
`pccritic` is available on the latest macOS runner revision (not every job runs get it yet), Cygwin, MSYS2/mingw-w64 (one job, others will follow on the next msys2/setup-msys2 Action bump). It will be automatically used on BSDs, once they start offering it. Missing from Linux jobs. Also: - GHA/windows: convert `libcurl.pc` to Unix newlines to bump score 96 to 100 in mingw-w64 jobs. CMake-specific fix pending in: #22556 - GHA: verify with minimum `pccritic` score 94 to 100 (depending on CI job). - build: fill `Maintainer:` `libcurl.pc` property when run curl CI. Issues remaining: macOS: ``` [info ] Cflags adds an include path already on the default search path (pkgconf strips it): -I/usr/local/include (cflags/PC031) [info ] Libs adds a library path already on the default search path (pkgconf strips it): -L/usr/local/lib (libs/PC040) [minor ] Libs.private contains an unexpected flag: /Applications/Xcode_26.6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.5.sdk/System/Library/Frameworks/GSS.framework (libs/PC041) ``` Windows: ``` [minor ] file uses CRLF line endings (style/PC061) ``` Ref: #22556 Follow-up tob9254da617#22548 Follow-up to852f5d34da#22553 Follow-up to4d9ba9fef4#22545 Follow-up to6c7993d4d9#22536 Follow-up to3f1c033afe#22519 Closes #22543
202 lines
7.1 KiB
YAML
202 lines
7.1 KiB
YAML
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, 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: {}
|
|
|
|
env:
|
|
CURL_CI: github
|
|
DO_NOT_TRACK: '1'
|
|
HOMEBREW_NO_INSTALL_CLEANUP: '1'
|
|
|
|
jobs:
|
|
check-linux:
|
|
name: 'Linux'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: 'run configure --with-openssl'
|
|
run: |
|
|
autoreconf -fi
|
|
echo '::group::configure --help output'; ./configure --help; echo '::endgroup::'
|
|
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: 'generated libcurl.pc 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 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: 'run configure --with-openssl'
|
|
run: |
|
|
autoreconf -fi
|
|
echo '::group::configure --help output'; ./configure --help; echo '::endgroup::'
|
|
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: 'generated libcurl.pc 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
|
|
pccritic --version
|
|
pccritic --min-score 98 bld-am/libcurl.pc
|
|
pccritic --min-score 98 bld-cm/libcurl.pc
|
|
|
|
- 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-26.04
|
|
env:
|
|
TRIPLET: 'x86_64-w64-mingw32'
|
|
steps:
|
|
- name: 'install packages'
|
|
timeout-minutes: 1
|
|
run: |
|
|
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
|
sudo sed -i 's/priority:1/priority:9/' /etc/apt/apt-mirrors.txt; cat /etc/apt/apt-mirrors.txt
|
|
sudo apt-get -o Dpkg::Use-Pty=0 update
|
|
sudo apt-get -o Dpkg::Use-Pty=0 install gcc-mingw-w64-x86-64-win32
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: 'run configure --with-schannel'
|
|
run: |
|
|
autoreconf -fi
|
|
echo '::group::configure --help output'; ./configure --help; echo '::endgroup::'
|
|
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: 'generated libcurl.pc 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
|