bobluppes / bobluppes/graaf

Extend CI to cover Windows (MSVC) and macOS

Open
#322 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
413
Forks
67
Avg merge
7h 24m
Merged PRs (30d)
53

Description

## Summary

CI only builds and tests on `ubuntu-latest` / `ubuntu-22.04`. There is no coverage for Windows (MSVC) or macOS, despite Graaf being a portable, header-only C++20 library with no platform-specific code.

## Current state

Both [.github/workflows/main-ci.yml](../blob/main/.github/workflows/main-ci.yml) and [.github/workflows/pull-request.yml](../blob/main/.github/workflows/pull-request.yml) define:

- `compile_and_test`: `runs-on: ubuntu-latest`, matrixed only over `compiler: [g++, clang++]`.
- `coverage`: `runs-on: ubuntu-22.04`.
- `format`: `runs-on: ubuntu-latest`.

The `coverage` job's own comment even notes: *"The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac... You can convert this to a matrix build if you need cross-platform coverage."* — but this was never done. MSVC in particular has historically been stricter/different from GCC and Clang on template-heavy, header-only C++20 code (e.g. two-phase lookup, `<=>`/concepts edge cases), so the current setup gives no signal on Windows compatibility at all.

## Why this matters

A meaningful portion of commercial and enterprise C++ development targets Windows with MSVC, and cross-platform teams need CI evidence that a dependency actually builds on all the platforms they ship to before adopting it. Right now, any Windows or macOS incompatibility would only surface after a user tries to integrate the library and hits a build failure themselves — there's already precedent for this class of issue (see #315, a GCC/Clang-version-specific break that CI didn't catch because compiler versions also aren't matrixed).

## Suggested resolution

- Extend the `compile_and_test` matrix to include `windows-latest` (MSVC) and `macos-latest`, using `cmake --build` / `ctest` in a way that works across generators (the project already uses portable CMake commands).
- Keep `coverage` and `format` on Ubuntu (tool-specific), but ensure the core compile+test job runs cross-platform on every PR.

## Acceptance criteria

- [ ] PR CI builds and runs the test suite on Windows (MSVC), macOS, and Linux.
- [ ] Any platform-specific fixes needed to get a clean build are made.
- [ ] README/CI badge reflects the expanded platform coverage.

Contributor guide

Open the contributing guide

Research direction

Examine the existing CI workflows in .github/workflows/main-ci.yml and pull-request.yml. The task is to add windows-latest and macos-latest to the compile_and_test job matrix. Start by understanding the current CMake build commands. Test the changes locally or via GitHub Actions to ensure the library builds and tests pass on all platforms. Update any CI badges in the README to reflect the new coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.