Skip to content

Commit 449e2eb

Browse files
committed
Merge bitcoin/bitcoin#32184: ci: Add workaround for vcpkg's libevent package
30c59ad ci: Drop confusing comment (Hennadii Stepanov) ef00a28 ci: Add workaround for vcpkg's libevent package (Hennadii Stepanov) Pull request description: This PR is necessary for Windows GHA [images](https://github.com/actions/runner-images/blob/win22/20250330.1/images/windows/Windows2022-Readme.md), which provide CMake >= 4.0. The idea has been taken from microsoft/vcpkg#44273 (comment). ACKs for top commit: maflcko: lgtm ACK 30c59ad pinheadmz: ACK 30c59ad Tree-SHA512: 898a616a40c1aaec69d8a329d56f887cacec71b9588842feef2b689fbd21a12d8f8b3b4053a6373332008668960b9df7c71a44fcd97e637e250705daf1215c7f
2 parents 1a6fc04 + 30c59ad commit 449e2eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ jobs:
158158

159159
windows-native:
160160
name: ${{ matrix.job-name }}
161-
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
162-
# See: https://github.com/actions/runner-images#available-images.
163161
runs-on: windows-2022
164162

165163
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
@@ -205,6 +203,8 @@ jobs:
205203
run: |
206204
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake"
207205
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows-static.cmake"
206+
# Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
207+
sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"
208208
209209
- name: vcpkg tools cache
210210
uses: actions/cache@v4

0 commit comments

Comments
 (0)