-
Notifications
You must be signed in to change notification settings - Fork 1
164 lines (125 loc) · 3.72 KB
/
ci.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: CI
on: [push, pull_request, workflow_dispatch]
concurrency:
group: environment-${{github.ref}}
cancel-in-progress: true
jobs:
build:
name: ${{matrix.platform.name}} ${{matrix.type.name}} ${{matrix.config.name}}
runs-on: ${{matrix.platform.os}}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
platform:
- { name: Windows MSVC, os: windows-latest }
- { name: Windows ClangCL, os: windows-latest, flags: -T ClangCL }
- { name: Windows Clang, os: windows-latest, flags: -GNinja -DCMAKE_CXX_COMPILER=clang++ }
- { name: Linux GCC, os: ubuntu-latest }
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_CXX_COMPILER=clang++ }
- { name: macOS Clang, os: macos-latest, flags: -GXcode }
type:
- { name: Shared, flags: "ON" }
- { name: Static, flags: "OFF" }
config:
- { name: Debug }
- { name: Release }
steps:
- name: Get CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.22
ninjaVersion: latest
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh
- name: Configure
run: cmake --preset dev ${{matrix.platform.flags}} -DBUILD_SHARED_LIBS=${{matrix.type.flags}} -DCMAKE_BUILD_TYPE=${{matrix.config.name}} -DCMAKE_VERBOSE_MAKEFILE=ON
- name: Build
run: cmake --build --preset dev --config ${{matrix.config.name}}
- name: Test
run: ctest --preset dev --build-config ${{matrix.config.name}}
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh
- name: Configure
run: cmake --preset coverage
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
- name: Install Dependencies
run: sudo apt install gcovr
- name: Generate Coverage Report
run: gcovr -x build/coverage.out -s -f 'src/.*' -f 'include/argon/.*' .
- name: Upload Coverage Report
uses: codecov/codecov-action@v4
with:
directory: build
files: ./build/coverage.out
format:
name: clang-format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: cmake -B build
- name: Format
run: |
cmake --build build --target format
git diff --exit-code
tidy:
name: clang-tidy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh
- name: Configure
run: cmake --preset dev -DCMAKE_CXX_COMPILER=clang++
- name: Tidy
run: cmake --build build --target tidy
sanitize:
name: Sanitize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install Vcpkg
run: ./cmake/vcpkg/bootstrap-vcpkg.sh
- name: Configure
run: cmake --preset sanitizers
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Install Doxygen
run: sudo apt install doxygen graphviz
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: cmake -B build
- name: Build Doxygen Site
run: cmake --build build --target docs