ci: Use optimized Debug build type in test-each-commit #32888
pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2507-ci-each-commit-debug changing 2 files +9 −3- 
  
  maflcko commented at 8:25 am on July 7, 2025: memberAn optimized debug build is mostly as fast as a release build, because hot loops of heavy debug-only code are rare. So use that setting in the test-each-commit CI, to enable more checks almost “for free”.
- 
    
    DrahtBot added the label Tests on Jul 7, 2025
- 
  
  DrahtBot commented at 8:25 am on July 7, 2025: contributorThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32888. ReviewsSee the guideline for information on the review process. Type Reviewers ACK Prabhat1308, willcl-ark If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones: - #31802 (Add bitcoin-{node,gui} to release binaries for IPC by Sjors)
 If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. 
- 
    
    maflcko force-pushed on Jul 7, 2025
- 
  
  Prabhat1308 commented at 12:04 pm on July 7, 2025: contributorACK fa21d3cchanges seem good as discussed in #32829 . Can we use moldas a linker in other Linux based system workflows ? dependencies we have seem to satisfy the deps here https://github.com/rui314/mold?tab=readme-ov-file#how-to-build
- 
  
  maflcko commented at 12:12 pm on July 7, 2025: memberCan we use moldas a linker in other Linux based system workflows ?Sure, happy to review a follow-up. Only place to avoid it would probably the ci tasks that mirror the guix build (win-cross, mac-cross) 
- 
  
  maflcko commented at 2:50 pm on July 7, 2025: memberNo,-gisn’t needed for the CI itself. It is only there for developers who happen to run this locally in a container and want to reproduce something in a debugger without having to modify the script and re-compile. Storage is cheap/free, so I thought it can’t hurt to have it, but no strong opinion. Anything should be fine for the setting.
- 
  
  maflcko commented at 8:51 am on July 8, 2025: memberTo provide some numbers that the new checks really are roughly for free: This ci run took 30min7sec(https://github.com/bitcoin/bitcoin/actions/runs/16112781421/job/45459901801?pr=32888)Previously (randomly last month) it took 30min14sec(https://github.com/bitcoin/bitcoin/pull/32680/checks)
- 
    
    DrahtBot added the label Needs rebase on Jul 11, 2025
- 
    
    ci: [doc] reword debug log message fa21c3401e
- 
    
    ci: Use optimized Debug build type in test-each-commit faa3171ff2
- 
    
    maflcko force-pushed on Jul 14, 2025
- 
  
  Prabhat1308 commented at 7:46 am on July 14, 2025: contributorre-ACKfaa3171
- 
    
    DrahtBot removed the label Needs rebase on Jul 14, 2025
- 
    
    maflcko requested review from willcl-ark on Jul 18, 2025
- 
  
  in .github/ci-test-each-commit-exec.py:38 in faa3171ff235+ # Use mold, because it is faster than the default linker 36+ "-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=mold", 37+ # Use Debug build type for more debug checks, but enable optimizations 38+ "-DAPPEND_CXXFLAGS='-O3 -g2'", 39+ "-DAPPEND_CFLAGS='-O3 -g2'", 40+ "-DCMAKE_BUILD_TYPE=Debug",
 
 willcl-ark commented at 2:24 pm on July 18, 2025:Is -03chosen here to try and counteract the slow-down fromDebugas opposed to using-02?IIRC I did some tests of -02vs-03and didn’t find much/any speedup, so just curious if that was the reason. If it’s been chosen to expose new classes of bugs not found by-03, then seems fine to me.How does -03actually play with-g2? Do the agressive optimisations play OK with debugging? (I’ve never tried this combination I don’t think.)
 maflcko commented at 2:31 pm on July 18, 2025:Probably doesn’t matter much if this is O2 or O3. Maybe O3 is 1% - 4% faster, according to #31491 (comment) ? Any of those can probably be changed, if there is a reason or need. The main goal here is to add Debug(and the checks it ships with)willcl-ark approvedwillcl-ark commented at 2:25 pm on July 18, 2025: membercrACK faa3171ff22fea1c001e5a9b01d964aa425a3387 We can’t see this in action in the CI here as test-each-commit job omits the top commit (with the meaningful changes in in this case), but I did run locally and tested that the flags were being correctly appended. Left a few questions regarding the flag selections, but ACK running these checks in this job. maflcko requested review from fanquake on Jul 24, 2025in .github/ci-test-each-commit-exec.py:34 in faa3171ff231 "-Werror=dev", 32+ # Use clang++, because it is a bit faster and uses less memory than g++ 33 "-DCMAKE_C_COMPILER=clang", 34 "-DCMAKE_CXX_COMPILER=clang++", 35+ # Use mold, because it is faster than the default linker 36+ "-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=mold",
 
 fanquake commented at 11:32 am on July 24, 2025:The CMake here is one version too old, otherwise we could also have usedCMAKE_LINKER_TYPE=MOLDfanquake commented at 11:43 am on July 24, 2025: memberSeems fine to add this and be using moldin one job.This ci run took 30min7sec (https://github.com/bitcoin/bitcoin/actions/runs/16112781421/job/45459901801?pr=32888) This doesn’t actually show the new changes here right? fanquake merged this on Jul 24, 2025fanquake closed this on Jul 24, 2025
 maflcko deleted the branch on Jul 24, 2025fanquake commented at 1:23 pm on July 24, 2025: memberA run of the new job / flags here: https://github.com/bitcoin/bitcoin/actions/runs/16495974354/job/46641652091?pr=33044.
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-31 18:13 UTC
More mirrored repositories can be found on mirror.b10c.me