From 0ae554d01187b2f22f64eabc625097e91922235f Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 19 Jan 2026 13:39:19 +0100 Subject: [PATCH] Add CI workflow for build verification Add a GitHub Actions workflow that builds the project on multiple platforms using CMake: Linux (using Docker): - Rocky Linux 9 - Debian 13 (trixie) - AlmaLinux latest Windows: - x64 - Win32 macOS: - macOS 15 (Sequoia) The workflow runs on push to master, pull requests, and can be triggered manually. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 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..ec06bbd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,71 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + +jobs: + build-linux: + name: Build on ${{ matrix.name }} + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + include: + - name: Rocky Linux 9 + image: rockylinux:9 + install_cmd: dnf install -y cmake gcc gcc-c++ make + + - name: Debian 13 (trixie) + image: debian:trixie + install_cmd: apt-get update && apt-get install -y cmake gcc g++ make + + - name: AlmaLinux latest + image: almalinux:latest + install_cmd: dnf install -y cmake gcc gcc-c++ make + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Build in Docker + run: | + docker run --rm \ + -v "${{ github.workspace }}:/workspace" \ + -w /workspace \ + ${{ matrix.image }} \ + sh -c "${{ matrix.install_cmd }} && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --verbose" + + build-windows: + name: Build on Windows (${{ matrix.arch }}) + runs-on: windows-2022 + strategy: + fail-fast: false + matrix: + arch: [x64, Win32] + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Build + run: | + cmake -B build -A ${{ matrix.arch }} + cmake --build build --config Release --verbose + + build-macos: + name: Build on macOS + runs-on: macos-15 + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Build + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release + cmake --build build --verbose