Skip to content

Commit f5df683

Browse files
etrclaude
andcommitted
Update CI for Ubuntu 24.04 compatibility
- Update sanitizer builds (asan, lsan, tsan, ubsan) from clang-13 to clang-18 - Move clang-11, clang-12, clang-13 tests to ubuntu-22.04 - Add new clang-14 through clang-17 tests on ubuntu-latest - Add gcc-11 through gcc-14 tests - Remove obsolete ubuntu-20.04 jobs (gcc-7, gcc-8, clang-6 through clang-10) - Update IWYU job to use clang-18 on ubuntu-latest - Fix cpplint errors: add missing includes and fix namespace indentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 47530ed commit f5df683

26 files changed

+117
-57
lines changed

.github/workflows/verify-build.yml

Lines changed: 57 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
os-type: ubuntu
5959
build-type: asan
6060
compiler-family: clang
61-
c-compiler: clang-13
62-
cc-compiler: clang++-13
61+
c-compiler: clang-18
62+
cc-compiler: clang++-18
6363
debug: debug
6464
coverage: nocoverage
6565
# This test gives false positives on newer versions of clang
@@ -78,134 +78,143 @@ jobs:
7878
os-type: ubuntu
7979
build-type: lsan
8080
compiler-family: clang
81-
c-compiler: clang-13
82-
cc-compiler: clang++-13
81+
c-compiler: clang-18
82+
cc-compiler: clang++-18
8383
debug: debug
8484
coverage: nocoverage
8585
- test-group: extra
8686
os: ubuntu-latest
8787
os-type: ubuntu
8888
build-type: tsan
8989
compiler-family: clang
90-
c-compiler: clang-13
91-
cc-compiler: clang++-13
90+
c-compiler: clang-18
91+
cc-compiler: clang++-18
9292
debug: debug
9393
coverage: nocoverage
9494
- test-group: extra
9595
os: ubuntu-latest
9696
os-type: ubuntu
9797
build-type: ubsan
9898
compiler-family: clang
99-
c-compiler: clang-13
100-
cc-compiler: clang++-13
99+
c-compiler: clang-18
100+
cc-compiler: clang++-18
101101
debug: debug
102102
coverage: nocoverage
103103
- test-group: extra
104-
os: ubuntu-20.04
104+
os: ubuntu-latest
105105
os-type: ubuntu
106106
build-type: none
107107
compiler-family: gcc
108-
c-compiler: gcc-7
109-
cc-compiler: g++-7
108+
c-compiler: gcc-9
109+
cc-compiler: g++-9
110110
debug: nodebug
111111
coverage: nocoverage
112112
- test-group: extra
113-
os: ubuntu-20.04
113+
os: ubuntu-latest
114114
os-type: ubuntu
115115
build-type: none
116116
compiler-family: gcc
117-
c-compiler: gcc-8
118-
cc-compiler: g++-8
117+
c-compiler: gcc-10
118+
cc-compiler: g++-10
119119
debug: nodebug
120120
coverage: nocoverage
121121
- test-group: extra
122122
os: ubuntu-latest
123123
os-type: ubuntu
124124
build-type: none
125125
compiler-family: gcc
126-
c-compiler: gcc-9
127-
cc-compiler: g++-9
126+
c-compiler: gcc-11
127+
cc-compiler: g++-11
128128
debug: nodebug
129129
coverage: nocoverage
130130
- test-group: extra
131131
os: ubuntu-latest
132132
os-type: ubuntu
133133
build-type: none
134134
compiler-family: gcc
135-
c-compiler: gcc-10
136-
cc-compiler: g++-10
135+
c-compiler: gcc-12
136+
cc-compiler: g++-12
137137
debug: nodebug
138138
coverage: nocoverage
139139
- test-group: extra
140-
os: ubuntu-20.04
140+
os: ubuntu-latest
141141
os-type: ubuntu
142142
build-type: none
143-
compiler-family: clang
144-
c-compiler: clang-6.0
145-
cc-compiler: clang++-6.0
143+
compiler-family: gcc
144+
c-compiler: gcc-13
145+
cc-compiler: g++-13
146146
debug: nodebug
147147
coverage: nocoverage
148148
- test-group: extra
149-
os: ubuntu-20.04
149+
os: ubuntu-latest
150+
os-type: ubuntu
151+
build-type: none
152+
compiler-family: gcc
153+
c-compiler: gcc-14
154+
cc-compiler: g++-14
155+
debug: nodebug
156+
coverage: nocoverage
157+
- test-group: extra
158+
os: ubuntu-22.04
150159
os-type: ubuntu
151160
build-type: none
152161
compiler-family: clang
153-
c-compiler: clang-7
154-
cc-compiler: clang++-7
162+
c-compiler: clang-11
163+
cc-compiler: clang++-11
155164
debug: nodebug
156165
coverage: nocoverage
157166
- test-group: extra
158-
os: ubuntu-20.04
167+
os: ubuntu-22.04
159168
os-type: ubuntu
160169
build-type: none
161170
compiler-family: clang
162-
c-compiler: clang-8
163-
cc-compiler: clang++-8
171+
c-compiler: clang-12
172+
cc-compiler: clang++-12
164173
debug: nodebug
165174
coverage: nocoverage
166175
- test-group: extra
167-
os: ubuntu-20.04
176+
os: ubuntu-22.04
168177
os-type: ubuntu
169178
build-type: none
170179
compiler-family: clang
171-
c-compiler: clang-9
172-
cc-compiler: clang++-9
180+
c-compiler: clang-13
181+
cc-compiler: clang++-13
173182
debug: nodebug
174183
coverage: nocoverage
175184
- test-group: extra
176-
os: ubuntu-20.04
185+
os: ubuntu-latest
177186
os-type: ubuntu
178187
build-type: none
179188
compiler-family: clang
180-
c-compiler: clang-10
181-
cc-compiler: clang++-10
189+
c-compiler: clang-14
190+
cc-compiler: clang++-14
182191
debug: nodebug
183192
coverage: nocoverage
184193
- test-group: extra
185194
os: ubuntu-latest
186195
os-type: ubuntu
187196
build-type: none
188197
compiler-family: clang
189-
c-compiler: clang-11
190-
cc-compiler: clang++-11
198+
c-compiler: clang-15
199+
cc-compiler: clang++-15
191200
debug: nodebug
192201
coverage: nocoverage
193202
- test-group: extra
194203
os: ubuntu-latest
195204
os-type: ubuntu
196205
build-type: none
197206
compiler-family: clang
198-
c-compiler: clang-12
199-
cc-compiler: clang++-12
207+
c-compiler: clang-16
208+
cc-compiler: clang++-16
200209
debug: nodebug
201210
coverage: nocoverage
202211
- test-group: extra
203212
os: ubuntu-latest
204213
os-type: ubuntu
205214
build-type: none
206215
compiler-family: clang
207-
c-compiler: clang-13
208-
cc-compiler: clang++-13
216+
c-compiler: clang-17
217+
cc-compiler: clang++-17
209218
debug: nodebug
210219
coverage: nocoverage
211220
- test-group: extra
@@ -218,12 +227,12 @@ jobs:
218227
debug: nodebug
219228
coverage: nocoverage
220229
- test-group: extra
221-
os: ubuntu-20.04
230+
os: ubuntu-latest
222231
os-type: ubuntu
223232
build-type: iwyu
224233
compiler-family: clang
225-
c-compiler: clang-9
226-
cc-compiler: clang++-9
234+
c-compiler: clang-18
235+
cc-compiler: clang++-18
227236
debug: nodebug
228237
coverage: nocoverage
229238
- test-group: performance
@@ -303,11 +312,7 @@ jobs:
303312

