Skip to content

Commit b8fa51d

Browse files
bsergeanclaude
andcommitted
CI: use the preinstalled mingw-w64 and ninja on windows-latest
The setup-mingw step took 61s to `choco upgrade mingw`, downloading and extracting a 102 MB 7z -- and the toolchain it installed was never used. The chocolatey package relocates itself to C:\ProgramData\mingw64\mingw64\bin while the action appends C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin to GITHUB_PATH, a path that does not exist, so the compiler lookup fell through to the mingw-w64 that windows-latest already ships at C:\mingw64\bin (gcc 15.2.0, ucrt, posix threads). The build logs confirm it: -- Check for working C compiler: C:/mingw64/bin/cc.exe - skipped -- The C compiler identification is GNU 15.2.0 The action's only real contribution was hardlinking cc.exe/c++.exe next to the mingw binaries, which naming gcc/g++ in the cmake invocation makes unnecessary. gha-setup-ninja is dropped for the same reason: it downloaded ninja 1.12.1 while the image already has 1.13.2 on PATH. Also bumps actions/checkout v1 -> v4. Job time goes from ~2m46s to ~1m40s. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent cbede0a commit b8fa51d

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎.github/workflows/unittest_windows_gcc.yml‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,16 @@ jobs:
1111
windows:
1212
runs-on: windows-latest
1313
steps:
14-
- uses: actions/checkout@v1
15-
- uses: seanmiddleditch/gha-setup-ninja@master
16-
- uses: bsergean/setup-mingw@d79ce405bac9edef3a1726ef00554a56f0bafe66
14+
- uses: actions/checkout@v4
15+
# No toolchain setup step: windows-latest ships mingw-w64 (gcc, ucrt, posix
16+
# threads) at C:\mingw64\bin and ninja, both already on PATH.
1717
- run: |
1818
mkdir build
1919
cd build
20-
cmake -GNinja -DCMAKE_CXX_COMPILER=c++ -DCMAKE_C_COMPILER=cc -DUSE_WS=1 -DUSE_TEST=1 -DUSE_ZLIB=0 -DCMAKE_UNITY_BUILD=ON ..
20+
cmake -GNinja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DUSE_WS=1 -DUSE_TEST=1 -DUSE_ZLIB=0 -DCMAKE_UNITY_BUILD=ON ..
2121
- run: |
2222
cd build
2323
ninja
2424
- run: |
2525
cd build
2626
ctest -V
27-
# ninja test
28-
29-
#- run: ../build/test/ixwebsocket_unittest.exe
30-
# working-directory: test

0 commit comments

Comments
 (0)