-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (50 loc) · 1.48 KB
/
ci.yml
File metadata and controls
65 lines (50 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
build-windows:
runs-on: windows-latest
strategy:
matrix:
arch: [x64, x86]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B build -A ${{ matrix.arch == 'x64' && 'x64' || 'Win32' }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
run: cmake --build build --config ${{ matrix.build_type }}
- name: Run tests
run: ctest --test-dir build --build-config ${{ matrix.build_type }} --output-on-failure
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential
- name: Configure
run: |
if [ "${{ matrix.compiler }}" = "clang" ]; then
export CC=clang CXX=clang++
fi
cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build -j$(nproc)
- name: Run tests
run: ctest --test-dir build --output-on-failure
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cppcheck
run: sudo apt-get install -y cppcheck
- name: Run cppcheck
run: cppcheck --enable=all --suppress=missingInclude --error-exitcode=1 src/ include/