diff options
author | merge-script <fanquake@gmail.com> | 2024-09-12 09:54:20 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-09-12 09:54:20 +0100 |
commit | f0eb63399a8f4b9d6329cc827e12e96d1ed3c8f5 (patch) | |
tree | 17fb37a30992c0cc66cbd413cda03d596fe1982e | |
parent | 155963768af6ad99f3a0851a69f90e6b67c24bf3 (diff) | |
parent | c45186ca548362b75a6640393ccf79b11ff727da (diff) | |
download | bitcoin-f0eb63399a8f4b9d6329cc827e12e96d1ed3c8f5.tar.xz |
Merge bitcoin/bitcoin#30841: ci: Post CMake-migration fixes and amendments
c45186ca548362b75a6640393ccf79b11ff727da ci: Switch from `make` to `cmake --build` (Hennadii Stepanov)
6e5f33af581e0a74897a6cc9fad558b29ad8b88e ci: Handle log files regardless of CMake's version (Hennadii Stepanov)
Pull request description:
This PR addresses the change in logging that [happened](https://cmake.org/cmake/help/latest/release/3.26.html#configure-log) in CMake 3.26.
Additionally, the `make` invocation replaced with `cmake --build`.
Here are examples of the CI logs:
- for a an error during the build system generation: https://cirrus-ci.com/build/5210987156996096
- for a compiler error: https://cirrus-ci.com/build/4617660913156096
ACKs for top commit:
maflcko:
review ACK c45186ca548362b75a6640393ccf79b11ff727da
fanquake:
ACK c45186ca548362b75a6640393ccf79b11ff727da
Tree-SHA512: 2096f08c482ab9e10056cd4ec694ce40996243e2a1af2212dfff8cccbf0f51391d9a3dc396f7bba4f2877072a13a42bf667a02a44eab44e917aafb14d04e8e39
-rwxr-xr-x | ci/test/03_test_script.sh | 4 | ||||
-rw-r--r-- | ci/test/GetCMakeLogFiles.cmake | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index eebdfbc9e5..7ee424ac9b 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -121,9 +121,9 @@ if [[ "${RUN_TIDY}" == "true" ]]; then BITCOIN_CONFIG_ALL="$BITCOIN_CONFIG_ALL -DCMAKE_EXPORT_COMPILE_COMMANDS=ON" fi -bash -c "cmake -S $BASE_ROOT_DIR $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (cat CMakeFiles/CMakeOutput.log CMakeFiles/CMakeError.log) && false)" +bash -c "cmake -S $BASE_ROOT_DIR $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( (cat $(cmake -P "${BASE_ROOT_DIR}/ci/test/GetCMakeLogFiles.cmake")) && false)" -bash -c "make $MAKEJOBS all $GOAL" || ( echo "Build failure. Verbose build follows." && make all "$GOAL" V=1 ; false ) +bash -c "cmake --build . $MAKEJOBS --target all $GOAL" || ( echo "Build failure. Verbose build follows." && cmake --build . --target all "$GOAL" --verbose ; false ) bash -c "${PRINT_CCACHE_STATISTICS}" du -sh "${DEPENDS_DIR}"/*/ diff --git a/ci/test/GetCMakeLogFiles.cmake b/ci/test/GetCMakeLogFiles.cmake new file mode 100644 index 0000000000..80f71dcf63 --- /dev/null +++ b/ci/test/GetCMakeLogFiles.cmake @@ -0,0 +1,11 @@ +# Copyright (c) 2024-present The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or https://opensource.org/license/mit/. + +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.26) + set(log_files "CMakeFiles/CMakeConfigureLog.yaml") +else() + set(log_files "CMakeFiles/CMakeOutput.log CMakeFiles/CMakeError.log") +endif() + +execute_process(COMMAND ${CMAKE_COMMAND} -E echo ${log_files}) |