-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (108 loc) · 3.09 KB
/
Copy pathci.yml
File metadata and controls
128 lines (108 loc) · 3.09 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
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
format:
name: clang-format
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y clang-format-18
- name: Check formatting
run: |
find include tests \( -name '*.hpp' -o -name '*.cpp' \) -print0 \
| xargs -0 clang-format-18 --dry-run --Werror
clang-tidy:
name: clang-tidy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
ninja-build \
qt6-base-dev \
libgl1-mesa-dev
- name: Install clang-tidy 20
run: |
wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
chmod +x /tmp/llvm.sh
sudo /tmp/llvm.sh 20
sudo apt-get install -y clang-tidy-20
- name: Configure
run: >
cmake -S . -B build
-G Ninja
-DBUILD_TESTING=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# The self-containment TU is generated at configure time and clang-tidy
# compiles it itself, so no build step is needed. WarningsAsErrors in
# .clang-tidy turns any finding into a non-zero exit.
- name: Run clang-tidy
run: >
clang-tidy-20
-p build
--config-file=.clang-tidy
"$PWD/build/tests/headers_self_contained.cpp"
build-and-test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- compiler: gcc
cc: gcc-14
cxx: g++-14
build_type: Debug
- compiler: gcc
cc: gcc-14
cxx: g++-14
build_type: Release
- compiler: clang
cc: clang-19
cxx: clang++-19
build_type: Debug
- compiler: clang
cc: clang-19
cxx: clang++-19
build_type: Release
name: ${{ matrix.compiler }} · ${{ matrix.build_type }}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
ninja-build \
qt6-base-dev \
libgl1-mesa-dev
- name: Install Clang 19
if: matrix.compiler == 'clang'
run: |
wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
chmod +x /tmp/llvm.sh
sudo /tmp/llvm.sh 19
- name: Configure
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: >
cmake -S . -B build
-G Ninja
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBUILD_TESTING=ON
- name: Build
run: cmake --build build --parallel
- name: Test
run: ctest --test-dir build --output-on-failure --parallel