File tree Expand file tree Collapse file tree 1 file changed +12
-20
lines changed Expand file tree Collapse file tree 1 file changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -69,30 +69,22 @@ jobs:
69
69
fetch-depth : 0
70
70
- name : Install dependencies (Windows MinGW)
71
71
run : |
72
- choco install cmake mingw --version 8.1
72
+ # Install MinGW and CMake
73
+ choco install mingw --version 8.1
74
+
75
+ # Install CMake directly from the official source if choco fails
76
+ if (-Not (Test-Path "C:\Program Files\CMake\bin\cmake.exe")) {
77
+ Write-Host "CMake not found, downloading and installing..."
78
+ Invoke-WebRequest -Uri https://cmake.org/files/v3.22/cmake-3.22.2-windows-x86_64.msi -OutFile cmake_installer.msi
79
+ Start-Process msiexec.exe -ArgumentList '/i', 'cmake_installer.msi', '/quiet', '/norestart' -NoNewWindow -Wait
80
+ Remove-Item -Force cmake_installer.msi
81
+ } else {
82
+ Write-Host "CMake already installed"
83
+ }
73
84
refreshenv
74
85
- name : Build with CMake (Windows MinGW)
75
86
run : |
76
87
mkdir -p build
77
88
cd build
78
89
cmake .. -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles"
79
90
cmake --build . --config Release
80
-
81
- # Windows Job (MSVC)
82
- windows-msvc :
83
- runs-on : windows-latest
84
- steps :
85
- - uses : actions/checkout@v4
86
- with :
87
- fetch-depth : 0
88
- - name : Set up MSVC
89
- run : |
90
- # Install Visual Studio build tools
91
- choco install visualstudio2019-workload-vctools
92
- refreshenv
93
- - name : Build with MSVC (Windows)
94
- run : |
95
- mkdir -p build
96
- cd build
97
- cmake .. -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 16 2019"
98
- cmake --build . --config Release
You can’t perform that action at this time.
0 commit comments