Skip to content

Commit b41517f

Browse files
committed
test ci
1 parent 78a82b1 commit b41517f

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,30 +69,22 @@ jobs:
6969
fetch-depth: 0
7070
- name: Install dependencies (Windows MinGW)
7171
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+
}
7384
refreshenv
7485
- name: Build with CMake (Windows MinGW)
7586
run: |
7687
mkdir -p build
7788
cd build
7889
cmake .. -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles"
7990
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

0 commit comments

Comments
 (0)