Skip to content

ci: add cmake --parallel build option - #353

Closed
ryanofsky wants to merge 1 commit into
bitcoin-core:masterfrom
ryanofsky:pr/cmake-parallel
Closed

ci: add cmake --parallel build option#353
ryanofsky wants to merge 1 commit into
bitcoin-core:masterfrom
ryanofsky:pr/cmake-parallel

Conversation

@ryanofsky

Copy link
Copy Markdown
Collaborator

Drop nproc call and inconsistent -j setting.

Drop nproc call and inconsistent -j setting.
@DrahtBot

DrahtBot commented Aug 20, 2026

Copy link
Copy Markdown

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #352 (ci: add cmake debug output by ryanofsky)
  • #212 (ci: add newdeps job testing newer versions of cmake and capnproto by ryanofsky)
  • #209 (cmake: Increase cmake policy version by ryanofsky)
  • #175 (Set cmake_minimum_required(VERSION 3.22) by maflcko)

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.

Comment thread ci/scripts/ci.sh
cmake "$src_dir" "${CMAKE_ARGS[@]+"${CMAKE_ARGS[@]}"}"
if ver_ge "$cmake_ver" "3.15"; then
cmake --build . -t "${BUILD_TARGETS[@]}" -- "${BUILD_ARGS[@]+"${BUILD_ARGS[@]}"}"
cmake --build . --parallel -t "${BUILD_TARGETS[@]}" -- "${BUILD_ARGS[@]+"${BUILD_ARGS[@]}"}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the CMake docs:

If <jobs> is omitted the native build tool’s default number is used.

I don't think this change is an improvement, as it might reduce build parallelism.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could also lead to over-parallelism and lead to OOM?

@ryanofsky

Copy link
Copy Markdown
Collaborator Author

Good points! Closing this PR as I did not know --parallel had this crazy behavior. For a followup though it could still be good to drop -j4 from sanitize.bash

@ryanofsky ryanofsky closed this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants