From 7bff686476d6f06d2298a0b57dc60034ee61b27f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 11 Oct 2024 13:40:48 +0200 Subject: [PATCH] ci: dump `curl_config.h` to log in all jobs Also: - GHA/windows: merge full and brief dump into a single job step. - fix shellcheck warning 'useless cat'. Closes #15266 --- .github/workflows/http3-linux.yml | 2 +- .github/workflows/linux-old.yml | 15 ++++++++ .github/workflows/linux.yml | 2 +- .github/workflows/linux32.yml | 5 +++ .github/workflows/macos.yml | 6 ++-- .github/workflows/non-native.yml | 10 ++++++ .github/workflows/torture.yml | 5 +++ .github/workflows/windows.yml | 58 ++++++++++++++++--------------- appveyor.sh | 1 + 9 files changed, 71 insertions(+), 33 deletions(-) diff --git a/.github/workflows/http3-linux.yml b/.github/workflows/http3-linux.yml index 508b4457a5..ffabc0fc9c 100644 --- a/.github/workflows/http3-linux.yml +++ b/.github/workflows/http3-linux.yml @@ -501,7 +501,7 @@ jobs: - name: 'curl_config.h' run: | echo '::group::raw'; cat lib/curl_config.h || true; echo '::endgroup::' - cat lib/curl_config.h | grep -F '#define' | sort || true + grep -F '#define' lib/curl_config.h | sort || true - name: 'test configs' run: | diff --git a/.github/workflows/linux-old.yml b/.github/workflows/linux-old.yml index 4a7a361a01..89e97c6530 100644 --- a/.github/workflows/linux-old.yml +++ b/.github/workflows/linux-old.yml @@ -84,6 +84,11 @@ jobs: make install src/curl --disable --version + - name: 'cmake build-only curl_config.h' + run: | + echo '::group::raw'; cat bld-1/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld-1/lib/curl_config.h | sort || true + - name: 'cmake generate (out-of-tree, c-ares, libssh, zstd, gssapi)' run: | mkdir bld-cares @@ -92,6 +97,11 @@ jobs: -DENABLE_ARES=ON -DCURL_ZSTD=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON -DUSE_LIBRTMP=ON \ -DCURL_LIBCURL_VERSIONED_SYMBOLS=ON + - name: 'cmake curl_config.h' + run: | + echo '::group::raw'; cat bld-cares/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld-cares/lib/curl_config.h | sort || true + - name: 'cmake build' run: | make -C bld-cares @@ -117,6 +127,11 @@ jobs: --with-openssl --enable-ares --with-libssh --with-zstd --with-gssapi --with-librtmp \ --prefix="$PWD"/../install-am + - name: 'autoconf curl_config.h' + run: | + echo '::group::raw'; cat bld-am/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld-am/lib/curl_config.h | sort || true + - name: 'autoconf build' run: | make -C bld-am diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6ed72f6070..a6952d9094 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -610,7 +610,7 @@ jobs: - name: 'curl_config.h' run: | echo '::group::raw'; cat lib/curl_config.h || true; echo '::endgroup::' - cat lib/curl_config.h | grep -F '#define' | sort || true + grep -F '#define' lib/curl_config.h | sort || true - name: 'test configs' run: | diff --git a/.github/workflows/linux32.yml b/.github/workflows/linux32.yml index 9e8ce07b6c..888f3a0d67 100644 --- a/.github/workflows/linux32.yml +++ b/.github/workflows/linux32.yml @@ -74,6 +74,11 @@ jobs: ${{ matrix.build.configure }} name: 'configure' + - name: 'curl_config.h' + run: | + echo '::group::raw'; cat lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' lib/curl_config.h | sort || true + - run: make V=1 name: 'make' diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ffc8844365..9a584ff4cc 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -205,7 +205,7 @@ jobs: - name: 'curl_config.h' run: | echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - cat bld/lib/curl_config.h | grep -F '#define' | sort || true + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'build-cert' if: contains(matrix.configure, '--with-secure-transport') @@ -363,7 +363,7 @@ jobs: - name: 'curl_config.h' run: | echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - cat bld/lib/curl_config.h | grep -F '#define' | sort || true + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'build-cert' if: contains(matrix.build.generate, '-DCURL_USE_SECTRANSP=ON') @@ -643,7 +643,7 @@ jobs: - name: 'curl_config.h' run: | echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' - cat bld/lib/curl_config.h | grep -F '#define' | sort || true + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'build / ${{ matrix.build }}' run: make -C bld V=1 VERBOSE=1 diff --git a/.github/workflows/non-native.yml b/.github/workflows/non-native.yml index 4eab31c9bc..30037a575e 100644 --- a/.github/workflows/non-native.yml +++ b/.github/workflows/non-native.yml @@ -61,6 +61,8 @@ jobs: -DCURL_USE_OPENSSL=ON \ -DCURL_BROTLI=ON -DCURL_USE_GSSAPI=ON \ || { cat bld/CMakeFiles/CMake*.yaml; false; } + echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' cmake --build bld --config Debug bld/src/curl --disable --version if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU @@ -97,6 +99,8 @@ jobs: -DCURL_USE_OPENSSL=ON \ -DCURL_BROTLI=ON \ || { cat bld/CMakeFiles/CMake*.yaml; false; } + echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' cmake --build bld --config Debug bld/src/curl --disable --version if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU @@ -139,6 +143,8 @@ jobs: --with-openssl \ --with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \ --disable-dependency-tracking || { tail -n 1000 config.log; false; } + echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::' + echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::' make -j3 install src/curl --disable --version if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU @@ -168,6 +174,8 @@ jobs: -DCURL_USE_OPENSSL=ON \ -DCURL_BROTLI=ON -DCURL_USE_GSSAPI=ON \ || { cat bld/CMakeFiles/CMake*.yaml; false; } + echo '::group::curl_config.h (raw)'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + echo '::group::curl_config.h'; grep -F '#define' bld/lib/curl_config.h | sort || true; echo '::endgroup::' cmake --build bld --config Debug bld/src/curl --disable --version if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU @@ -198,6 +206,8 @@ jobs: --prefix="${HOME}"/install \ --with-openssl \ --disable-dependency-tracking || { tail -n 1000 config.log; false; } + echo '::group::curl_config.h (raw)'; cat lib/curl_config.h || true; echo '::endgroup::' + echo '::group::curl_config.h'; grep -F '#define' lib/curl_config.h | sort || true; echo '::endgroup::' gmake -j3 install src/curl --disable --version gmake -j3 -C tests diff --git a/.github/workflows/torture.yml b/.github/workflows/torture.yml index 6a5b030364..1798eefb1b 100644 --- a/.github/workflows/torture.yml +++ b/.github/workflows/torture.yml @@ -72,6 +72,11 @@ jobs: ${{ matrix.build.generate }} name: 'cmake configure' + - name: 'cmake curl_config.h' + run: | + echo '::group::raw'; cat lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' lib/curl_config.h | sort || true + - run: cmake --build . --verbose name: 'cmake build' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4626a0bf82..0410ca9ed0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -94,11 +94,9 @@ jobs: - name: 'curl_config.h' if: ${{ matrix.build == 'automake' }} - run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true - - - name: 'curl_config.h (full)' - if: ${{ matrix.build == 'automake' }} - run: cat bld/lib/curl_config.h || true + run: | + echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'autotools build' if: ${{ matrix.build == 'automake' }} @@ -144,11 +142,9 @@ jobs: - name: 'curl_config.h' if: ${{ matrix.build == 'cmake' }} - run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true - - - name: 'curl_config.h (full)' - if: ${{ matrix.build == 'cmake' }} - run: cat bld/lib/curl_config.h || true + run: | + echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'cmake build' if: ${{ matrix.build == 'cmake' }} @@ -264,11 +260,9 @@ jobs: - name: 'curl_config.h' if: ${{ matrix.build == 'autotools' }} - run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true - - - name: 'curl_config.h (full)' - if: ${{ matrix.build == 'autotools' }} - run: cat bld/lib/curl_config.h || true + run: | + echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'autotools build' if: ${{ matrix.build == 'autotools' }} @@ -354,11 +348,9 @@ jobs: - name: 'curl_config.h' if: ${{ matrix.build == 'cmake' }} - run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true - - - name: 'curl_config.h (full)' - if: ${{ matrix.build == 'cmake' }} - run: cat bld/lib/curl_config.h || true + run: | + echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'cmake build' if: ${{ matrix.build == 'cmake' }} @@ -484,10 +476,9 @@ jobs: run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - name: 'curl_config.h' - run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true - - - name: 'curl_config.h (full)' - run: cat bld/lib/curl_config.h || true + run: | + echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'cmake build' timeout-minutes: 5 @@ -569,6 +560,12 @@ jobs: if: ${{ matrix.build == 'autotools' && !cancelled() }} run: cat bld/config.log 2>/dev/null || true + - name: 'curl_config.h' + if: ${{ matrix.build == 'autotools' }} + run: | + echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld/lib/curl_config.h | sort || true + - name: 'autotools build' if: ${{ matrix.build == 'autotools' }} run: make -C bld -j5 @@ -593,6 +590,12 @@ jobs: if: ${{ matrix.build == 'cmake' && !cancelled() }} run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true + - name: 'curl_config.h' + if: ${{ matrix.build == 'cmake' }} + run: | + echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld/lib/curl_config.h | sort || true + - name: 'cmake build' if: ${{ matrix.build == 'cmake' }} run: cmake --build bld @@ -763,10 +766,9 @@ jobs: run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true - name: 'curl_config.h' - run: cat bld/lib/curl_config.h | grep -F '#define' | sort || true - - - name: 'curl_config.h (full)' - run: cat bld/lib/curl_config.h || true + run: | + echo '::group::raw'; cat bld/lib/curl_config.h || true; echo '::endgroup::' + grep -F '#define' bld/lib/curl_config.h | sort || true - name: 'cmake build' timeout-minutes: 5 diff --git a/appveyor.sh b/appveyor.sh index f9647f2817..4b95e8e10d 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -62,6 +62,7 @@ if [ "${BUILD_SYSTEM}" = 'CMake' ]; then '-DCMAKE_INSTALL_PREFIX=C:/curl' \ "-DCMAKE_BUILD_TYPE=${PRJ_CFG}" \ '-DCURL_USE_LIBPSL=OFF' + echo 'curl_config.h'; grep -F '#define' _bld/lib/curl_config.h | sort || true # shellcheck disable=SC2086 if ! cmake --build _bld --config "${PRJ_CFG}" --parallel 2 -- ${BUILD_OPT:-}; then if [ "${PRJ_GEN}" = 'Visual Studio 9 2008' ]; then -- 2.47.3