mirror of
https://github.com/curl/curl.git
synced 2026-08-25 13:03:37 +03:00
CI: dump libcurl.pc (and curl-config) to log, verify .pc with pccritic tool
`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
This commit is contained in:
parent
852f5d34da
commit
943ac04fc4
10 changed files with 102 additions and 11 deletions
10
.github/workflows/configure-vs-cmake.yml
vendored
10
.github/workflows/configure-vs-cmake.yml
vendored
|
|
@ -37,6 +37,7 @@ concurrency:
|
|||
permissions: {}
|
||||
|
||||
env:
|
||||
CURL_CI: github
|
||||
DO_NOT_TRACK: '1'
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: '1'
|
||||
|
||||
|
|
@ -65,7 +66,7 @@ jobs:
|
|||
- name: 'cmake log'
|
||||
run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'dump generated files'
|
||||
- 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::'
|
||||
|
|
@ -127,12 +128,15 @@ jobs:
|
|||
- name: 'cmake log'
|
||||
run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'dump generated files'
|
||||
- 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
|
||||
|
|
@ -181,7 +185,7 @@ jobs:
|
|||
- name: 'cmake log'
|
||||
run: cat bld-cm/CMakeFiles/CMakeConfigureLog.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'dump generated files'
|
||||
- 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::'
|
||||
|
|
|
|||
6
.github/workflows/http3-linux.yml
vendored
6
.github/workflows/http3-linux.yml
vendored
|
|
@ -815,6 +815,12 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'test configs'
|
||||
run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true
|
||||
|
||||
|
|
|
|||
6
.github/workflows/linux.yml
vendored
6
.github/workflows/linux.yml
vendored
|
|
@ -886,6 +886,12 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'test configs'
|
||||
run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true
|
||||
|
||||
|
|
|
|||
30
.github/workflows/macos.yml
vendored
30
.github/workflows/macos.yml
vendored
|
|
@ -181,6 +181,16 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
if command -v pccritic >/dev/null 2>&1; then
|
||||
pccritic --version
|
||||
pccritic --min-score 98 bld/libcurl.pc
|
||||
fi
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
|
|
@ -511,6 +521,16 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
if command -v pccritic >/dev/null 2>&1; then
|
||||
pccritic --version
|
||||
pccritic --min-score 96 bld/libcurl.pc
|
||||
fi
|
||||
|
||||
- name: 'test configs'
|
||||
run: grep -H -v '^#' bld/tests/config bld/tests/http/config.ini || true
|
||||
|
||||
|
|
@ -774,6 +794,16 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
if command -v pccritic >/dev/null 2>&1; then
|
||||
pccritic --version
|
||||
pccritic --min-score 94 bld/libcurl.pc
|
||||
fi
|
||||
|
||||
- name: 'build / ${{ matrix.build }}'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
|
|
|
|||
34
.github/workflows/non-native.yml
vendored
34
.github/workflows/non-native.yml
vendored
|
|
@ -183,6 +183,16 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
if command -v pccritic >/dev/null 2>&1; then
|
||||
pccritic --version
|
||||
pccritic --min-score 98 bld/libcurl.pc
|
||||
fi
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
|
|
@ -315,6 +325,12 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
|
|
@ -407,17 +423,17 @@ jobs:
|
|||
if: ${{ !cancelled() }}
|
||||
run: cat bld/config.log bld/CMakeFiles/CMake*.yaml 2>/dev/null || true
|
||||
|
||||
- name: 'dump config files'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- 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: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
|
|
@ -533,6 +549,12 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'build'
|
||||
run: |
|
||||
if [ "${MATRIX_BUILD}" = 'cmake' ]; then
|
||||
|
|
|
|||
16
.github/workflows/windows.yml
vendored
16
.github/workflows/windows.yml
vendored
|
|
@ -105,7 +105,7 @@ jobs:
|
|||
# https://cygwin.com/cgi-bin2/package-grep.cgi
|
||||
packages: >-
|
||||
${{ matrix.build == 'autotools' && 'autoconf automake libtool make' || 'cmake ninja' }}
|
||||
gcc-core binutils perl
|
||||
gcc-core binutils perl pkgconf
|
||||
openssh
|
||||
libpsl-devel
|
||||
zlib-devel
|
||||
|
|
@ -161,6 +161,8 @@ jobs:
|
|||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
pccritic --version
|
||||
pccritic --min-score 100 bld/libcurl.pc
|
||||
|
||||
- name: 'build'
|
||||
timeout-minutes: 10
|
||||
|
|
@ -423,13 +425,17 @@ jobs:
|
|||
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: 'libcurl.pc, curl-config, cmake_install.cmake'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config cmake_install.cmake; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
if command -v pccritic >/dev/null 2>&1; then
|
||||
sed -i.bak 's/\x0d//g' bld/libcurl.pc # to suppress pccritic warning: style/PC061
|
||||
pccritic --version
|
||||
pccritic --min-score 100 bld/libcurl.pc
|
||||
fi
|
||||
|
||||
- name: 'build'
|
||||
timeout-minutes: 10
|
||||
|
|
@ -1128,6 +1134,12 @@ jobs:
|
|||
echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::'
|
||||
grep -F '#define' bld/lib/curl_config.h | sort || true
|
||||
|
||||
- name: 'libcurl.pc, curl-config'
|
||||
run: |
|
||||
for f in libcurl.pc curl-config; do
|
||||
echo "::group::${f}"; grep -v '^#' bld/"${f}" || true; echo '::endgroup::'
|
||||
done
|
||||
|
||||
- name: 'build'
|
||||
timeout-minutes: 5
|
||||
run: cmake --build bld --config "${MATRIX_TYPE}" --parallel 5
|
||||
|
|
|
|||
|
|
@ -2341,6 +2341,7 @@ if(NOT CURL_DISABLE_INSTALL)
|
|||
|
||||
# Generate a pkg-config file matching this config.
|
||||
# Consumed variables:
|
||||
# CURL_PACKAGE_MAINTAINER
|
||||
# CURLVERSION
|
||||
# exec_prefix
|
||||
# includedir
|
||||
|
|
@ -2360,6 +2361,9 @@ if(NOT CURL_DISABLE_INSTALL)
|
|||
# https://manpages.debian.org/unstable/pkgconf/pkg-config.1.en.html
|
||||
# https://manpages.debian.org/unstable/pkg-config/pkg-config.1.en.html
|
||||
# https://www.msys2.org/docs/pkgconfig/
|
||||
if(NOT "$ENV{CURL_CI}" STREQUAL "")
|
||||
set(CURL_PACKAGE_MAINTAINER "https://curl.se/")
|
||||
endif()
|
||||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/libcurl.pc.in"
|
||||
"${PROJECT_BINARY_DIR}/libcurl.pc" @ONLY)
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ if [ -n "${CMAKE_GENERATOR:-}" ]; then
|
|||
false
|
||||
fi
|
||||
echo 'curl_config.h'; grep -F '#define' _bld/lib/curl_config.h | sort || true
|
||||
echo 'libcurl.pc'; grep -v '^#' '_bld/libcurl.pc' || true
|
||||
time cmake --build _bld --config "${PRJ_CFG}" --parallel 2
|
||||
[[ "${CMAKE_GENERATE:-}" != *'-DBUILD_SHARED_LIBS=OFF'* ]] && PATH="$(pwd)/_bld/lib/${PRJ_CFG}:$PATH"
|
||||
[[ "${CMAKE_GENERATE:-}" = *'-DCURL_USE_OPENSSL=ON'* ]] && { PATH="${openssl_root}:$PATH"; cp "${openssl_root}"/*.dll "_bld/src/${PRJ_CFG}"; }
|
||||
|
|
|
|||
|
|
@ -5217,6 +5217,11 @@ fi
|
|||
AC_SUBST(LIBCURL_PC_REQUIRES)
|
||||
AC_SUBST(LIBCURL_PC_LIBS)
|
||||
|
||||
if test -n "$CURL_CI"; then
|
||||
CURL_PACKAGE_MAINTAINER=https://curl.se/
|
||||
AC_SUBST(CURL_PACKAGE_MAINTAINER)
|
||||
fi
|
||||
|
||||
rm "$compilersh"
|
||||
|
||||
dnl
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ Name: libcurl
|
|||
URL: https://curl.se/
|
||||
Description: Library to transfer files with HTTP, FTP, etc.
|
||||
License: curl
|
||||
Maintainer: @CURL_PACKAGE_MAINTAINER@
|
||||
Version: @CURLVERSION@
|
||||
Source: https://curl.se/download/curl-@CURLVERSION@.tar.gz
|
||||
Requires: @LIBCURL_PC_REQUIRES@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue