-
Notifications
You must be signed in to change notification settings - Fork 440
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
[CI] Upgrade GoogleTest version from 1.12.1 to 1.13.0 #2114
[CI] Upgrade GoogleTest version from 1.12.1 to 1.13.0 #2114
Conversation
6bfa052
to
e61cde0
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2114 +/- ##
==========================================
- Coverage 87.31% 87.29% -0.02%
==========================================
Files 169 169
Lines 4901 4900 -1
==========================================
- Hits 4279 4277 -2
- Misses 622 623 +1 |
ea8ec98
to
4d0420e
Compare
c2a1ebf
to
4e17174
Compare
ci/setup_cmake.sh
Outdated
if [ "x$GOOGLETEST_VERSION" = "x" ]; then | ||
export GOOGLETEST_VERSION=1.12.1 | ||
export GOOGLETEST_VERSION=1.10.0 |
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.
Why is default version changed to 1.10.0, can it remain as 1.12.1 ?
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.
If GoogleTest version is not set on CI Pipeline, it was set as 1.10.0 by default. It could not be 1.12.1 version because GCC 4.8 oldish environment to support C++14.
Can you update the description for the changes. As the latest version doesn't support C++11, how are we handling now CI tests for C++11 ? |
Could you please check the description and verify that? |
CMakeLists.txt
Outdated
@@ -535,6 +535,7 @@ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}") | |||
|
|||
include(CTest) | |||
if(BUILD_TESTING) | |||
set(CMAKE_CXX_STANDARD 20) |
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.
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.
Yes, you are right. However, it is like CI/CD pipeline design problem for opentelemetry-cpp. There are a lot of scripts which setup different versions of third party libraries or submodules etc. All of them are not in one page.
From my perspective, if we still want to support GCC 4.8 version with C++11 standard, we need a better CMake/CI-CD/Script design for this. Otherwise, like me people might only focus on passing the CI tests but not the real usecases.
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.
This sets C++20 for all builds using tests, which breaks gcc4.8.
See related comment, to set C++14 is relevant ci/do_ci.sh targets instead.
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.
Thanks for the PR, looking into this.
In the mean time, please merge the main branch into this PR, to resolve the conflicts.
4e17174
to
ec849a1
Compare
17f4fd6
to
262aacf
Compare
262aacf
to
fcecc4c
Compare
fcecc4c
to
8900a2f
Compare
@marcalff Could you please verify the changes after your comments? Also, could you please take a look that why CodeQL build is failed, I am not sure that fail is directly related to my changes? |
8900a2f
to
cc68517
Compare
@cngzhnp Thanks for the cleanup. Remaining points below. CodeQLThe
To fix this and keep the build in C++11, add:
in file codeql-analysis.yml setup-cmake.shPer previous comments, this code:
should decouple setting the default release with the release format. Something like:
followed by something like:
Expectation is that all the following use case works
installs 1.13.0
installs 1.13.0
installs 1.12.1
installs 1.10.0 |
@marcalff Could you please check & verify what I changed so for? Now, I fixed the CodeQL and split up GoogleTest version and its path. |
Thanks. How about this instead:
|
Somehow, adding quotes broke the regexp test. Tested locally, this works:
Tested locally, this fails:
breaking the build for 1.10.0 (Gcc 4.8) and 1.12.1 (C++11 builds) |
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.
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.
LGTM and thanks.
It's fine by me , we also use gtest 13 and a high |
|
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.
LGTM. Thanks for the upgrade.
Upgraded GoogleTest to
1.13.0
+C++14
Changes
Revised the versions used for GoogleTest:
1.13.0
, which requiresC++14
1.12.1
(unchanged) for CI builds that requiresC++11
1.10.0
(unchanged) for CI builds usingGCC 4.8
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes