CI: refactor OpenTracing build script

re-use scripts/build-ot.sh in CI again. Bump opentracing-cpp to 1.6.0
This commit is contained in:
Ilya Shipitsin 2022-01-15 14:23:37 +05:00 committed by Willy Tarreau
parent a087f87875
commit e9efc3a5be
2 changed files with 13 additions and 33 deletions

View File

@ -42,7 +42,7 @@ jobs:
TMPDIR: /tmp
# Force ASAN output into asan.log to make the output more readable.
ASAN_OPTIONS: log_path=asan.log
OT_CPP_VERSION: 1.5.0
OT_CPP_VERSION: 1.6.0
steps:
- uses: actions/checkout@v2
with:
@ -78,20 +78,7 @@ jobs:
- name: Install OpenTracing libs
if: ${{ contains(matrix.FLAGS, 'USE_OT=1') && steps.cache_ot.outputs.cache-hit != 'true' }}
run: |
wget https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz
tar xf v${OT_CPP_VERSION}.tar.gz
cd opentracing-cpp-${OT_CPP_VERSION}
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/opt-ot -DBUILD_STATIC_LIBS=OFF -DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
make -j$(nproc)
make install
git clone https://github.com/haproxytech/opentracing-c-wrapper.git
cd opentracing-c-wrapper
./scripts/bootstrap
./configure --prefix=${HOME}/opt-ot --with-opentracing=${HOME}/opt-ot
make -j$(nproc)
make install
OT_PREFIX=${HOME}/opt-ot scripts/build-ot.sh
- name: Build WURFL
if: ${{ contains(matrix.FLAGS, 'USE_WURFL=1') }}
run: make -C addons/wurfl/dummy

View File

@ -6,29 +6,22 @@
set -e
export OT_CPP_VERSION=1.5.0
OT_CPP_VERSION="${OT_CPP_VERSION:-1.6.0}"
OT_PREFIX="${OT_PREFIX:-${HOME}/opt}"
if [ ! -f "download-cache/v${OT_CPP_VERSION}.tar.gz" ]; then
wget -P download-cache/ \
"https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz"
fi
wget -P download-cache/ "https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz"
if [ "$(cat ${HOME}/opt/.ot-cpp-version)" != "${OT_CPP_VERSION}" ]; then
tar xf download-cache/v${OT_CPP_VERSION}.tar.gz
cd opentracing-cpp-${OT_CPP_VERSION}
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/opt -DBUILD_STATIC_LIBS=OFF -DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
make -j$(nproc)
make install
echo "${OT_CPP_VERSION}" > "${HOME}/opt/.ot-cpp-version"
fi
tar xf download-cache/v${OT_CPP_VERSION}.tar.gz
cd opentracing-cpp-${OT_CPP_VERSION}
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${OT_PREFIX} -DBUILD_STATIC_LIBS=OFF -DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
make -j$(nproc)
make install
git clone https://github.com/haproxytech/opentracing-c-wrapper.git
cd opentracing-c-wrapper
./scripts/bootstrap
./configure --prefix=${HOME}/opt --with-opentracing=${HOME}/opt
./configure --prefix=${OT_PREFIX} --with-opentracing=${OT_PREFIX}
make -j$(nproc)
make install