ci: Switch to dynamic library linkage in native Windows job #32182

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:250401-ci-dll changing 1 files +4 −3
  1. hebasto commented at 9:34 am on April 1, 2025: member

    This PR significantly reduces the vcpkg binary cache size, improving CI caching performance:

    Branch Cache Size
    master 2.6 GB
    this PR 430 MB

    Also see #31176 (comment).

  2. hebasto added the label Windows on Apr 1, 2025
  3. hebasto added the label Tests on Apr 1, 2025
  4. DrahtBot commented at 9:34 am on April 1, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32182.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko

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

    Conflicts

    No conflicts as of last run.

  5. maflcko commented at 9:39 am on April 1, 2025: member
    Was there a reason to use static linking in this CI here before?
  6. hebasto commented at 10:02 am on April 1, 2025: member

    Was there a reason to use static linking in this CI here before?

    The static linking was inherited from the Cirrus task in #28173, which, in turn, used our custom Qt build instead of the vcpkg manager.

    My guess is that, back when we were using our custom MSVC project file, static linking worked seamlessly without needing to manage DLL locations.

    Maybe @sipsorcery could provide more details.

  7. sipsorcery commented at 10:05 am on April 1, 2025: contributor
    The msvc build was created with static linking because that’s what the non-msvc build does. Other than that no real reason.
  8. DrahtBot added the label Needs rebase on Apr 1, 2025
  9. hebasto force-pushed on Apr 2, 2025
  10. hebasto commented at 8:34 am on April 2, 2025: member
    Rebased due to a conflict with the merged bitcoin/bitcoin#32184.
  11. DrahtBot removed the label Needs rebase on Apr 2, 2025
  12. ci: Switch to dynamic library linkage in native Windows job
    This change significantly reduces the vcpkg binary cache size, improving
    CI caching performance.
    7967fe5bfd
  13. hebasto force-pushed on Apr 2, 2025
  14. hebasto marked this as ready for review on Apr 2, 2025
  15. hebasto commented at 4:50 pm on April 2, 2025: member
    Rebased and undrafted.
  16. maflcko commented at 5:32 pm on April 2, 2025: member
    lgtm ACK 7967fe5bfd3e881353db9a4428ea913ce4ea15a5
  17. fanquake merged this on Apr 3, 2025
  18. fanquake closed this on Apr 3, 2025

  19. hebasto deleted the branch on Apr 3, 2025
  20. TheCharlatan referenced this in commit a9c46ce3c3 on Apr 24, 2025
  21. stickies-v referenced this in commit 772a33e052 on May 23, 2025
  22. yuvicc referenced this in commit 069643f094 on Jul 6, 2025
  23. bug-castercv502 referenced this in commit 5b0af4b944 on Sep 28, 2025
  24. hodlinator commented at 9:37 am on October 1, 2025: contributor

    Noticed the build artifact x86_64-w64-mingw32-executables-<run> is 916MB (https://github.com/bitcoin/bitcoin/actions/runs/18155350909?pr=31723 / https://github.com/bitcoin/bitcoin/actions/runs/18155350909/job/51673850541?pr=31723#step:9:161).

    Artifact contents:

     0$ unzip -l x86_64-w64-mingw32-executables-18155350909.zip 
     1Archive:  x86_64-w64-mingw32-executables-18155350909.zip
     2  Length      Date    Time    Name
     3---------  ---------- -----   ----
     4617942101  10-01-2025 07:57   bin/bench_bitcoin.exe
     5610761406  10-01-2025 07:57   bin/bitcoin-qt.exe
     6 62115659  10-01-2025 07:55   bin/bitcoin-tx.exe
     7 28860486  10-01-2025 07:55   bin/bitcoin-cli.exe
     8 28258672  10-01-2025 07:55   bin/bitcoin-util.exe
     9215229370  10-01-2025 07:55   bin/bitcoin-wallet.exe
    10 17588530  10-01-2025 07:55   bin/bitcoin.exe
    11472440702  10-01-2025 07:56   bin/bitcoind.exe
    12722128888  10-01-2025 07:59   bin/fuzz.exe
    13963138284  10-01-2025 07:59   bin/test_bitcoin.exe
    14  1006274  10-01-2025 07:54   src/secp256k1/bin/exhaustive_tests.exe
    15  3244108  10-01-2025 07:54   src/secp256k1/bin/noverify_tests.exe
    16  3642166  10-01-2025 07:54   src/secp256k1/bin/tests.exe
    17  4811144  10-01-2025 07:53   src/univalue/object.exe
    18  4115324  10-01-2025 07:53   src/univalue/unitester.exe
    19      967  10-01-2025 07:53   test/config.ini
    20---------                     -------
    213755284081                     16 files
    

    test_bitcoin.exe itself is almost 1GB when uncompressed.

    Would it be okay to use stripped binaries in the artifact?

    Tried reproducing running env -i HOME="$HOME" PATH="$PATH" USER="$USER" ... FILE_ENV="./ci/test/00_setup_env_win64.sh" ./ci/test_run_all.sh' and noticed we have stripped binaries available in release/

     0root@23d2a9125040:/ci_container_base/ci/scratch/build-x86_64-w64-mingw32# ls -alh bin/ release/
     1bin/:
     2total 3.5G
     3drwxr-xr-x  2 root root 4.0K Oct  1 09:04 .
     4drwxr-xr-x 10 root root 4.0K Oct  1 09:04 ..
     5-rwxr-xr-x  1 root root 589M Oct  1 09:02 bench_bitcoin.exe
     6-rwxr-xr-x  1 root root  28M Oct  1 08:58 bitcoin-cli.exe
     7-rwxr-xr-x  1 root root 582M Oct  1 09:00 bitcoin-qt.exe
     8-rwxr-xr-x  1 root root  60M Oct  1 08:58 bitcoin-tx.exe
     9-rwxr-xr-x  1 root root  27M Oct  1 08:58 bitcoin-util.exe
    10-rwxr-xr-x  1 root root 206M Oct  1 08:58 bitcoin-wallet.exe
    11-rwxr-xr-x  1 root root 4.9M Oct  1 08:57 bitcoin.exe
    12-rwxr-xr-x  1 root root 451M Oct  1 08:59 bitcoind.exe
    13-rwxr-xr-x  1 root root 688M Oct  1 09:04 fuzz.exe
    14-rwxr-xr-x  1 root root 918M Oct  1 09:04 test_bitcoin.exe
    15
    16release/:
    17total 94M
    18drwxr-xr-x  2 root root 4.0K Oct  1 09:04 .
    19drwxr-xr-x 10 root root 4.0K Oct  1 09:04 ..
    20-rwxr-xr-x  1 root root 2.2M Oct  1 09:04 bitcoin-cli.exe
    21-rwxr-xr-x  1 root root  38M Oct  1 09:04 bitcoin-qt.exe
    22-rwxr-xr-x  1 root root 4.0M Oct  1 09:04 bitcoin-tx.exe
    23-rwxr-xr-x  1 root root 1.9M Oct  1 09:04 bitcoin-util.exe
    24-rwxr-xr-x  1 root root 7.9M Oct  1 09:04 bitcoin-wallet.exe
    25-rwxr-xr-x  1 root root 1.2M Oct  1 09:04 bitcoin.exe
    26-rwxr-xr-x  1 root root  14M Oct  1 09:04 bitcoind.exe
    27-rwxr-xr-x  1 root root  26M Oct  1 09:04 test_bitcoin.exe
    

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: 2025-10-10 15:13 UTC

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