From 0eb646e0b49bb9409757e2029f4f6e796599c864 Mon Sep 17 00:00:00 2001 From: mnerv <24420859+mnerv@users.noreply.github.com> Date: Sun, 10 May 2026 01:30:56 +0200 Subject: [PATCH] ci: add GitHub Actions workflow for macOS and Windows Runs tests and coverage on macOS (AppleClang) and Windows with Clang. Coverage HTML reports are uploaded as artifacts. --- .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e7ff504 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,60 @@ +name: CI + +on: + push: + branches: [trunk] + pull_request: + branches: [trunk] + +jobs: + macos: + name: macOS + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Ninja + run: brew install ninja + + - name: Install gcovr + run: pip install gcovr + + - name: Configure with coverage + run: cmake -S . -B build-cov -G Ninja -DENABLE_COVERAGE=ON + + - name: Build and generate coverage + run: ninja -C build-cov coverage + + - name: Upload coverage report + uses: actions/upload-artifact@v4 + with: + name: coverage-macos + path: build-cov/coverage/ + + windows-clang: + name: Windows / Clang + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - uses: ilammy/msvc-dev-cmd@v1 + + - name: Install gcovr + run: pip install gcovr + + - name: Configure with coverage + shell: bash + run: | + cmake -S . -B build-cov -G Ninja \ + -DENABLE_COVERAGE=ON \ + -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang.exe" \ + -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" + + - name: Build and generate coverage + run: ninja -C build-cov coverage + + - name: Upload coverage report + uses: actions/upload-artifact@v4 + with: + name: coverage-windows-clang + path: build-cov/coverage/