Skip to content

Commit 933e43c

Browse files
committed
Add github CI workflow
1 parent f5e4937 commit 933e43c

File tree

4 files changed

+73
-3
lines changed

4 files changed

+73
-3
lines changed

Diff for: .github/workflows/ci.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
name: Continuous Integration
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
- develop
9+
10+
pull_request:
11+
branches:
12+
- develop
13+
14+
jobs:
15+
test:
16+
strategy:
17+
fail-fast: false
18+
19+
matrix:
20+
os: [macos-15, ubuntu-24.04, windows-2022]
21+
22+
# type: [shared, static]
23+
24+
# include:
25+
# - {type: shared, shared: YES}
26+
# - {type: static, shared: NO}
27+
28+
runs-on: ${{ matrix.os }}
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Install static analyzers
34+
if: matrix.os == 'macos-15'
35+
run: >-
36+
brew install llvm@18 cmake ninja
37+
38+
- name: Install static analyzers
39+
if: matrix.os == 'ubuntu-24.04'
40+
run: >-
41+
sudo apt-get install clang-tidy-18 ninja-build -y -q
42+
43+
sudo update-alternatives --install
44+
/usr/bin/clang-tidy clang-tidy
45+
/usr/bin/clang-tidy-18 140
46+
47+
- name: Setup MultiToolTask
48+
if: matrix.os == 'windows-2022'
49+
run: |
50+
Add-Content "$env:GITHUB_ENV" 'UseMultiToolTask=true'
51+
Add-Content "$env:GITHUB_ENV" 'EnforceProcessCountAcrossBuilds=true'
52+
53+
- name: Configure
54+
shell: pwsh
55+
run: cmake --preset=Debug # -D BUILD_SHARED_LIBS=${{ matrix.shared }}
56+
57+
- name: Setup PATH
58+
if: matrix.os == 'windows-2022' && matrix.type == 'shared'
59+
run: Add-Content "$env:GITHUB_PATH" "$(Get-Location)\build\Debug"
60+
61+
- name: Build
62+
run: cmake --build build --config Debug -j 2
63+
64+
- name: Test
65+
working-directory: build
66+
run: ctest --output-on-failure --no-tests=error -C Debug -j 2
67+
68+
- name: Install
69+
run: cmake --install build --config Debug --prefix prefix

Diff for: CMakeGenericPresets.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
"warnings": {
2828
"dev": true,
2929
"deprecated": true,
30-
"uninitialized": true,
31-
"unusedCli": true,
30+
"uninitialized": false,
31+
"unusedCli": false,
3232
"systemVars": false
3333
},
3434
"errors": {

Diff for: CMakeLinuxPresets.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"ci-std"
1818
],
1919
"cacheVariables": {
20-
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wsign-conversion -Wcast-align -Wcast-qual -Wnull-dereference -Woverloaded-virtual -Wformat=2 -Werror"
20+
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wsign-conversion -Wcast-align -Wcast-qual -Wno-null-dereference -Woverloaded-virtual -Wformat=2 -Werror"
2121
},
2222
"condition": {
2323
"type": "notEquals",

Diff for: CMakeWindowsPresets.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"inherits": [
3232
"ci-std",
3333
"dev-mode"
34+
]
3435
}
3536
]
3637
}

0 commit comments

Comments
 (0)