Skip to content

Commit a6d59d0

Browse files
Remove Ubuntu 20.04 job from GitHub Actions
Move the tested compiler versions there to old-compilers.yml. Add a sanitizer workaround for Ubuntu 22.04-packaged clang 11. Fix a typo that prevented enabling -fsanitize=implicit-bitfield-conversion for clang 19 or later. Add extra CMake diagnostics in the case of its failure to build.yml and old-compilers.yml scripts.
1 parent 0ae5bb7 commit a6d59d0

4 files changed

Lines changed: 198 additions & 245 deletions

File tree

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,28 @@ jobs:
403403
export CC=clang
404404
export CXX=clang++
405405
fi
406+
set +e
406407
cmake -B build "$GITHUB_WORKSPACE" "$CBT" -DSTANDALONE=ON \
407408
-DMAINTAINER_MODE=ON -DIWYU=ON \
408409
"-DSANITIZE_ADDRESS=${SANITIZE_ADDRESS}" \
409410
"-DSANITIZE_THREAD=${SANITIZE_THREAD}" \
410411
"-DSANITIZE_UB=${SANITIZE_UB}" \
411412
"-DSTATIC_ANALYSIS=${STATIC_ANALYSIS}" "-DCOVERAGE=${COVERAGE}" \
412413
"-DAVX2=${AVX2}" "${EXTRA_CMAKE_ARGS[@]}"
414+
CMAKE_EXIT_CODE=$?
415+
if [ $CMAKE_EXIT_CODE -ne 0 ]; then
416+
if [ -f build/CMakeFiles/CMakeError.log ]; then
417+
echo "::group::CMakeError.log"
418+
cat build/CMakeFiles/CMakeError.log
419+
echo "::endgroup::"
420+
fi
421+
if [ -f build/CMakeFiles/CMakeOutput.log ]; then
422+
echo "::group::CMakeOutput.log"
423+
cat build/CMakeFiles/CMakeOutput.log
424+
echo "::endgroup::"
425+
fi
426+
exit 1
427+
fi
413428
414429
- name: Build
415430
working-directory: ${{github.workspace}}/build

.github/workflows/old-compilers.yml

Lines changed: 161 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,98 @@ jobs:
3535
fail-fast: false
3636
matrix:
3737
include:
38+
- name: clang 11 Release
39+
BUILD_TYPE: Release
40+
COMPILER: clang
41+
VERSION: 11
42+
43+
- name: clang 11 Release with ASan
44+
BUILD_TYPE: Release
45+
SANITIZE_ADDRESS: ON
46+
COMPILER: clang
47+
VERSION: 11
48+
49+
- name: clang 11 Release with TSan
50+
BUILD_TYPE: Release
51+
SANITIZE_THREAD: ON
52+
COMPILER: clang
53+
VERSION: 11
54+
55+
- name: clang 11 Release with UBSan
56+
BUILD_TYPE: Release
57+
SANITIZE_UB: ON
58+
COMPILER: clang
59+
VERSION: 11
60+
61+
- name: clang 11 Debug
62+
BUILD_TYPE: Debug
63+
COMPILER: clang
64+
VERSION: 11
65+
66+
- name: clang 11 Debug with ASan
67+
BUILD_TYPE: Debug
68+
SANITIZE_ADDRESS: ON
69+
COMPILER: clang
70+
VERSION: 11
71+
72+
- name: clang 11 Debug with TSan
73+
BUILD_TYPE: Debug
74+
SANITIZE_THREAD: ON
75+
COMPILER: clang
76+
VERSION: 11
77+
78+
- name: clang 11 Debug with UBSan
79+
BUILD_TYPE: Debug
80+
SANITIZE_UB: ON
81+
COMPILER: clang
82+
VERSION: 11
83+
84+
- name: clang 12 Release
85+
BUILD_TYPE: Release
86+
COMPILER: clang
87+
VERSION: 12
88+
89+
- name: clang 12 Release with ASan
90+
BUILD_TYPE: Release
91+
SANITIZE_ADDRESS: ON
92+
COMPILER: clang
93+
VERSION: 12
94+
95+
- name: clang 12 Release with TSan
96+
BUILD_TYPE: Release
97+
SANITIZE_THREAD: ON
98+
COMPILER: clang
99+
VERSION: 12
100+
101+
- name: clang 12 Release with UBSan
102+
BUILD_TYPE: Release
103+
SANITIZE_UB: ON
104+
COMPILER: clang
105+
VERSION: 12
106+
107+
- name: clang 12 Debug
108+
BUILD_TYPE: Debug
109+
COMPILER: clang
110+
VERSION: 12
111+
112+
- name: clang 12 Debug with ASan
113+
BUILD_TYPE: Debug
114+
SANITIZE_ADDRESS: ON
115+
COMPILER: clang
116+
VERSION: 12
117+
118+
- name: clang 12 Debug with TSan
119+
BUILD_TYPE: Debug
120+
SANITIZE_THREAD: ON
121+
COMPILER: clang
122+
VERSION: 12
123+
124+
- name: clang 12 Debug with UBSan
125+
BUILD_TYPE: Debug
126+
SANITIZE_UB: ON
127+
COMPILER: clang
128+
VERSION: 12
129+
38130
- name: clang 13 Release
39131
BUILD_TYPE: Release
40132
COMPILER: clang
@@ -377,6 +469,52 @@ jobs:
377469
COMPILER: clang
378470
VERSION: 19
379471

