Skip to content

Commit 4b5b8a4

Browse files
committed
feat: add GitHub Actions CI for build and test
1 parent 024126f commit 4b5b8a4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI Build and Test
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build_and_test:
12+
name: ${{ matrix.os }} Build
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, windows-latest]
17+
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- name: Checkout Code
22+
uses: actions/checkout@v4
23+
24+
- name: Configure CMake
25+
26+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
27+
28+
- name: Build Project
29+
run: cmake --build build --config Release
30+
31+
- name: Run Unit Tests
32+
33+
working-directory: ./build
34+
shell: bash
35+
run: |
36+
if [[ "${{ runner.os }}" == "Windows" ]]; then
37+
ctest -C Release --output-on-failure
38+
else
39+
ctest --output-on-failure
40+
fi
41+
42+

0 commit comments

Comments
 (0)