Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,24 @@ jobs:
export CC=clang
export CXX=clang++
fi
set +e
cmake -B build "$GITHUB_WORKSPACE" "$CBT" -DSTANDALONE=ON \
-DMAINTAINER_MODE=ON -DIWYU=ON \
"-DSANITIZE_ADDRESS=${SANITIZE_ADDRESS}" \
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"-DSANITIZE_THREAD=${SANITIZE_THREAD}" \
"-DSANITIZE_UB=${SANITIZE_UB}" \
"-DSTATIC_ANALYSIS=${STATIC_ANALYSIS}" "-DCOVERAGE=${COVERAGE}" \
"-DAVX2=${AVX2}" "${EXTRA_CMAKE_ARGS[@]}"
CMAKE_EXIT_CODE=$?
set -e
if [ $CMAKE_EXIT_CODE -ne 0 ]; then
if [ -f build/CMakeFiles/CMakeConfigureLog.yaml ]; then
echo "::group::CMakeConfigureLog.yaml"
cat build/CMakeFiles/CMakeConfigureLog.yaml
echo "::endgroup::"
fi
exit $CMAKE_EXIT_CODE
fi

- name: Build
working-directory: ${{github.workspace}}/build
Expand Down
165 changes: 159 additions & 6 deletions .github/workflows/old-compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,98 @@ jobs:
fail-fast: false
matrix:
include:
- name: clang 11 Release
BUILD_TYPE: Release
COMPILER: clang
VERSION: 11

- name: clang 11 Release with ASan
BUILD_TYPE: Release
SANITIZE_ADDRESS: ON
COMPILER: clang
VERSION: 11

- name: clang 11 Release with TSan
BUILD_TYPE: Release
SANITIZE_THREAD: ON
COMPILER: clang
VERSION: 11

- name: clang 11 Release with UBSan
BUILD_TYPE: Release
SANITIZE_UB: ON
COMPILER: clang
VERSION: 11

- name: clang 11 Debug
BUILD_TYPE: Debug
COMPILER: clang
VERSION: 11

- name: clang 11 Debug with ASan
BUILD_TYPE: Debug
SANITIZE_ADDRESS: ON
COMPILER: clang
VERSION: 11

- name: clang 11 Debug with TSan
BUILD_TYPE: Debug
SANITIZE_THREAD: ON
COMPILER: clang
VERSION: 11

- name: clang 11 Debug with UBSan
BUILD_TYPE: Debug
SANITIZE_UB: ON
COMPILER: clang
VERSION: 11
Comment thread
laurynas-biveinis marked this conversation as resolved.

Comment thread
laurynas-biveinis marked this conversation as resolved.
- name: clang 12 Release
BUILD_TYPE: Release
COMPILER: clang
VERSION: 12

- name: clang 12 Release with ASan
BUILD_TYPE: Release
SANITIZE_ADDRESS: ON
COMPILER: clang
VERSION: 12

- name: clang 12 Release with TSan
BUILD_TYPE: Release
SANITIZE_THREAD: ON
COMPILER: clang
VERSION: 12

- name: clang 12 Release with UBSan
BUILD_TYPE: Release
SANITIZE_UB: ON
COMPILER: clang
VERSION: 12

- name: clang 12 Debug
BUILD_TYPE: Debug
COMPILER: clang
VERSION: 12

- name: clang 12 Debug with ASan
BUILD_TYPE: Debug
SANITIZE_ADDRESS: ON
COMPILER: clang
VERSION: 12

- name: clang 12 Debug with TSan
BUILD_TYPE: Debug
SANITIZE_THREAD: ON
COMPILER: clang
VERSION: 12

- name: clang 12 Debug with UBSan
BUILD_TYPE: Debug
SANITIZE_UB: ON
COMPILER: clang
VERSION: 12

Comment on lines +38 to +129
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Matrix duplication for Clang 11/12 variants is error‑prone
Listing all Release/Debug × ASan/TSan/UBSan combinations for Clang 11 and 12 manually makes the file huge and risks drift. Use YAML anchors or a generated matrix to DRY this up and improve maintainability.

Comment on lines +84 to +129
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

DRY up Clang 12 matrix entries.
Similarly, the Clang 12 matrix repeats eight manual entries. Using anchors or a templated matrix will reduce duplication and minimize drift.

- name: clang 13 Release
BUILD_TYPE: Release
COMPILER: clang
Expand Down Expand Up @@ -377,6 +469,52 @@ jobs:
COMPILER: clang
VERSION: 19

