Skip to content

Commit d256059

Browse files
committed
ci(windows): add MSVC 2022 Windows build + test job
1 parent 347a0b2 commit d256059

2 files changed

Lines changed: 40 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,41 @@ jobs:
199199
UBSAN_OPTIONS: "halt_on_error=1:print_stacktrace=1"
200200
run: ctest --test-dir build --output-on-failure -j
201201

202+
windows-msvc:
203+
name: windows-msvc-2022
204+
runs-on: windows-2022
205+
timeout-minutes: 25
206+
steps:
207+
- uses: actions/checkout@v4
208+
209+
- name: CPM source cache
210+
uses: actions/cache@v4
211+
with:
212+
path: ~/AppData/Local/.cache/CPM
213+
key: cpm-windows-${{ hashFiles('cmake/CPM.cmake', 'cmake/GTestDep.cmake') }}
214+
restore-keys: |
215+
cpm-windows-
216+
217+
- name: Configure (MSVC, x64)
218+
# The Visual Studio 2022 generator picks the MSVC toolchain by
219+
# default and pulls in `cl.exe` through CMake's `vcvars` discovery.
220+
# Bench is off (the peer-pool CPM pulls are Linux-only); tidy is
221+
# off (no clang-tidy on this runner); tests are on.
222+
env:
223+
CPM_SOURCE_CACHE: ${{ github.workspace }}\.cache\CPM
224+
run: |
225+
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
226+
-DCITOR_BUILD_BENCHMARK=OFF `
227+
-DCITOR_ENABLE_CLANG_TIDY=OFF
228+
229+
- name: Build (Release)
230+
run: cmake --build build --config Release -j
231+
232+
- name: Test
233+
# GoogleTest binaries land under build/tests/Release/ with the
234+
# multi-config VS generator; ctest finds them automatically.
235+
run: ctest --test-dir build -C Release --output-on-failure -j
236+
202237
tsan-smoke:
203238
name: tsan (smoke)
204239
runs-on: ubuntu-24.04

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
| Version | `0.2.2` |
1212
| Distribution | header-only |
1313
| CMake target | `citor::citor` (INTERFACE) |
14-
| Validated target | Linux x86_64 + AVX2; Windows x86_64 best-effort |
15-
| Compilers | GCC 14, Clang 18 (CI). MSVC 2022 on Windows (manual). |
14+
| Validated target | Linux x86_64 + AVX2; Windows x86_64 |
15+
| Compilers | GCC 14, Clang 18 (Linux). MSVC 2022 (Windows). All CI-backed. |
1616
| C++ standard | C++20 |
1717
| Runtime deps | `Threads::Threads` / pthread |
1818
| License | MIT |
@@ -1145,8 +1145,8 @@ Workload families in the bench tree:
11451145

11461146
## Supported targets
11471147

1148-
- **Linux x86_64 + AVX2 (CI)**: Ubuntu 24.04 with GCC 14 and Clang 18, C++20. Every push on `main` runs the GTest suite, ASan + UBSan, TSan smoke, clang-tidy, and pre-commit hooks via `.github/workflows/ci.yml`. The latency contract is validated only on this configuration.
1149-
- **Windows x86_64 (best-effort)**: MSVC 2022 with `/std:c++20`. Build and tests pass locally; no CI coverage. The Windows port maps each Linux primitive to its Win32 counterpart:
1148+
- **Linux x86_64 + AVX2 (CI)**: Ubuntu 24.04 with GCC 14 and Clang 18, C++20. Every push on `main` runs the GTest suite, ASan + UBSan, TSan smoke, clang-tidy (diff-gated), and pre-commit hooks via `.github/workflows/ci.yml`. The latency contract is validated only on this configuration.
1149+
- **Windows x86_64 (CI)**: Windows Server 2022 with MSVC 17 2022, `/std:c++20`. The `windows-msvc-2022` job builds the tree and runs the GTest suite. Latency numbers are not validated here; treat dispatch-floor measurements on Windows as indicative. The port maps each Linux primitive to its Win32 counterpart:
11501150

11511151
| concern | Win32 API |
11521152
|-----------------------|--------------------------------------------------------|
@@ -1157,7 +1157,7 @@ Workload families in the bench tree:
11571157
| producer affinity | `SetThreadAffinityMask` |
11581158
| locked pages | `VirtualLock` |
11591159

1160-
The dispatch gate is a hybrid CAS plus `WaitOnAddress` lock on the cold path. Treat Windows numbers as indicative.
1160+
The dispatch gate is a hybrid CAS plus `WaitOnAddress` lock on the cold path.
11611161
- **Packaging coverage in CI**:
11621162

11631163
| install path | CI job |

0 commit comments

Comments
 (0)