304313
- name: Install IWYU dependencies if needed
305314
run: |
306-
# Use same deps used by iwyu in their setup for travis
307-
sudo apt-get install llvm-9-dev llvm-9-tools libclang-9-dev ;
308-
# Use same CMAKE used by iwyu in their setup for travis
309-
wget -O cmake.sh https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh ;
310-
sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local ;
315+
sudo apt-get install llvm-18-dev libclang-18-dev clang-18 ;
311316
if: ${{ matrix.build-type == 'iwyu' && matrix.os-type == 'ubuntu' }}
312317

313318
- name: IWYU from cache (for testing)
@@ -321,11 +326,11 @@ jobs:
321326
# Installing iwyu manually because clang and iwyu paths won't match on Ubuntu otherwise.
322327
- name: Build IWYU if requested
323328
run: |
324-
CLANG_ROOT_PATH=`llvm-config-9 --prefix` ;
325-
CLANG_BIN_PATH=`llvm-config-9 --bindir` ;
326-
curl "https://libhttpserver.s3.amazonaws.com/travis_stuff/include-what-you-use-clang-9.tgz" -o "include-what-you-use-clang-9.tgz" ;
327-
tar -xzf "include-what-you-use-clang-9.tgz" ;
329+
CLANG_ROOT_PATH=`llvm-config-18 --prefix` ;
330+
CLANG_BIN_PATH=`llvm-config-18 --bindir` ;
331+
git clone https://github.com/include-what-you-use/include-what-you-use.git ;
328332
cd include-what-you-use ;
333+
git checkout clang_18 ;
329334
mkdir build_iwyu ;
330335
cd build_iwyu ;
331336
cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=$CLANG_ROOT_PATH -DCMAKE_C_COMPILER=$CLANG_BIN_PATH/clang -DCMAKE_CXX_COMPILER=$CLANG_BIN_PATH/clang++ ../ ;

examples/allowing_disallowing_methods.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
2123
#include <httpserver.hpp>
2224

2325
class hello_world_resource : public httpserver::http_resource {

examples/basic_authentication.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
#include <string>
23+
2124
#include <httpserver.hpp>
2225

2326
class user_pass_resource : public httpserver::http_resource {

examples/custom_access_log.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
*/
2020

2121
#include <iostream>
22+
#include <memory>
23+
#include <string>
2224

2325
#include <httpserver.hpp>
2426

examples/custom_error.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
2123
#include <httpserver.hpp>
2224

2325
std::shared_ptr<httpserver::http_response> not_found_custom(const httpserver::http_request&) {

examples/deferred_with_accumulator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
USA
1919
*/
2020

21+
#include <algorithm>
2122
#include <atomic>
2223
#include <cstring>
2324
// cpplint errors on chrono and thread because they are replaced (in Chromium) by other google libraries.
2425
// This is not an issue here.
2526
#include <chrono> // NOLINT [build/c++11]
27+
#include <memory>
28+
#include <string>
2629
#include <thread> // NOLINT [build/c++11]
2730

2831
#include <httpserver.hpp>

examples/digest_authentication.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
2123
#include <httpserver.hpp>
2224

2325
#define MY_OPAQUE "11733b200778ce33060f31c9af70a870ba96ddd4"

examples/file_upload.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
*/
2020

2121
#include <iostream>
22+
#include <memory>
23+
#include <string>
24+
2225
#include <httpserver.hpp>
2326

2427
class file_upload_resource : public httpserver::http_resource {

examples/handlers.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
2123
#include <httpserver.hpp>
2224

2325
class hello_world_resource : public httpserver::http_resource {

examples/hello_with_get_arg.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
#include <string>
23+
2124
#include <httpserver.hpp>
2225

2326
class hello_world_resource : public httpserver::http_resource {

0 commit comments

Comments
 (0)