Merge bitcoin/bitcoin#33823: ci: Use cmake --preset=dev-mode in test-each-commit task
fa6db67369ci: [refactor] Extract build_dir constant in ci-test-each-commit-exec.py (MarcoFalke)fa95e6cdc1ci: 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: ACKfa6db67369, I have reviewed the code and it looks OK. Tree-SHA512: 61a78de7bcbf42bd266cb035f354862f5d1e1235acd2a81041e3a68a4d3ab4703fa2cfc993f28e4dacaa74e3cccc9ef568d5d4526605ce5a00bcd7c347b97121
This commit is contained in:
1 file changed
+7
-11
@@ -21,11 +21,12 @@ def main():
|
|||||||
run(["git", "log", "-1"])
|
run(["git", "log", "-1"])
|
||||||
|
|
||||||
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
|
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
|
||||||
|
build_dir = "ci_build"
|
||||||
|
|
||||||
run([
|
run([
|
||||||
"cmake",
|
"cmake",
|
||||||
"-B",
|
"-B",
|
||||||
"build",
|
build_dir,
|
||||||
"-Werror=dev",
|
"-Werror=dev",
|
||||||
# Use clang++, because it is a bit faster and uses less memory than g++
|
# Use clang++, because it is a bit faster and uses less memory than g++
|
||||||
"-DCMAKE_C_COMPILER=clang",
|
"-DCMAKE_C_COMPILER=clang",
|
||||||
@@ -37,28 +38,23 @@ def main():
|
|||||||
"-DAPPEND_CFLAGS='-O3 -g2'",
|
"-DAPPEND_CFLAGS='-O3 -g2'",
|
||||||
"-DCMAKE_BUILD_TYPE=Debug",
|
"-DCMAKE_BUILD_TYPE=Debug",
|
||||||
"-DWERROR=ON",
|
"-DWERROR=ON",
|
||||||
"-DWITH_ZMQ=ON",
|
"--preset=dev-mode",
|
||||||
"-DBUILD_GUI=ON",
|
# Tolerate unused member functions in intermediate commits in a pull request
|
||||||
"-DBUILD_BENCH=ON",
|
|
||||||
"-DBUILD_FUZZ_BINARY=ON",
|
|
||||||
"-DWITH_USDT=ON",
|
|
||||||
"-DBUILD_KERNEL_LIB=ON",
|
|
||||||
"-DBUILD_KERNEL_TEST=ON",
|
|
||||||
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
|
"-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([
|
run([
|
||||||
"ctest",
|
"ctest",
|
||||||
"--output-on-failure",
|
"--output-on-failure",
|
||||||
"--stop-on-failure",
|
"--stop-on-failure",
|
||||||
"--test-dir",
|
"--test-dir",
|
||||||
"build",
|
build_dir,
|
||||||
"-j",
|
"-j",
|
||||||
str(num_procs),
|
str(num_procs),
|
||||||
])
|
])
|
||||||
run([
|
run([
|
||||||
sys.executable,
|
sys.executable,
|
||||||
"./build/test/functional/test_runner.py",
|
f"./{build_dir}/test/functional/test_runner.py",
|
||||||
"-j",
|
"-j",
|
||||||
str(num_procs * 2),
|
str(num_procs * 2),
|
||||||
"--combinedlogslen=99999999",
|
"--combinedlogslen=99999999",
|
||||||
|
|||||||
Reference in new issue
Block a user