Skip to content

Commit 2ea124d

Browse files
committed
ci: fix GCC 12 ASan AVX-512 alignment and switch docs coverage to Clang 18
- Pin -DDTWC_ARCH_LEVEL=v3 on Ubuntu unit gcc-12 (ASan+UBSan) so AWS EC2 AVX-512 runners do not emit 64-byte aligned stores into 32-byte-aligned ASan fake-stack frames. - Switch coverage builds in documentation.yml (build and build-sibling) to clang-18 (-O2 -g --coverage) with llvm-cov-18 gcov and OMP_NUM_THREADS=2 so SIMD lanes stay vectorized under coverage instrumentation and finish well within CTest timeouts.
1 parent c15b78d commit 2ea124d

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

‎.github/workflows/documentation.yml‎

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

‎.github/workflows/ubuntu-unit.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
if [ "${{ matrix.sanitizer }}" = "true" ]; then
5555
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDTWC_ENABLE_IPO=OFF -DDTWC_BUILD_TESTING=ON \
5656
-DDTWC_ENABLE_SANITIZER_ADDRESS=ON -DDTWC_ENABLE_SANITIZER_UNDEFINED=ON \
57+
-DDTWC_ARCH_LEVEL=v3 \
5758
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O1 -g -fno-omit-frame-pointer" \
5859
-DCMAKE_C_FLAGS_RELWITHDEBINFO="-O1 -g -fno-omit-frame-pointer"
5960
else

0 commit comments

Comments
 (0)