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

7967fe5bfd ci: Switch to dynamic library linkage in native Windows job (Hennadii Stepanov)

Pull request description:

  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 https://github.com/bitcoin/bitcoin/pull/31176#issuecomment-2766164288.

ACKs for top commit:
  maflcko:
    lgtm ACK 7967fe5bfd

Tree-SHA512: d52fcf9cdc95bcbbe35def4634cd94d3c934be939a486ac4740da7e5706ef813950984987a7dfef45edeca8a539438dc8fc8f3f92adb7f188af2f0088b88e4db
This commit is contained in:
merge-script 2025-04-03 14:03:11 +08:00
commit 77dff373a6
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -156,7 +156,7 @@ jobs:
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
windows-native:
windows-native-dll:
name: ${{ matrix.job-name }}
runs-on: windows-2022
@ -202,7 +202,6 @@ jobs:
- name: Using vcpkg with MSBuild
run: |
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake"
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows-static.cmake"
# Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"
@ -221,7 +220,7 @@ jobs:
- name: Generate build system
run: |
cmake -B build --preset vs2022-static -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
cmake -B build --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ${{ matrix.generate-options }}
- name: Save vcpkg binary cache
uses: actions/cache/save@v4
@ -238,6 +237,8 @@ jobs:
- name: Run test suite
if: matrix.job-type == 'standard'
working-directory: build
env:
QT_PLUGIN_PATH: '${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins'
run: |
ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release