|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master, main] |
| 6 | + pull_request: |
| 7 | + branches: [master, main] |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + include: |
| 15 | + - os: ubuntu-latest |
| 16 | + name: Linux (GCC) |
| 17 | + cmake_args: -DCMAKE_BUILD_TYPE=Release |
| 18 | + - os: macos-latest |
| 19 | + name: macOS (Apple Clang) |
| 20 | + cmake_args: -DCMAKE_BUILD_TYPE=Release |
| 21 | + - os: windows-latest |
| 22 | + name: Windows (MSVC) |
| 23 | + cmake_args: -DCMAKE_BUILD_TYPE=Release |
| 24 | + |
| 25 | + name: ${{ matrix.name }} |
| 26 | + runs-on: ${{ matrix.os }} |
| 27 | + |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + |
| 31 | + # ── System dependencies ──────────────────────────────────── |
| 32 | + - name: Install Linux dependencies |
| 33 | + if: runner.os == 'Linux' |
| 34 | + run: | |
| 35 | + sudo apt-get update |
| 36 | + sudo apt-get install -y \ |
| 37 | + libgl-dev \ |
| 38 | + libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev \ |
| 39 | + libgtk-3-dev \ |
| 40 | + python3-dev |
| 41 | +
|
| 42 | + # ── Python setup ─────────────────────────────────────────── |
| 43 | + - uses: actions/setup-python@v5 |
| 44 | + with: |
| 45 | + python-version: '3.12' |
| 46 | + |
| 47 | + - name: Install Python test dependencies |
| 48 | + run: pip install pyarrow polars pandas numpy pytest |
| 49 | + |
| 50 | + # ── Cache FetchContent downloads ─────────────────────────── |
| 51 | + - name: Cache FetchContent |
| 52 | + uses: actions/cache@v4 |
| 53 | + with: |
| 54 | + path: build/_deps |
| 55 | + key: deps-${{ runner.os }}-${{ hashFiles('cmake/Dependencies.cmake') }} |
| 56 | + restore-keys: deps-${{ runner.os }}- |
| 57 | + |
| 58 | + # ── Build ────────────────────────────────────────────────── |
| 59 | + - name: Configure |
| 60 | + run: cmake -B build ${{ matrix.cmake_args }} |
| 61 | + |
| 62 | + - name: Build |
| 63 | + run: cmake --build build --config Release --parallel |
| 64 | + |
| 65 | + # ── Test ─────────────────────────────────────────────────── |
| 66 | + - name: C++ tests |
| 67 | + run: ctest --test-dir build --config Release --output-on-failure |
| 68 | + |
| 69 | + - name: Python tests |
| 70 | + run: python -m pytest tests/python -v |
0 commit comments