Add support for GCC 15#802
Conversation
WalkthroughThe PR updates CI and build configuration to use GCC 15: GitHub Actions workflows replace GCC 14 with GCC 15 and parameterize an old-compiler job; CMakeLists adds GCC ≥15 version checks and new GCC 15-specific warning flags gated for standalone GNU builds. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
58d5ccc to
76dc974
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (7)
.circleci/config.yml(2 hunks).github/workflows/build.yml(3 hunks).github/workflows/old-compilers-jammy.yml(2 hunks).github/workflows/old-compilers-noble.yml(1 hunks)CMakeLists.txt(3 hunks)CMakePresets.json(1 hunks)test/test_key_encode_decode.cpp(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/old-compilers-noble.yml
27-27: property "spinlock_loop" is not defined in object type {build_type: string; name: string; sanitize_address: string; sanitize_thread: string; sanitize_ub: string; version: number}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (29)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: build (XCode Debug with ASan (Intel), macos-latest, Debug, macos-clang, ON, OFF)
- GitHub Check: build (XCode Debug with cppcheck (Intel), macos-latest, Debug, macos-clang, ON, OFF)
🔇 Additional comments (13)
CMakePresets.json (1)
87-88: LGTM - Compiler version bump is correct.The preset now points to GCC 15 toolchain, consistent with the PR's objective.
.circleci/config.yml (2)
7-7: LGTM - Default GCC version updated.
41-41: LGTM - PPA addition is necessary.GCC 15 requires the ubuntu-toolchain-r PPA. Correctly placed before the
apt-get update.test/test_key_encode_decode.cpp (1)
351-351: LGTM - Removes redundant cast.This addresses the warning fix mentioned in the PR description. The explicit cast was unnecessary since
~0ULLis already the correct type, and this makes it consistent with line 348..github/workflows/old-compilers-jammy.yml (1)
730-737: LGTM - Correctly extends support to GCC 14.The dynamic version variable is cleaner than hardcoding, and the condition properly gates for both GCC 13 and 14 now that GCC 15 is the default.
.github/workflows/build.yml (3)
39-98: LGTM - Consistent job name updates.All GCC-based CI jobs properly renamed to reflect the GCC 15 upgrade.
288-289: LGTM - GCC 15 installation configured correctly.PPA addition and g++-15 package installation are properly set up.
347-347: LGTM - Version variable correctly set..github/workflows/old-compilers-noble.yml (1)
1-70: New workflow for GCC 14 on Noble looks good.The structure properly covers GCC 14 testing across Release/Debug builds and sanitizer variants on Ubuntu 24.04.
CMakeLists.txt (4)
118-119: LGTM - New GCC 15 warning flags added.The whitespace warnings are appropriate for maintaining code quality and align with the PR's objective to enable new non-default warnings.
405-405: LGTM - Version gate correctly defined.Follows the existing pattern for compiler version checks.
412-412: LGTM - Combined gate correctly defined.Consistent with existing version-gated patterns for other GCC versions.
718-718: LGTM - Warning flags correctly applied.The flags are properly gated behind both the standalone condition and GCC >= 15 check, consistent with how other version-specific warning flags are applied.
76dc974 to
b041a32
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #802 +/- ##
==========================================
+ Coverage 98.30% 98.36% +0.06%
==========================================
Files 35 35
Lines 6497 6497
==========================================
+ Hits 6387 6391 +4
+ Misses 110 106 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Enable new non-default warnings - Bump the versions in CI, move GCC 14 to the old compilers job, which is split over Jammy and Noble runners
b041a32 to
8799435
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/build.yml(4 hunks).github/workflows/old-compilers-jammy.yml(2 hunks).github/workflows/old-compilers-noble.yml(1 hunks)CMakeLists.txt(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (4)
.github/workflows/old-compilers-jammy.yml (1)
776-781: Clean parametrization of GCC version.The change to
g++-${VERSION}makes the step reusable across versions while maintaining the conditional guard on VERSION == '13'..github/workflows/old-compilers-noble.yml (1)
1-120: Well-structured GCC 14 reference platform for Noble.The workflow correctly avoids SPINLOCK_LOOP complexity that jammy requires, keeping the noble configuration simpler and appropriate for an "old compilers" reference. GCC 14 matrix is complete across Debug/Release and sanitizer variants.
.github/workflows/build.yml (1)
39-101: Verify GCC 15 labels are accurately reflected after compiler binding fix.Once the CC/CXX issue above is resolved, confirm that all "GCC 15" matrix names actually run with GCC 15 and not a fallback version. The label changes here are correct in spirit, but depend on the compiler setup fix.
Also applies to: 270-315
CMakeLists.txt (1)
122-123: GCC 15 warning flags properly gated and integrated.The new flags follow the established pattern for version-gated compiler warnings: defined as constants, wrapped in generator expressions, and applied conditionally in
COMMON_TARGET_PROPERTIESonly when building standalone with GCC ≥15. Implementation is consistent and correct.Also applies to: 416-416, 427-427, 740-740
| if [[ $COMPILER == "gcc" ]]; then | ||
| V=14 | ||
| EXTRA_CMAKE_ARGS=() | ||
| export CC=gcc-$V | ||
| export CXX=g++-$V | ||
| export CC=gcc | ||
| export CXX=g++ |
There was a problem hiding this comment.
Critical: GCC 15 build will use system default GCC, not GCC 15.
Line 444-445 removed version specifiers from CC and CXX, so the build uses gcc and g++ from $PATH (typically GCC 11 on ubuntu-latest), not the installed g++-15 from line 380. This defeats the entire PR objective of testing GCC 15.
The VERSION matrix variable becomes unused, and all GCC matrix entries will compile with whatever default GCC is on the runner.
Apply this diff to restore version binding:
if [[ $COMPILER == "gcc" ]]; then
EXTRA_CMAKE_ARGS=()
- export CC=gcc
- export CXX=g++
+ export CC=gcc-15
+ export CXX=g++-15Alternatively, if dynamic versioning is desired (not just GCC 15):
if [[ $COMPILER == "gcc" ]]; then
EXTRA_CMAKE_ARGS=()
- export CC=gcc
- export CXX=g++
+ export CC=gcc-${VERSION}
+ export CXX=g++-${VERSION}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if [[ $COMPILER == "gcc" ]]; then | |
| V=14 | |
| EXTRA_CMAKE_ARGS=() | |
| export CC=gcc-$V | |
| export CXX=g++-$V | |
| export CC=gcc | |
| export CXX=g++ | |
| if [[ $COMPILER == "gcc" ]]; then | |
| EXTRA_CMAKE_ARGS=() | |
| export CC=gcc-${VERSION} | |
| export CXX=g++-${VERSION} |
🤖 Prompt for AI Agents
.github/workflows/build.yml around lines 442-445: the script currently exports
CC and CXX as unversioned gcc/g++, causing builds to use the system default GCC
(e.g., gcc-11) instead of the intended gcc-15; restore version binding by
setting CC and CXX to the versioned compiler (e.g., gcc-15 and g++-15) or use
the matrix VERSION variable (e.g., export CC=gcc-${VERSION} and export
CXX=g++-${VERSION}) so the installed compiler from earlier steps is actually
used during the build.
|



Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.