Skip to content

Commit 0d3e445

Browse files
committed
Add github ci workflow
1 parent f5e4937 commit 0d3e445

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
matrix:
18+
os: [macos-12, ubuntu-24.04, windows-2022]
19+
20+
type: [shared, static]
21+
22+
include:
23+
- {type: shared, shared: YES}
24+
- {type: static, shared: NO}
25+
26+
runs-on: ${{ matrix.os }}
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install static analyzers
32+
if: matrix.os == 'ubuntu-24.04'
33+
run: >-
34+
sudo apt-get install clang-tidy-18 ninja-build -y -q
35+
36+
sudo update-alternatives --install
37+
/usr/bin/clang-tidy clang-tidy
38+
/usr/bin/clang-tidy-18 140
39+
40+
- name: Setup MultiToolTask
41+
if: matrix.os == 'windows-2022'
42+
run: |
43+
Add-Content "$env:GITHUB_ENV" 'UseMultiToolTask=true'
44+
Add-Content "$env:GITHUB_ENV" 'EnforceProcessCountAcrossBuilds=true'
45+
46+
- name: Configure
47+
shell: pwsh
48+
run: cmake "--preset=Release -D BUILD_SHARED_LIBS=${{ matrix.shared }}
49+
50+
- name: Setup PATH
51+
if: matrix.os == 'windows-2022' && matrix.type == 'shared'
52+
run: Add-Content "$env:GITHUB_PATH" "$(Get-Location)\build\Release"
53+
54+
- name: Build
55+
run: cmake --build build --config Release -j 2
56+
57+
- name: Test
58+
working-directory: build
59+
run: ctest --output-on-failure --no-tests=error -C Release -j 2
60+
61+
- name: Install
62+
run: cmake --install build --config Release --prefix prefix

0 commit comments

Comments
 (0)