bobluppes / bobluppes/graaf

Extend CI to cover Windows (MSVC) and macOS

Aperta
#322 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
413
Fork
67
Merge medio
7h 24m
PR unite (30g)
53

Descrizione

## 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cmake, cpp
Ambito
ci-cd, tooling
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
65/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.