-
Notifications
You must be signed in to change notification settings - Fork 417
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] Use platform CMake #2627
[CI] Use platform CMake #2627
Conversation
The scripts like "tools/setup-cmake.sh" can also be used in non CI environment, such as setting up the CMake to a given machine in dev environment? |
I don't know any dev who would go out of his way to install something like this, instead of using the natural packaging commands available with the OS distribution, for example: sudo apt install cmake This It builds from code downloaded in It installs CMake It is not documented, one has to read the code to know how to invoke it. It is not referenced anywhere in the opentelemetry-cpp documentation, one has to find it to know it exists. This is a long list of red flags in my opinion. Restoring the file for now because it appear to be used from To clarify: I don't doubt |
rm cmake-${CMAKE_VERSION}-Linux-x86_64.sh | ||
popd | ||
} | ||
|
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.
setup_cmake.sh script installing only the googletest - this seems confusing.
For the sake of consistency with naming, should we also add apt-get install cmake
in this script ?
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.
Each github runner already has cmake
, so there is no need to install it.
I would rather rename setup_cmake.sh to setup_gtest.sh then, for clarity.
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.
Not for the runner. If someone is directly using this script.
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 script is under ci/
.
There is already another script, under tools/setup-cmake.sh
, to also install cmake.
If the concern is that someone taking a dependency in ci/*
will be affected, I can add a note in the changelog.
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.
I would rather rename setup_cmake.sh to setup_gtest.sh then, for clarity.
Or else, this would be better option. And then add this as a potential breaking change in CHANGELOG.md.
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.
Added changelog, and renamed to setup_googletest.sh
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 with suggestion.
Added changelog.
Use platform CMake
Changes
In
CI
, the build scripts used to:to install
CMake
version 3.16.3 by default, orCMake
version 3.20.6All the platforms used in
CI
have already haveCMake
, for a more recent version.Testing on old versions instead of testing with the version that comes with the platform provides little value, since users are more likely to run into issues that were not detected in CI.
Also, downloading a script and executing it is a bad practice.
This fix uses the
CMake
version already installed on the github runner image.For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes