-
Notifications
You must be signed in to change notification settings - Fork 78
206 lines (200 loc) · 5.69 KB
/
build_cmake.yml
File metadata and controls
206 lines (200 loc) · 5.69 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: C/C++ CI
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build-native:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "macOS 15, Clang",
os: macos-15,
test_target: test,
cc: "clang", cxx: "clang++"
}
- {
name: "Windows 2025, MSVC",
os: windows-2025,
test_target: RUN_TESTS,
cc: "cl", cxx: "cl"
}
#- {
# name: "Windows Latest, MinGW+gcc",
# os: windows-latest,
# cc: "gcc", cxx: "g++"
# }
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Configure
run: cmake -B build -S . -DCMAKE_INSTALL_PREFIX=./install_test
- name: Build C++ unit tests
run: cmake --build build --config Release
- name: Run C++ tests
run: cmake --build build --config Release --target ${{ matrix.config.test_target }}
- name: Install headers
run: cmake --build build -t install
build-ubuntu-gcc:
name: Compiler / ${{ matrix.config.name }}
runs-on: ubuntu-24.04
container:
image: ${{ matrix.config.image }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu 24.04, GCC 9",
image: "ubuntu:24.04",
test_target: test,
cc: "gcc-9", cxx: "g++-9",
packages: "gcc-9 g++-9",
cxx_standard: "11"
}
- {
name: "Ubuntu 24.04, GCC 10",
image: "ubuntu:24.04",
test_target: test,
cc: "gcc-10", cxx: "g++-10",
packages: "gcc-10 g++-10",
cxx_standard: "11"
}
- {
name: "Ubuntu 24.04, GCC 11",
image: "ubuntu:24.04",
test_target: test,
cc: "gcc-11", cxx: "g++-11",
packages: "gcc-11 g++-11",
cxx_standard: "11"
}
- {
name: "Ubuntu 24.04, GCC 12",
image: "ubuntu:24.04",
test_target: test,
cc: "gcc-12", cxx: "g++-12",
packages: "gcc-12 g++-12",
cxx_standard: "11"
}
- {
name: "Ubuntu 24.04, GCC 13",
image: "ubuntu:24.04",
test_target: test,
cc: "gcc-13", cxx: "g++-13",
packages: "gcc-13 g++-13",
cxx_standard: "11"
}
- {
name: "Ubuntu 24.04, GCC 14",
image: "ubuntu:24.04",
test_target: test,
cc: "gcc-14", cxx: "g++-14",
packages: "gcc-14 g++-14",
cxx_standard: "11"
}
- {
name: "Ubuntu 25.10, GCC 15",
image: "ubuntu:25.10",
test_target: test,
cc: "gcc-15", cxx: "g++-15",
packages: "gcc-15 g++-15",
cxx_standard: "11"
}
steps:
- name: Install build dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
git \
make \
${{ matrix.config.packages }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Configure
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: cmake -B build -S . -DCMAKE_CXX_STANDARD=${{ matrix.config.cxx_standard }} -DCMAKE_INSTALL_PREFIX=./install_test
- name: Build C++ unit tests
run: cmake --build build --config Release
- name: Run C++ tests
run: cmake --build build --config Release --target ${{ matrix.config.test_target }}
- name: Install headers
run: cmake --build build -t install
build-ubuntu-std:
name: Standard / Ubuntu 25.10, GCC 15, C++${{ matrix.config.cxx_standard }}
runs-on: ubuntu-24.04
container:
image: ubuntu:25.10
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
config:
- {
cxx_standard: "11",
test_target: test
}
- {
cxx_standard: "14",
test_target: test
}
- {
cxx_standard: "17",
test_target: test
}
- {
cxx_standard: "20",
test_target: test
}
- {
cxx_standard: "23",
test_target: test,
}
steps:
- name: Install build dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
gcc-15 \
g++-15 \
git \
make
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Configure
env:
CC: gcc-15
CXX: g++-15
run: cmake -B build -S . -DCMAKE_CXX_STANDARD=${{ matrix.config.cxx_standard }} -DCMAKE_INSTALL_PREFIX=./install_test
- name: Build C++ unit tests
run: cmake --build build --config Release
- name: Run C++ tests
run: cmake --build build --config Release --target ${{ matrix.config.test_target }}
- name: Install headers
run: cmake --build build -t install