- name: GCC 10 Release
BUILD_TYPE: Release
COMPILER: gcc
VERSION: 10

- name: GCC 10 Release with ASan
BUILD_TYPE: Release
SANITIZE_ADDRESS: ON
COMPILER: gcc
VERSION: 10

- name: GCC 10 Release with TSan
BUILD_TYPE: Release
SANITIZE_THREAD: ON
COMPILER: gcc
VERSION: 10

- name: GCC 10 Release with UBSan
BUILD_TYPE: Release
SANITIZE_UB: ON
COMPILER: gcc
VERSION: 10

- name: GCC 10 Debug
BUILD_TYPE: Debug
COMPILER: gcc
VERSION: 10

- name: GCC 10 Debug with ASan
BUILD_TYPE: Debug
SANITIZE_ADDRESS: ON
COMPILER: gcc
VERSION: 10

- name: GCC 10 Debug with TSan
BUILD_TYPE: Debug
SANITIZE_THREAD: ON
COMPILER: gcc
VERSION: 10

- name: GCC 10 Debug with UBSan
BUILD_TYPE: Debug
SANITIZE_UB: ON
COMPILER: gcc
VERSION: 10

Comment thread
laurynas-biveinis marked this conversation as resolved.
- name: GCC 11 Release
BUILD_TYPE: Release
COMPILER: gcc
Expand Down Expand Up @@ -503,23 +641,27 @@ jobs:
run: sudo apt-get install -y libboost-dev
if: env.BOOST != 'OFF'

- name: Setup dependencies for LLVM 13 & 15+
- name: Setup LLVM 16+ repo
run: |
curl 'https://apt.llvm.org/llvm-snapshot.gpg.key' \
| sudo apt-key add -
sudo add-apt-repository -y \
"deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${VERSION} main"
sudo apt-get update
if: env.COMPILER == 'clang' && env.VERSION >= 16

Comment on lines +644 to +652
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Replace deprecated apt-key add usage
Ubuntu 22.04 deprecates apt-key add. To future‑proof package installation, import the GPG key with gpg --dearmor into /etc/apt/trusted.gpg.d/ and reference it with a signed-by option in the source entry.

- name: Setup dependencies for LLVM
run: |
sudo apt-get install -y "llvm-${VERSION}-linker-tools" \
"clang-${VERSION}" "clang-tidy-${VERSION}"
if: >
env.COMPILER == 'clang'
&& (env.VERSION == 13 || env.VERSION >= 15)
if: env.COMPILER == 'clang'

- name: Setup dependencies for GCC 12 (versioned package)
- name: Setup dependencies for GCC 10 & 12 (versioned packages)
run: |
sudo apt-get install -y "gcc-${VERSION}"
if: env.COMPILER == 'gcc' && env.VERSION == '12'
if: >
env.COMPILER == 'gcc'
&& (env.VERSION == '10' || env.VERSION == '12')

Comment thread
laurynas-biveinis marked this conversation as resolved.
- name: Setup dependencies for GCC 11 (default OS package)
run: |
Expand Down Expand Up @@ -555,13 +697,24 @@ jobs:
EXTRA_CMAKE_ARGS=("${EXTRA_CMAKE_ARGS[@]}" "-DMAINTAINER_MODE=ON")
fi
fi
set +e
cmake -B build "$GITHUB_WORKSPACE" -DSTANDALONE=ON \
"-DCMAKE_BUILD_TYPE=$BUILD_TYPE" \
"-DSANITIZE_ADDRESS=${SANITIZE_ADDRESS}" \
"-DSANITIZE_THREAD=${SANITIZE_THREAD}" \
"-DSANITIZE_UB=${SANITIZE_UB}" \
"-DSPINLOCK_LOOP=${SPINLOCK_LOOP}" "-DSTATS=${STATS}" \
"${EXTRA_CMAKE_ARGS[@]}"
CMAKE_EXIT_CODE=$?
set -e
if [ $CMAKE_EXIT_CODE -ne 0 ]; then
if [ -f build/CMakeFiles/CMakeConfigureLog.yaml ]; then
echo "::group::CMakeConfigureLog.yaml"
cat build/CMakeFiles/CMakeConfigureLog.yaml
echo "::endgroup::"
fi
fi
exit $CMAKE_EXIT_CODE

- name: Build
working-directory: ${{github.workspace}}/build
Expand Down
Loading
Loading