-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (131 loc) · 4.71 KB
/
linux.yml
File metadata and controls
158 lines (131 loc) · 4.71 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
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
name: linux
on: [push, pull_request]
jobs:
Build:
name: ${{matrix.name}} (${{matrix.config}})
runs-on: ${{matrix.os}}
env:
CMAKE_GENERATOR: Ninja
strategy:
fail-fast: false
matrix:
name: [
ubuntu-22.04-gcc-11,
ubuntu-22.04-gcc-12,
ubuntu-24.04-gcc-12,
ubuntu-24.04-gcc-13,
ubuntu-24.04-gcc-14,
ubuntu-22.04-clang-11,
ubuntu-22.04-clang-12,
ubuntu-22.04-clang-13,
ubuntu-22.04-clang-14,
ubuntu-22.04-clang-15,
ubuntu-24.04-clang-16,
ubuntu-24.04-clang-17,
ubuntu-24.04-clang-18
]
config: [Debug, Release]
include:
- name: ubuntu-22.04-gcc-11
os: ubuntu-22.04
compiler: gcc
version: 11
- name: ubuntu-22.04-gcc-12
os: ubuntu-22.04
compiler: gcc
version: 12
- name: ubuntu-24.04-gcc-12
os: ubuntu-24.04
compiler: gcc
version: 12
- name: ubuntu-24.04-gcc-13
os: ubuntu-24.04
compiler: gcc
version: 13
- name: ubuntu-24.04-gcc-14
os: ubuntu-24.04
compiler: gcc
version: 14
- name: ubuntu-22.04-clang-11
os: ubuntu-22.04
compiler: clang
version: 11
- name: ubuntu-22.04-clang-12
os: ubuntu-22.04
compiler: clang
version: 12
- name: ubuntu-22.04-clang-13
os: ubuntu-22.04
compiler: clang
version: 13
- name: ubuntu-22.04-clang-14
os: ubuntu-22.04
compiler: clang
version: 14
- name: ubuntu-22.04-clang-15
os: ubuntu-22.04
compiler: clang
version: 15
- name: ubuntu-24.04-clang-16
os: ubuntu-24.04
compiler: clang
version: 16
- name: ubuntu-24.04-clang-17
os: ubuntu-24.04
compiler: clang
version: 17
- name: ubuntu-24.04-clang-18
os: ubuntu-24.04
compiler: clang
version: 18
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
sudo apt update
sudo apt install -y ninja-build
sudo apt install -y doxygen graphviz
sudo apt install -y libicu-dev
sudo apt install -y libsqlite3-dev
sudo apt install -y libx11-dev
if [ "${{matrix.compiler}}" = "gcc" ]; then
sudo apt install -y g++-${{matrix.version}}
echo "CC=gcc-${{matrix.version}}" >> $GITHUB_ENV
echo "CXX=g++-${{matrix.version}}" >> $GITHUB_ENV
else
sudo apt install -y clang-${{matrix.version}} lld-${{matrix.version}}
sudo apt install -y libc++-${{matrix.version}}-dev libc++abi-${{matrix.version}}-dev
# libunwind is new to clang-12, but not a dependency for the initial version
if [ "${{matrix.version}}" = "12" ]; then
sudo apt install -y libunwind-${{matrix.version}}-dev
fi
echo "CC=clang-${{matrix.version}}" >> $GITHUB_ENV
echo "CXX=clang++-${{matrix.version}}" >> $GITHUB_ENV
fi
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE:STRING=${{matrix.config}}
- name: Build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.config}}
- name: Test
working-directory: ${{runner.workspace}}/build
run: ctest --output-on-failure -C ${{matrix.config}}
- name: Coverage
if: matrix.compiler == 'clang' && matrix.config == 'Debug'
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target coverage
- name: Archive Coverage
if: matrix.compiler == 'clang' && matrix.config == 'Debug'
uses: actions/upload-artifact@v4
with:
name: coverage-linux.${{matrix.compiler}}-${{matrix.version}}
path: |
${{runner.workspace}}/build/tests/coverage.${{matrix.compiler}}-${{matrix.version}}.txt
${{runner.workspace}}/build/tests/coverage.overview.${{matrix.compiler}}-${{matrix.version}}.txt
overwrite: true
- name: Documentation
working-directory: ${{runner.workspace}}/build
run: cmake --build . --target documentation