version 1.1.2 - included multiple text encodings #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CMake on multiple platforms | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| 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 | |
| # ── 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 ───────────────────────────────────────────────────────────────── | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| - 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 ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DBUILD_PYTHON_BINDINGS=OFF | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} | |
| # ── Test ────────────────────────────────────────────────────────────────── | |
| - name: Test | |
| working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
| # --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 |