cmake: scope Boost Test check to vcpkg #30822

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:scope_boost_test_vcpkg changing 1 files +3 −3
  1. fanquake commented at 2:41 pm on September 5, 2024: member

    This check was added for vcpkg, given how it packages Boost. However, we don’t need to run the check for other platforms, and it’s quite slow. So, scope it to just vcpkg.

    On my machine, this reduces the time to run time cmake -B build from ~12 seconds, to ~6 seconds.

    Fixes: #30787.

  2. DrahtBot commented at 2:41 pm on September 5, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto, kevkevinpal, maflcko, davidgumberg

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Build system on Sep 5, 2024
  4. hebasto approved
  5. hebasto commented at 2:45 pm on September 5, 2024: member
    ACK dda17b44e7a680412a231e64a5a09120a850bb1f, I have reviewed the code and it looks OK.
  6. in cmake/module/AddBoostIfNeeded.cmake:67 in dda17b44e7 outdated
    63@@ -64,9 +64,9 @@ function(add_boost_if_needed)
    64     set(CMAKE_REQUIRED_DEFINITIONS)
    65   endif()
    66 
    67-  if(BUILD_TESTS)
    68-    # Some package managers, such as vcpkg, vendor Boost.Test separately
    69-    # from the rest of the headers, so we have to check for it individually.
    70+# Some package managers, such as vcpkg, vendor Boost.Test separately
    


    maflcko commented at 3:10 pm on September 5, 2024:
    Comment indent seems off compared to the other cmake code? I guess there is no .cmake-format.yml, so feel free to ignore.

    fanquake commented at 3:15 pm on September 5, 2024:
    Thanks, fixed the comments.
  7. maflcko approved
  8. maflcko commented at 3:11 pm on September 5, 2024: member

    review ACK dda17b44e7a680412a231e64a5a09120a850bb1f

    The alternative #30787 (comment) seems fine as well.

  9. cmake: scope Boost Test check to vcpkg
    This check was added for vcpkg, given how it packages Boost. However, we
    don't need to run the check for other platforms, and it's quite slow.
    So, scope it to VCPKG. On my machine, this reduces the time to run
    `cmake -B build` from ~12 seconds, to ~6 seconds.
    
    Fixes: #30787
    a7a4e11db8
  10. fanquake force-pushed on Sep 5, 2024
  11. hebasto commented at 3:18 pm on September 5, 2024: member

    The alternative #30787 (comment) seems fine as well.

    This PR change is minimal.

  12. hebasto approved
  13. hebasto commented at 3:18 pm on September 5, 2024: member
    re-ACK a7a4e11db8722c85175bcc4d9f73a713e9e61513.
  14. DrahtBot requested review from maflcko on Sep 5, 2024
  15. kevkevinpal commented at 3:20 pm on September 5, 2024: contributor

    lgtm ACK a7a4e11

    did time cmake -B build and got the following results

    PR30822 (a7a4e11)

    0real    0m13.740s
    1user    0m6.798s
    2sys     0m4.696s
    

    master (d661e2b1b771abafb0b152842d775d3150032230)

    0real    0m25.583s
    1user    0m17.078s
    2sys     0m5.127s
    
  16. maflcko commented at 3:20 pm on September 5, 2024: member
    review ACK a7a4e11db8722c85175bcc4d9f73a713e9e61513
  17. maflcko added the label DrahtBot Guix build requested on Sep 5, 2024
  18. davidgumberg commented at 8:35 pm on September 5, 2024: contributor

    Tested ACK https://github.com/bitcoin/bitcoin/commit/a7a4e11db8722c85175bcc4d9f73a713e9e61513

    This branch reduces the amount of time that cmake -B build takes on my setup by 52% from 26.749 seconds to 12.649 seconds:

     0$ git switch 30822
     1Switched to branch '30822'
     2
     3$ hyperfine --warmup 3 --runs 10 --prepare "git clean -dfx" "cmake -B build"
     4Benchmark 1: cmake -B build
     5  Time (mean ± σ):     12.649 s ±  0.113 s    [User: 6.748 s, System: 5.765 s]
     6  Range (min … max):   12.487 s … 12.813 s    10 runs
     7
     8$ git switch d661e2b --detach
     9HEAD is now at d661e2b1b7 Merge bitcoin/bitcoin#30812: lint: Check for release note snippets in the wrong folder
    10
    11$ hyperfine --warmup 3 --runs 10 --prepare "git clean -dfx" "cmake -B build"
    12Benchmark 1: cmake -B build
    13  Time (mean ± σ):     26.749 s ±  0.317 s    [User: 19.094 s, System: 7.420 s]
    14  Range (min … max):   26.345 s … 27.354 s    10 runs
    
  19. DrahtBot commented at 10:48 pm on September 5, 2024: contributor

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit d661e2b1b771abafb0b152842d775d3150032230(master) commit 9c42461c1cda5404adf2306d4543db0b4e4a0370(master and this pull)
    SHA256SUMS.part c2af736afd94b7e7... ed4674fb1dd37f5e...
    *-aarch64-linux-gnu-debug.tar.gz 25d2ea6d13caa9f3... e72820ffa9650c8b...
    *-aarch64-linux-gnu.tar.gz 8bb0cb8da4887ac3... a3984f81819a5b98...
    *-arm-linux-gnueabihf-debug.tar.gz 954853f231df4f6d... 1b1847265ecc3263...
    *-arm-linux-gnueabihf.tar.gz 5cdb36dd03f0b631... de4d766c97d0be70...
    *-arm64-apple-darwin-unsigned.tar.gz 0ce2c98b5949d8bd... d85a455169a021bd...
    *-arm64-apple-darwin-unsigned.zip cc2f04cb2f1ba5d6... c9fd752165df3c2c...
    *-arm64-apple-darwin.tar.gz 91c5ad4f3b5904d7... 80b64269b5a7f668...
    *-powerpc64-linux-gnu-debug.tar.gz 637354ee8e6267c6... 9a3098c70690024b...
    *-powerpc64-linux-gnu.tar.gz d7b4680ab704f4b7... 28973928b9737788...
    *-riscv64-linux-gnu-debug.tar.gz a75e4dd33f73c761... 553925b7caa17759...
    *-riscv64-linux-gnu.tar.gz 0fd6f23dc8e70401... e65ed24afc062ea5...
    *-x86_64-apple-darwin-unsigned.tar.gz 875fa94a7a4d2ba3... 08c41356b7234dd4...
    *-x86_64-apple-darwin-unsigned.zip 83f53f5f42817a35... 4a2a445a71649e66...
    *-x86_64-apple-darwin.tar.gz 8887cac23aa019fc... fd5696c950fc75a9...
    *-x86_64-linux-gnu-debug.tar.gz af3bfd868dd70b23... 7c172ff0e3b0e163...
    *-x86_64-linux-gnu.tar.gz a0ae4b0110982b35... 1f299ec448437da3...
    *.tar.gz a22ac0cec36d7a5c... 6bbf38f22535ac8f...
    guix_build.log 7fda150bb71dde5c... aa7aaae0d106f8f9...
    guix_build.log.diff 237a0b563f699b86...
  20. DrahtBot removed the label DrahtBot Guix build requested on Sep 5, 2024
  21. fanquake merged this on Sep 6, 2024
  22. fanquake closed this on Sep 6, 2024

  23. fanquake deleted the branch on Sep 6, 2024

github-metadata-mirror

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: 2024-12-03 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me