Skip to content

updated pipeline for past dists #11

updated pipeline for past dists

updated pipeline for past dists #11

name: CMake on multiple platforms
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Read-only by default. This workflow only compiles and runs tests; it never
# writes to the repository.
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# Keep fail-fast off so every platform reports independently.
fail-fast: false
# Matrix:
# Windows — MSVC (cl) only; zlib via vendored header, iconv via Win32 API
# Linux — GCC and Clang; zlib + iconv from system glibc
# macOS — Apple Clang; zlib + iconv from system SDK (no extra packages)
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
- os: macos-latest
c_compiler: gcc
- os: macos-latest
c_compiler: cl
steps:
- uses: actions/checkout@v4
with:
# Nothing here pushes; leaving the token in .git/config would only be an
# exfiltration target for a compromised build step.
persist-credentials: false
# ── Platform dependencies ─────────────────────────────────────────────────
# Ubuntu: zlib development headers (iconv is part of glibc — no extra pkg).
# macOS / Windows: zlib and iconv are available in the SDK / Win32 API; no
# extra installation required.
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -y zlib1g-dev
# ── Build ─────────────────────────────────────────────────────────────────
# The build directory is a plain relative path rather than a step output.
# Every step below runs with the workspace as its working directory, so the
# indirection bought nothing — and interpolating a step output into a `run:`
# block is the shape of a template-injection sink, which is worth not
# teaching by example even when the value itself is trusted.
- name: Configure CMake
# BUILD_PYTHON_BINDINGS=OFF: Python wheel building is handled by the
# separate python-publish workflow; keeping it off avoids pybind11
# dependency noise in the core C++ CI.
run: >
cmake -B build
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBUILD_PYTHON_BINDINGS=OFF
-S .
- name: Build
run: cmake --build build --config ${{ matrix.build_type }}
# ── Test ──────────────────────────────────────────────────────────────────
- name: Test
working-directory: build
# --output-on-failure prints the full test output when any test fails,
# making it straightforward to diagnose encoding or parsing regressions
# across the three platforms without inspecting runner logs manually.
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure