@@ -91,15 +91,15 @@ jobs:
9191
9292 # --- C++ build, test, and coverage report ---
9393 - name : Install compiler and dependencies
94- run : sudo apt-get update && sudo apt-get install -y gcc-13 g++-13 lcov
94+ run : sudo apt-get update && sudo apt-get install -y clang-18 libomp-18-dev llvm-18 lcov
9595
9696 - name : CMake configure
9797 run : >-
9898 cmake -B build_dir
9999 -DCMAKE_BUILD_TYPE=RelWithDebInfo
100100 -DDTWC_ENABLE_IPO=OFF
101- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O1 -g"
102- -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O1 -g"
101+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g"
102+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g"
103103 -DDTWC_ENABLE_COVERAGE:BOOL=TRUE
104104 -DDTWC_BUILD_TESTING=ON
105105 -DDTWC_BUILD_EXAMPLES=ON
@@ -108,15 +108,17 @@ jobs:
108108 -DDTWC_ENABLE_LLFIO=OFF
109109 -DDTWC_ENABLE_CPUINFO=OFF
110110 env :
111- CC : gcc-13
112- CXX : g ++-13
111+ CC : clang-18
112+ CXX : clang ++-18
113113
114114 - name : CMake build
115115 run : cmake --build build_dir --parallel 2
116116
117117 - name : Run tests
118118 run : ctest -j2 -C RelWithDebInfo --output-on-failure
119119 working-directory : build_dir
120+ env :
121+ OMP_NUM_THREADS : 2
120122
121123 - name : Execute documented C++ quickstart verbatim
122124 run : ./build_dir/bin/example_quickstart tests/conformance/data/conformance_series.csv
@@ -127,7 +129,9 @@ jobs:
127129 # Generate the lcov trace file (also consumed by genhtml below).
128130 - name : Generate coverage info
129131 run : |
130- lcov --gcov-tool gcov-13 --directory . --capture --output-file coverage.info --ignore-errors mismatch,gcov,negative,inconsistent,unused
132+ printf '#!/bin/sh\nexec llvm-cov-18 gcov "$@"\n' > /tmp/llvm-gcov.sh
133+ chmod +x /tmp/llvm-gcov.sh
134+ lcov --gcov-tool /tmp/llvm-gcov.sh --directory . --capture --output-file coverage.info --ignore-errors mismatch,gcov,negative,inconsistent,unused
131135 lcov --remove coverage.info '*/tests/*' '*/extern/*' '*/_deps/*' '/usr/*' '*/catch2/*' --output-file coverage.info --ignore-errors mismatch,gcov,negative,inconsistent,unused
132136 lcov --list coverage.info --ignore-errors inconsistent,mismatch,negative,unused
133137 working-directory : build_dir
@@ -250,16 +254,16 @@ jobs:
250254
251255 - name : Install compiler and dependencies for sibling coverage
252256 if : steps.check_hugo.outputs.has_hugo == 'true'
253- run : sudo apt-get update && sudo apt-get install -y gcc-13 g++-13 lcov
257+ run : sudo apt-get update && sudo apt-get install -y clang-18 libomp-18-dev llvm-18 lcov
254258
255259 - name : CMake configure (sibling)
256260 if : steps.check_hugo.outputs.has_hugo == 'true'
257261 run : >-
258262 cmake -B build_dir
259263 -DCMAKE_BUILD_TYPE=RelWithDebInfo
260264 -DDTWC_ENABLE_IPO=OFF
261- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O1 -g"
262- -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O1 -g"
265+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g"
266+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O2 -g"
263267 -DDTWC_ENABLE_COVERAGE:BOOL=TRUE
264268 -DDTWC_BUILD_TESTING=ON
265269 -DDTWC_BUILD_EXAMPLES=ON
@@ -268,8 +272,8 @@ jobs:
268272 -DDTWC_ENABLE_LLFIO=OFF
269273 -DDTWC_ENABLE_CPUINFO=OFF
270274 env :
271- CC : gcc-13
272- CXX : g ++-13
275+ CC : clang-18
276+ CXX : clang ++-18
273277
274278 - name : CMake build (sibling)
275279 if : steps.check_hugo.outputs.has_hugo == 'true'
@@ -279,12 +283,16 @@ jobs:
279283 if : steps.check_hugo.outputs.has_hugo == 'true'
280284 run : ctest -j2 -C RelWithDebInfo --output-on-failure
281285 working-directory : build_dir
286+ env :
287+ OMP_NUM_THREADS : 2
282288
283289 - name : Generate sibling LCOV report
284290 if : steps.check_hugo.outputs.has_hugo == 'true'
285291 working-directory : build_dir
286292 run : |
287- lcov --gcov-tool gcov-13 --directory . --capture --output-file coverage.info --ignore-errors mismatch,gcov,negative,inconsistent,unused
293+ printf '#!/bin/sh\nexec llvm-cov-18 gcov "$@"\n' > /tmp/llvm-gcov.sh
294+ chmod +x /tmp/llvm-gcov.sh
295+ lcov --gcov-tool /tmp/llvm-gcov.sh --directory . --capture --output-file coverage.info --ignore-errors mismatch,gcov,negative,inconsistent,unused
288296 lcov --remove coverage.info '*/tests/*' '*/extern/*' '*/_deps/*' '/usr/*' '*/catch2/*' --output-file coverage.info --ignore-errors mismatch,gcov,negative,inconsistent,unused
289297 genhtml coverage.info -o Coverage --ignore-errors inconsistent,mismatch,negative,unused
290298 mv ./Coverage ../docs/public/Coverage
0 commit comments