472+
- name: GCC 10 Release
473+
BUILD_TYPE: Release
474+
COMPILER: gcc
475+
VERSION: 10
476+
477+
- name: GCC 10 Release with ASan
478+
BUILD_TYPE: Release
479+
SANITIZE_ADDRESS: ON
480+
COMPILER: gcc
481+
VERSION: 10
482+
483+
- name: GCC 10 Release with TSan
484+
BUILD_TYPE: Release
485+
SANITIZE_THREAD: ON
486+
COMPILER: gcc
487+
VERSION: 10
488+
489+
- name: GCC 10 Release with UBSan
490+
BUILD_TYPE: Release
491+
SANITIZE_UB: ON
492+
COMPILER: gcc
493+
VERSION: 10
494+
495+
- name: GCC 10 Debug
496+
BUILD_TYPE: Debug
497+
COMPILER: gcc
498+
VERSION: 10
499+
500+
- name: GCC 10 Debug with ASan
501+
BUILD_TYPE: Debug
502+
SANITIZE_ADDRESS: ON
503+
COMPILER: gcc
504+
VERSION: 10
505+
506+
- name: GCC 10 Debug with TSan
507+
BUILD_TYPE: Debug
508+
SANITIZE_THREAD: ON
509+
COMPILER: gcc
510+
VERSION: 10
511+
512+
- name: GCC 10 Debug with UBSan
513+
BUILD_TYPE: Debug
514+
SANITIZE_UB: ON
515+
COMPILER: gcc
516+
VERSION: 10
517+
380518
- name: GCC 11 Release
381519
BUILD_TYPE: Release
382520
COMPILER: gcc
@@ -503,23 +641,27 @@ jobs:
503641
run: sudo apt-get install -y libboost-dev
504642
if: env.BOOST != 'OFF'
505643

506-
- name: Setup dependencies for LLVM 13 & 15+
644+
- name: Setup LLVM 16+ repo
507645
run: |
508646
curl 'https://apt.llvm.org/llvm-snapshot.gpg.key' \
509647
| sudo apt-key add -
510648
sudo add-apt-repository -y \
511649
"deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${VERSION} main"
512650
sudo apt-get update
651+
if: env.COMPILER == 'clang' && env.VERSION >= 16
652+
653+
- name: Setup dependencies for LLVM
654+
run: |
513655
sudo apt-get install -y "llvm-${VERSION}-linker-tools" \
514656
"clang-${VERSION}" "clang-tidy-${VERSION}"
515-
if: >
516-
env.COMPILER == 'clang'
517-
&& (env.VERSION == 13 || env.VERSION >= 15)
657+
if: env.COMPILER == 'clang'
518658

519-
- name: Setup dependencies for GCC 12 (versioned package)
659+
- name: Setup dependencies for GCC 10 & 12 (versioned packages)
520660
run: |
521661
sudo apt-get install -y "gcc-${VERSION}"
522-
if: env.COMPILER == 'gcc' && env.VERSION == '12'
662+
if: >
663+
env.COMPILER == 'gcc'
664+
&& (env.VERSION == '10' || env.VERSION == '12')
523665
524666
- name: Setup dependencies for GCC 11 (default OS package)
525667
run: |
@@ -531,6 +673,7 @@ jobs:
531673
# variable access regardless of the host operating system
532674
shell: bash
533675
run: |
676+
set -x
534677
SANITIZE_ADDRESS="${SANITIZE_ADDRESS:-$DEFAULT_SANITIZE_ADDRESS}"
535678
SANITIZE_THREAD="${SANITIZE_THREAD:-$DEFAULT_SANITIZE_THREAD}"
536679
SANITIZE_UB="${SANITIZE_UB:-$DEFAULT_SANITIZE_UB}"
@@ -555,13 +698,25 @@ jobs:
555698
EXTRA_CMAKE_ARGS=("${EXTRA_CMAKE_ARGS[@]}" "-DMAINTAINER_MODE=ON")
556699
fi
557700
fi
701+
set +e
558702
cmake -B build "$GITHUB_WORKSPACE" -DSTANDALONE=ON \
559703
"-DCMAKE_BUILD_TYPE=$BUILD_TYPE" \
560704
"-DSANITIZE_ADDRESS=${SANITIZE_ADDRESS}" \
561705
"-DSANITIZE_THREAD=${SANITIZE_THREAD}" \
562706
"-DSANITIZE_UB=${SANITIZE_UB}" \
563707
"-DSPINLOCK_LOOP=${SPINLOCK_LOOP}" "-DSTATS=${STATS}" \
564708
"${EXTRA_CMAKE_ARGS[@]}"
709+
CMAKE_EXIT_CODE=$?
710+
set -e
711+
if [ $CMAKE_EXIT_CODE -ne 0 ]; then
712+
ls -alR build/
713+
if [ -f build/CMakeFiles/CMakeConfigureLog.yaml ]; then
714+
echo "::group::CMakeConfigureLog.yaml"
715+
cat build/CMakeFiles/CMakeConfigureLog.yaml
716+
echo "::endgroup::"
717+
fi
718+
fi
719+
exit $CMAKE_EXIT_CODE
565720
566721
- name: Build
567722
working-directory: ${{github.workspace}}/build

0 commit comments

Comments
 (0)