-
Notifications
You must be signed in to change notification settings - Fork 6
Add support for GCC 15 #802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
laurynas-biveinis
wants to merge
1
commit into
master
Choose a base branch
from
gcc-15
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| --- | ||
| name: build-with-old-compilers-noble | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
|
|
||
| env: | ||
| DEFAULT_SANITIZE_ADDRESS: OFF | ||
| DEFAULT_SANITIZE_THREAD: OFF | ||
| DEFAULT_SANITIZE_UB: OFF | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-24.04 | ||
|
|
||
| env: | ||
| BUILD_TYPE: ${{matrix.BUILD_TYPE}} | ||
| VERSION: ${{matrix.VERSION}} | ||
| SANITIZE_ADDRESS: ${{matrix.SANITIZE_ADDRESS}} | ||
| SANITIZE_THREAD: ${{matrix.SANITIZE_THREAD}} | ||
| SANITIZE_UB: ${{matrix.SANITIZE_UB}} | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: GCC 14 Release | ||
| BUILD_TYPE: Release | ||
| VERSION: 14 | ||
|
|
||
| - name: GCC 14 Release with ASan | ||
| BUILD_TYPE: Release | ||
| SANITIZE_ADDRESS: ON | ||
| VERSION: 14 | ||
|
|
||
| - name: GCC 14 Release with TSan | ||
| BUILD_TYPE: Release | ||
| SANITIZE_THREAD: ON | ||
| VERSION: 14 | ||
|
|
||
| - name: GCC 14 Release with UBSan | ||
| BUILD_TYPE: Release | ||
| SANITIZE_UB: ON | ||
| VERSION: 14 | ||
|
|
||
| - name: GCC 14 Debug | ||
| BUILD_TYPE: Debug | ||
| VERSION: 14 | ||
|
|
||
| - name: GCC 14 Debug with ASan | ||
| BUILD_TYPE: Debug | ||
| SANITIZE_ADDRESS: ON | ||
| VERSION: 14 | ||
|
|
||
| - name: GCC 14 Debug with TSan | ||
| BUILD_TYPE: Debug | ||
| SANITIZE_THREAD: ON | ||
| VERSION: 14 | ||
|
|
||
| - name: GCC 14 Debug with UBSan | ||
| BUILD_TYPE: Debug | ||
| SANITIZE_UB: ON | ||
| VERSION: 14 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| submodules: true | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libboost-dev libc6-dev-i386 "g++-${VERSION}" | ||
|
|
||
| - name: Configure CMake | ||
| # Use a bash shell so we can use the same syntax for environment | ||
| # variable access regardless of the host operating system | ||
| shell: bash | ||
| run: | | ||
| SANITIZE_ADDRESS="${SANITIZE_ADDRESS:-$DEFAULT_SANITIZE_ADDRESS}" | ||
| SANITIZE_THREAD="${SANITIZE_THREAD:-$DEFAULT_SANITIZE_THREAD}" | ||
| SANITIZE_UB="${SANITIZE_UB:-$DEFAULT_SANITIZE_UB}" | ||
| export CC="gcc-${VERSION}" | ||
| export CXX="g++-${VERSION}" | ||
| EXTRA_CMAKE_ARGS=("-DMAINTAINER_MODE=ON") | ||
| 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}" \ | ||
| "${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 | ||
| run: make -j3 -k | ||
|
|
||
| - name: Correctness test | ||
| working-directory: ${{github.workspace}}/build | ||
| run: ctest -j3 -V | ||
|
|
||
| - name: Benchmark correctness test | ||
| working-directory: ${{github.workspace}}/build | ||
| run: make -k quick_benchmarks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: GCC 15 build will use system default GCC, not GCC 15.
Line 444-445 removed version specifiers from
CCandCXX, so the build usesgccandg++from$PATH(typically GCC 11 on ubuntu-latest), not the installedg++-15from 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
🤖 Prompt for AI Agents