GHA: show cmake error log in Windows and non-native workflows

CMake configure doesn't fail often, but when it does, it helps to see
its `CMakeFiles/CMakeConfigureLog.yaml` output. This file is present
since CMake v3.26:
  https://cmake.org/cmake/help/v3.26/manual/cmake-configure-log.7.html

(Older CMake versions save similar contend to
`CMakeFiles\CMakeOutput.log` and
`CMakeFiles\CMakeError.log`. This patch doesn't deal with that because
the workflows touched are all running a newer CMake.)

After this patch, we dump the content if cmake fails. Syncing this with
autotools, where we already did that.

Closes #13872
This commit is contained in:
Viktor Szakats 2024-06-04 02:46:05 +02:00
parent 23640dcf12
commit 97e5e37cc8
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
2 changed files with 10 additions and 7 deletions

View File

@ -65,7 +65,8 @@ jobs:
-DBUILD_EXAMPLES=ON \
-DENABLE_WEBSOCKETS=ON \
-DCURL_USE_OPENSSL=ON \
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DCURL_USE_GSSAPI=ON
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DCURL_USE_GSSAPI=ON \
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
cmake --build bld --config Debug --parallel 3
"$(pwd)/bld/src/curl" --disable --version
if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
@ -98,7 +99,8 @@ jobs:
-DBUILD_EXAMPLES=ON \
-DENABLE_WEBSOCKETS=ON \
-DCURL_USE_OPENSSL=ON \
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON \
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
cmake --build bld --config Debug --parallel 3
"$(pwd)/bld/src/curl" --disable --version
if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU
@ -163,7 +165,8 @@ jobs:
-DBUILD_EXAMPLES=ON \
-DENABLE_WEBSOCKETS=ON \
-DCURL_USE_OPENSSL=ON \
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DCURL_USE_GSSAPI=ON
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DCURL_USE_GSSAPI=ON \
|| { cat bld/CMakeFiles/CMake*.yaml; false; }
cmake --build bld --config Debug --parallel 3
bld/src/curl --disable --version
if [ '${{ matrix.arch }}' = 'x86_64' ]; then # Slow on emulated CPU

View File

@ -124,7 +124,7 @@ jobs:
-DBUILD_EXAMPLES=ON \
-DENABLE_WEBSOCKETS=ON \
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON \
${{ matrix.config }}
${{ matrix.config }} || { cat bld/CMakeFiles/CMake*.yaml; false; }
- name: 'cmake build'
if: ${{ matrix.build == 'cmake' }}
@ -272,7 +272,7 @@ jobs:
-DBUILD_EXAMPLES=ON \
-DENABLE_WEBSOCKETS=ON \
-DCURL_BROTLI=ON -DUSE_NGHTTP2=ON \
${{ matrix.config }}
${{ matrix.config }} || { cat bld/CMakeFiles/CMake*.yaml; false; }
- name: 'cmake build'
if: ${{ matrix.build == 'cmake' }}
@ -375,7 +375,7 @@ jobs:
-DCURL_WERROR=ON \
-DBUILD_EXAMPLES=ON \
-DENABLE_WEBSOCKETS=ON \
${{ matrix.config }}
${{ matrix.config }} || { cat bld/CMakeFiles/CMake*.yaml; false; }
- name: 'cmake build'
if: ${{ matrix.build == 'cmake' }}
@ -447,7 +447,7 @@ jobs:
-DCURL_WERROR=ON \
-DBUILD_EXAMPLES=ON \
-DENABLE_WEBSOCKETS=ON \
${{ matrix.config }}
${{ matrix.config }} || { cat bld/CMakeFiles/CMake*.yaml; false; }
- name: 'cmake build'
timeout-minutes: 5