-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (50 loc) · 1.52 KB
/
ci.yml
File metadata and controls
61 lines (50 loc) · 1.52 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
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
config: [Debug, Release]
arch: [x64, x86]
steps:
- uses: actions/checkout@v4
- name: Setup MSVC
uses: microsoft/setup-msbuild@v2
- name: Configure CMake
run: |
cmake -B build -A ${{ matrix.arch == 'x64' && 'x64' || 'Win32' }} \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DPHANTOM_BUILD_EXAMPLES=ON \
-DPHANTOM_BUILD_TESTS=ON
- name: Build
run: cmake --build build --config ${{ matrix.config }} --parallel
- name: Run Tests
if: matrix.config == 'Debug'
run: ctest --test-dir build --config ${{ matrix.config }} --output-on-failure --timeout 60
- name: Upload Artifacts
if: matrix.config == 'Release'
uses: actions/upload-artifact@v4
with:
name: phantom-screen-${{ matrix.arch }}-${{ matrix.config }}
path: |
build/${{ matrix.config }}/*.exe
build/${{ matrix.config }}/*.lib
lint:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install cppcheck
run: choco install cppcheck -y
- name: Run cppcheck
run: |
cppcheck --enable=warning,style,performance \
--suppress=missingIncludeSystem \
--inline-suppr \
-I include \
--error-exitcode=1 \
src/