Skip to content

Commit 3d2df91

Browse files
peponeclaude
andauthored
Add CI workflow for build verification (#16)
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 <noreply@anthropic.com>
1 parent feed40d commit 3d2df91

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-linux:
14+
name: Build on ${{ matrix.name }}
15+
runs-on: ubuntu-24.04
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- name: Rocky Linux 9
21+
image: rockylinux:9
22+
install_cmd: dnf install -y cmake gcc gcc-c++ make
23+
24+
- name: Debian 13 (trixie)
25+
image: debian:trixie
26+
install_cmd: apt-get update && apt-get install -y cmake gcc g++ make
27+
28+
- name: AlmaLinux latest
29+
image: almalinux:latest
30+
install_cmd: dnf install -y cmake gcc gcc-c++ make
31+
32+
steps:
33+
- name: Check out repository
34+
uses: actions/checkout@v4
35+
36+
- name: Build in Docker
37+
run: |
38+
docker run --rm \
39+
-v "${{ github.workspace }}:/workspace" \
40+
-w /workspace \
41+
${{ matrix.image }} \
42+
sh -c "${{ matrix.install_cmd }} && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build --verbose"
43+
44+
build-windows:
45+
name: Build on Windows (${{ matrix.arch }})
46+
runs-on: windows-2022
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
arch: [x64, Win32]
51+
52+
steps:
53+
- name: Check out repository
54+
uses: actions/checkout@v4
55+
56+
- name: Build
57+
run: |
58+
cmake -B build -A ${{ matrix.arch }}
59+
cmake --build build --config Release --verbose
60+
61+
build-macos:
62+
name: Build on macOS
63+
runs-on: macos-15
64+
steps:
65+
- name: Check out repository
66+
uses: actions/checkout@v4
67+
68+
- name: Build
69+
run: |
70+
cmake -B build -DCMAKE_BUILD_TYPE=Release
71+
cmake --build build --verbose

0 commit comments

Comments
 (0)