ci: Print verbose build error message in test-each-commit
What changed, and why it matters
This is a small change to a CI (continuous integration) helper script. It makes build failures easier to diagnose by automatically re-running the build with verbose output if the first build fails. There is no security issue here.
No security action needed. This is a normal CI maintainability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies .github/ci-test-each-commit-exec.py so that cmake --build is invoked with check=False. If the build returns a non-zero exit code, the script prints a message and re-runs the build single-threaded (-j1) with --verbose to aid debugging. This is purely a CI diagnostics improvement; it does not change Bitcoin Core’s build logic, consensus code, networking, or any runtime behavior.
Changed components
.github/ci-test-each-commit-exec.pyInspect captured patch +5 / −1
diff --git a/.github/ci-test-each-commit-exec.py b/.github/ci-test-each-commit-exec.py
index c8ec16ef..fcd3bbdb 100755
--- a/.github/ci-test-each-commit-exec.py
+++ b/.github/ci-test-each-commit-exec.py
@@ -43,7 +43,11 @@ def main():
# Tolerate unused member functions in intermediate commits in a pull request
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
])
- run(["cmake", "--build", build_dir, "-j", str(num_procs)])
+
+ if run(["cmake", "--build", build_dir, "-j", str(num_procs)], check=False).returncode != 0:
+ print("Build failure. Verbose build follows.")
+ run(["cmake", "--build", build_dir, "-j1", "--verbose"])
+
run([
"ctest",
"--output-on-failure",
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.