ci/win32: manually install cmake to fix cpu detection issue

This commit is contained in:
Norgerman authored and Kacper Michajłow committed 2025-06-12 18:08:32 +02:00
1 parent 47bc7b2a07
commit e612f419f3
2 files changed
+19 -2

No files matched your search

+3 -2
View File
@@ -161,6 +161,7 @@ jobs:
run: |
python -m pip install meson
choco install ccache nasm
./ci/install-cmake.ps1 -arch ${{ matrix.arch }}
- name: Update Meson WrapDB
run: |
@@ -177,7 +178,7 @@ jobs:
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and `
$_ -ne 'C:\Program Files\CMake\bin' -and `
$_ -ne 'C:\Strawberry\c\bin' }) -join ';'
$env:PATH += ';C:\Program Files\NASM'
$env:PATH = "$pwd\cmake\bin;" + $env:PATH + ';C:\Program Files\NASM'
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.arch }} -host_arch=${{ matrix.arch }}"
./ci/build-win32.ps1
@@ -193,7 +194,7 @@ jobs:
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and `
$_ -ne 'C:\Program Files\CMake\bin' -and `
$_ -ne 'C:\Strawberry\c\bin' }) -join ';'
$env:PATH += ';C:\Program Files\NASM'
$env:PATH = "$pwd\cmake\bin;" + $env:PATH + ';C:\Program Files\NASM'
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.arch }} -host_arch=${{ matrix.arch }}"
meson test -C build -t 2
+16
View File
@@ -0,0 +1,16 @@
param(
[string]$arch,
[string]$version = "4.0.2"
)
if ($arch -eq "x64") {
$arch = "x86_64"
}
$cmake_fullname = "cmake-$version-windows-$arch"
$cmake_url = "https://github.com/Kitware/CMake/releases/download/v$version/$cmake_fullname.zip"
Invoke-WebRequest $cmake_url -OutFile .\$cmake_fullname.zip
Expand-Archive -Path .\$cmake_fullname.zip -DestinationPath .\ -Force
Rename-Item -Path .\$cmake_fullname -NewName cmake