Repository navigation
ci: build with C++20 explicitly - #40
Merged
Merged
Conversation
Pass CMAKE_CXX_STANDARD=20 explicitly in the eic-shell workflow (as a workflow-level env, so the matrix job names that the main ruleset requires stay unchanged). Also move the legacy GitLab CI build and clang-tidy run from C++17 to C++20: the headers already require C++20 (concepts in random.h and property.h), so the C++17 job could not build main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review surfaced no outstanding issues, as the CI changes explicitly set C++20 to match headers that already require C++20 concepts, with no conflicting C++17 references elsewhere.
No open issues 🎉
What changed in this PR
This PR makes the CI pipelines build with C++20 explicitly rather than relying on CMake's default. This aligns the build configuration with the code, whose headers already require C++20 features (concepts like std::integral/std::floating_point and requires clauses). Setting the standard in CI guards against environments or future changes where the default might differ.
Changes:
- GitLab CI: bump the
juggler:localmatrixCMAKE_CXX_STANDARDfrom 17 to 20 and the clang-tidy-extra-argfrom-std=c++17to-std=c++20. - GitHub Actions (
linux-eic-shell): add a workflow-levelCMAKE_CXX_STANDARD: 20env and pass-DCMAKE_CXX_STANDARDto the CMake configure step. - Keeps the standard as a workflow-level
env(not a matrix dimension) so required job names stay unchanged.
| File | Description |
|---|---|
.gitlab-ci.yml |
Moves the local build matrix and clang-tidy analysis from C++17 to C++20 so they can compile main. |
.github/workflows/linux-eic-shell.yml |
Adds a C++20 env var and passes it explicitly to the CMake configure step without altering matrix-derived job names. |
Review effort: Balanced
1 of 2 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
-DCMAKE_CXX_STANDARD=20explicitly instead of relying on the CMake default. It is set as a workflow-levelenv, not a matrix dimension, so the job names required by themainruleset (build (clang++, Debug),build (clang++, Release),build (g++, Release)) stay the same.juggler:localbuild and the clang-tidy run move from C++17 to C++20. The headers already require C++20 (std::integral/std::floating_pointinrandom.h,requiresclauses inproperty.h), so the C++17 job could not buildmain.Test plan
🤖 Generated with Claude Code