Merge bitcoin/bitcoin#33823: ci: Use cmake --preset=dev-mode in test-each-commit task

fa6db67369fbf9b9f0ec839b898edd7ba8bfe31a ci: [refactor] Extract build_dir constant in ci-test-each-commit-exec.py (MarcoFalke)
fa95e6cdc1c5f85b57b295e19f248f3db4187cfd ci: Use cmake --preset=dev-mode in test-each-commit task (MarcoFalke)

Pull request description:

  Using the preset should reduce the bloat and need to maintain several places to list the same cmake cache variables.

  The only difference should be that `bitcoin-chainstate (experimental)` will be enabled, which seems fast and in line with the goal of the CI task.

  * Before: https://github.com/bitcoin/bitcoin/actions/runs/19174075826/job/54814118651#step:8:315
  * After: (this pull) https://github.com/bitcoin/bitcoin/actions/runs/19190748069/job/54864837086#step:7:324

  ```diff
     bitcoin-tx .......................... ON
     bitcoin-util ........................ ON
     bitcoin-wallet ...................... ON
  -  bitcoin-chainstate (experimental) ... OFF
  +  bitcoin-chainstate (experimental) ... ON
     libbitcoinkernel (experimental) ..... ON
     kernel-test (experimental) .......... ON
   Optional features:

ACKs for top commit:
  hebasto:
    ACK fa6db67369fbf9b9f0ec839b898edd7ba8bfe31a, I have reviewed the code and it looks OK.

Tree-SHA512: 61a78de7bcbf42bd266cb035f354862f5d1e1235acd2a81041e3a68a4d3ab4703fa2cfc993f28e4dacaa74e3cccc9ef568d5d4526605ce5a00bcd7c347b97121
This commit is contained in:
merge-script 2025-11-10 10:09:40 +00:00
commit 035f934e02
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

@ -21,11 +21,12 @@ def main():
run(["git", "log", "-1"])
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
build_dir = "ci_build"
run([
"cmake",
"-B",
"build",
build_dir,
"-Werror=dev",
# Use clang++, because it is a bit faster and uses less memory than g++
"-DCMAKE_C_COMPILER=clang",
@ -37,28 +38,23 @@ def main():
"-DAPPEND_CFLAGS='-O3 -g2'",
"-DCMAKE_BUILD_TYPE=Debug",
"-DWERROR=ON",
"-DWITH_ZMQ=ON",
"-DBUILD_GUI=ON",
"-DBUILD_BENCH=ON",
"-DBUILD_FUZZ_BINARY=ON",
"-DWITH_USDT=ON",
"-DBUILD_KERNEL_LIB=ON",
"-DBUILD_KERNEL_TEST=ON",
"--preset=dev-mode",
# Tolerate unused member functions in intermediate commits in a pull request
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
])
run(["cmake", "--build", "build", "-j", str(num_procs)])
run(["cmake", "--build", build_dir, "-j", str(num_procs)])
run([
"ctest",
"--output-on-failure",
"--stop-on-failure",
"--test-dir",
"build",
build_dir,
"-j",
str(num_procs),
])
run([
sys.executable,
"./build/test/functional/test_runner.py",
f"./{build_dir}/test/functional/test_runner.py",
"-j",
str(num_procs * 2),
"--combinedlogslen=99999999",