Resolve CMake explicitly on Windows runner
build / Build Linux CPU (push) Failing after 1m5s
build / Build Windows CPU (push) Successful in 2m20s

This commit is contained in:
Codex Bot
2026-04-18 20:17:40 +02:00
parent fcf562ce15
commit 70f6561eaf
2 changed files with 32 additions and 4 deletions
+16 -2
View File
@@ -90,10 +90,24 @@ jobs:
)
C:\vcpkg\vcpkg.exe install libuv:x64-windows-static
- name: Resolve CMake
shell: cmd
run: |
set "CMAKE_EXE="
for %%I in (cmake.exe) do set "CMAKE_EXE=%%~$PATH:I"
if not defined CMAKE_EXE if exist "C:\Program Files\CMake\bin\cmake.exe" set "CMAKE_EXE=C:\Program Files\CMake\bin\cmake.exe"
if not defined CMAKE_EXE if exist "C:\Program Files (x86)\CMake\bin\cmake.exe" set "CMAKE_EXE=C:\Program Files (x86)\CMake\bin\cmake.exe"
if not defined CMAKE_EXE (
echo CMake not found on runner PATH or standard install locations.
exit /b 1
)
echo Using CMake: %CMAKE_EXE%
echo CMAKE_EXE=%CMAKE_EXE%>>%GITHUB_ENV%
- name: Configure
shell: cmd
run: |
cmake -S . -B build -A x64 ^
"%CMAKE_EXE%" -S . -B build -A x64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=x64-windows-static ^
@@ -106,7 +120,7 @@ jobs:
- name: Build
shell: cmd
run: cmake --build build --config Release
run: '"%CMAKE_EXE%" --build build --config Release'
- name: Package
shell: cmd
+16 -2
View File
@@ -131,10 +131,24 @@ jobs:
)
C:\vcpkg\vcpkg.exe install libuv:x64-windows-static
- name: Resolve CMake
shell: cmd
run: |
set "CMAKE_EXE="
for %%I in (cmake.exe) do set "CMAKE_EXE=%%~$PATH:I"
if not defined CMAKE_EXE if exist "C:\Program Files\CMake\bin\cmake.exe" set "CMAKE_EXE=C:\Program Files\CMake\bin\cmake.exe"
if not defined CMAKE_EXE if exist "C:\Program Files (x86)\CMake\bin\cmake.exe" set "CMAKE_EXE=C:\Program Files (x86)\CMake\bin\cmake.exe"
if not defined CMAKE_EXE (
echo CMake not found on runner PATH or standard install locations.
exit /b 1
)
echo Using CMake: %CMAKE_EXE%
echo CMAKE_EXE=%CMAKE_EXE%>>%GITHUB_ENV%
- name: Configure
shell: cmd
run: |
cmake -S . -B build -A x64 ^
"%CMAKE_EXE%" -S . -B build -A x64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=x64-windows-static ^
@@ -147,7 +161,7 @@ jobs:
- name: Build
shell: cmd
run: cmake --build build --config Release
run: '"%CMAKE_EXE%" --build build --config Release'
- name: Package
shell: cmd