Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
add prometheus to thirdparty (#284)
Browse files Browse the repository at this point in the history
* get prometheus by release, not git clone
* ignore test from prometheus
  • Loading branch information
ChenQShmily authored and HuangWei committed Jul 31, 2019
1 parent 05f6c53 commit d8e5bab
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
14 changes: 14 additions & 0 deletions thirdparty/build-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function exit_if_fail()
{
if [ $2 -ne 0 ]; then
echo "build $1 failed"
echo "please check the command-line output of cmake or make"
exit $2
fi
}
Expand Down Expand Up @@ -264,3 +265,16 @@ if [ ! -d $TP_OUTPUT/include/gflags ]; then
else
echo "skip build gflags"
fi

#build prometheus-cpp
if [ ! -d $TP_OUTPUT/include/prometheus ]; then
mkdir -p $TP_BUILD/prometheus
cd $TP_BUILD/prometheus
cmake $TP_SRC/prometheus-cpp-0.7.0 -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$TP_OUTPUT -DENABLE_TESTING=OFF
make -j8 && make install
res=$?
exit_if_fail "prometheus-cpp" $res
cd $TP_DIR
else
echo "skip build prometheus-cpp"
fi
26 changes: 26 additions & 0 deletions thirdparty/download-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,32 @@ check_and_download "${GFLAGS_PKG}"\
"${GFLAGS_NAME}"
exit_if_fail $?

# civetweb
# from: https://codeload.github.com/civetweb/civetweb/tar.gz/v1.11
CIVETWEB_NAME=civetweb-1.11
CIVETWEB_PKG=${CIVETWEB_NAME}.tar.gz
check_and_download "${CIVETWEB_PKG}"\
"${OSS_URL_PREFIX}/${CIVETWEB_PKG}"\
"b6d2175650a27924bccb747cbe084cd4"\
"${CIVETWEB_NAME}"
exit_if_fail $?

# prometheus-cpp
# from: https://codeload.github.com/jupp0r/prometheus-cpp/tar.gz/v0.7.0
PROMETHEUS_NAME=prometheus-cpp-0.7.0
PROMETHEUS_PKG=${PROMETHEUS_NAME}.tar.gz
check_and_download "${PROMETHEUS_PKG}"\
"${OSS_URL_PREFIX}/${PROMETHEUS_PKG}"\
"dc75c31ceaefd160e978365bdca8eb01"\
"${PROMETHEUS_NAME}"
exit_if_fail $?

rm -rf $TP_SRC/prometheus-cpp-0.7.0/3rdparty/civetweb
cp -r $TP_SRC/civetweb-1.11 $TP_SRC/prometheus-cpp-0.7.0/3rdparty/
cd $TP_SRC/prometheus-cpp-0.7.0/3rdparty
mv civetweb-1.11 civetweb
cd $TP_SRC

# s2geometry
# from: https://github.com/google/s2geometry/archive/0239455c1e260d6d2c843649385b4fb9f5b28dba.zip
S2GEOMETRY_NAME=s2geometry-0239455c1e260d6d2c843649385b4fb9f5b28dba
Expand Down

0 comments on commit d8e5bab

Please sign in to comment.