CI: dump `libcurl.pc` (and `curl-config`) to log, verify `.pc` with `pccritic` tool
No binary (build failed)
—
(log yok)
| @@ -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::' | |
| @@ -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 | |
| @@ -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 | |
| @@ -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 | |
| @@ -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 | |
| @@ -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-@[email protected] | |
| Requires: @LIBCURL_PC_REQUIRES@ | |