Skip to content

Commit 64552c8

Browse files
hebastofanquake
authored andcommitted
ci: Add workaround for vcpkg's libevent package
This change is necessary for Windows GHA images, which provide CMake >= 4.0. Github-Pull: #32184 Rebased-From: ef00a28
1 parent 85f3e1d commit 64552c8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,12 @@ jobs:
194194
Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())"
195195
196196
- name: Using vcpkg with MSBuild
197+
shell: bash
197198
run: |
198-
Set-Location "$env:VCPKG_INSTALLATION_ROOT"
199-
Add-Content -Path "triplets\x64-windows.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
200-
Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
199+
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows.cmake"
200+
echo "set(VCPKG_BUILD_TYPE release)" >> "${VCPKG_INSTALLATION_ROOT}/triplets/x64-windows-static.cmake"
201+
# Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
202+
sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"
201203
202204
- name: vcpkg tools cache
203205
uses: actions/cache@v4

0 commit comments

Comments
 (0)