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

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    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.

    <!--174a7506f384e20aa4161008e828411d-->

    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:

    $ unzip -l x86_64-w64-mingw32-executables-18155350909.zip 
    Archive:  x86_64-w64-mingw32-executables-18155350909.zip
      Length      Date    Time    Name
    ---------  ---------- -----   ----
    617942101  10-01-2025 07:57   bin/bench_bitcoin.exe
    610761406  10-01-2025 07:57   bin/bitcoin-qt.exe
     62115659  10-01-2025 07:55   bin/bitcoin-tx.exe
     28860486  10-01-2025 07:55   bin/bitcoin-cli.exe
     28258672  10-01-2025 07:55   bin/bitcoin-util.exe
    215229370  10-01-2025 07:55   bin/bitcoin-wallet.exe
     17588530  10-01-2025 07:55   bin/bitcoin.exe
    472440702  10-01-2025 07:56   bin/bitcoind.exe
    722128888  10-01-2025 07:59   bin/fuzz.exe
    963138284  10-01-2025 07:59   bin/test_bitcoin.exe
      1006274  10-01-2025 07:54   src/secp256k1/bin/exhaustive_tests.exe
      3244108  10-01-2025 07:54   src/secp256k1/bin/noverify_tests.exe
      3642166  10-01-2025 07:54   src/secp256k1/bin/tests.exe
      4811144  10-01-2025 07:53   src/univalue/object.exe
      4115324  10-01-2025 07:53   src/univalue/unitester.exe
          967  10-01-2025 07:53   test/config.ini
    ---------                     -------
    3755284081                     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/

    root@23d2a9125040:/ci_container_base/ci/scratch/build-x86_64-w64-mingw32# ls -alh bin/ release/
    bin/:
    total 3.5G
    drwxr-xr-x  2 root root 4.0K Oct  1 09:04 .
    drwxr-xr-x 10 root root 4.0K Oct  1 09:04 ..
    -rwxr-xr-x  1 root root 589M Oct  1 09:02 bench_bitcoin.exe
    -rwxr-xr-x  1 root root  28M Oct  1 08:58 bitcoin-cli.exe
    -rwxr-xr-x  1 root root 582M Oct  1 09:00 bitcoin-qt.exe
    -rwxr-xr-x  1 root root  60M Oct  1 08:58 bitcoin-tx.exe
    -rwxr-xr-x  1 root root  27M Oct  1 08:58 bitcoin-util.exe
    -rwxr-xr-x  1 root root 206M Oct  1 08:58 bitcoin-wallet.exe
    -rwxr-xr-x  1 root root 4.9M Oct  1 08:57 bitcoin.exe
    -rwxr-xr-x  1 root root 451M Oct  1 08:59 bitcoind.exe
    -rwxr-xr-x  1 root root 688M Oct  1 09:04 fuzz.exe
    -rwxr-xr-x  1 root root 918M Oct  1 09:04 test_bitcoin.exe
    
    release/:
    total 94M
    drwxr-xr-x  2 root root 4.0K Oct  1 09:04 .
    drwxr-xr-x 10 root root 4.0K Oct  1 09:04 ..
    -rwxr-xr-x  1 root root 2.2M Oct  1 09:04 bitcoin-cli.exe
    -rwxr-xr-x  1 root root  38M Oct  1 09:04 bitcoin-qt.exe
    -rwxr-xr-x  1 root root 4.0M Oct  1 09:04 bitcoin-tx.exe
    -rwxr-xr-x  1 root root 1.9M Oct  1 09:04 bitcoin-util.exe
    -rwxr-xr-x  1 root root 7.9M Oct  1 09:04 bitcoin-wallet.exe
    -rwxr-xr-x  1 root root 1.2M Oct  1 09:04 bitcoin.exe
    -rwxr-xr-x  1 root root  14M Oct  1 09:04 bitcoind.exe
    -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: 2026-05-01 06:13 UTC

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