-
Notifications
You must be signed in to change notification settings - Fork 438
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
Add Jaeger exporter to CMake CI build #786
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a03dc6d
Add Jaeger exporter to CMake CI build
ThomsonTan 1e2f9f7
Add -x to setup_thrift.sh
ThomsonTan 0646445
Merge branch 'main' into AddJaegerToCI
ThomsonTan 94411f2
Remove sudo in ci.yml
ThomsonTan fae5c08
Revert "Remove sudo in ci.yml"
ThomsonTan 7bdc345
Merge branch 'main' into AddJaegerToCI
ThomsonTan 9fcf52d
Merge branch 'main' into AddJaegerToCI
lalitb 49d26cd
Merge branch 'main' into AddJaegerToCI
lalitb 23a82bf
Merge branch 'main' into AddJaegerToCI
lalitb 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 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 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 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,42 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
export DEBIAN_FRONTEND=noninteractive | ||
export THRIFT_VERSION=0.14.1 | ||
|
||
if ! type cmake > /dev/null; then | ||
#cmake not installed, exiting | ||
exit 1 | ||
fi | ||
export BUILD_DIR=/tmp/ | ||
export INSTALL_DIR=/usr/local/ | ||
|
||
apt install -y --no-install-recommends \ | ||
libboost-all-dev \ | ||
libevent-dev \ | ||
libssl-dev \ | ||
ninja-build | ||
|
||
pushd $BUILD_DIR | ||
wget https://github.com/apache/thrift/archive/refs/tags/v${THRIFT_VERSION}.tar.gz | ||
tar -zxvf v${THRIFT_VERSION}.tar.gz | ||
cd thrift-${THRIFT_VERSION} | ||
mkdir -p out | ||
pushd out | ||
cmake -G Ninja .. \ | ||
-DBUILD_COMPILER=OFF \ | ||
-DBUILD_CPP=ON \ | ||
-DBUILD_LIBRARIES=ON \ | ||
-DBUILD_NODEJS=OFF \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the options turned off here are turned on by default in thrift repo. They are not used by our C++ build so turn them off explicitly would introducing more dependence to our CI build. |
||
-DBUILD_PYTHON=OFF \ | ||
-DBUILD_JAVASCRIPT=OFF \ | ||
-DBUILD_C_GLIB=OFF \ | ||
-DBUILD_JAVA=OFF \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_TUTORIALS=OFF \ | ||
.. | ||
|
||
ninja -j $(nproc) | ||
ninja install | ||
popd | ||
popd |
This file contains 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 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
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.
We don't need
sudo
, as github actions are run by default asroot
user.Also, if we move thrift installation as part of do_ci.sh script, this script will remain usable outside of github workflow, without separately installing thrift ( similar to how it is done for
prometheus
). Probablysetup_thrift.sh
can expose a function to install thrift, and that function can be called from do_ci.sh for actual installation if called with "cmake.test" argument.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 also believe
sudo
is not necessary, just follow other scripts invocation likesetup_grpc.h
.I don't prefer moving the installation logic to
do_ci.sh
which would makedo_ci.sh
too complicated with the third-party dependence setup instructions, and also hard to share with non-CI environment. Expose a setup function insetup_thrift.sh
looks good, but we still need includesetup_thrift.sh
to invoke the function. So it may be simpler to just invoke the 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.
@lalitb do all github action run as root by default? I just removed all the
sudo
in ourci.yml
but got permission denied in the CI run.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 thought unless explicitly specified with
--user
options, all jobs run asroot
user. Probably revert it back if there is a permission denied error. Sorry for the confusion.