CI: github actions: add OpenTracing builds

let us add OpenTracing module to "all features" builds
This commit is contained in:
Ilya Shipitsin 2021-05-18 09:46:43 +00:00 committed by Willy Tarreau
parent a6b2784099
commit 75c95aa649
3 changed files with 45 additions and 0 deletions

8
.github/matrix.py vendored
View File

@ -71,6 +71,10 @@ for CC in ["gcc", "clang"]:
"CC": CC,
"FLAGS": [
"USE_ZLIB=1",
"USE_OT=1",
"OT_INC=${HOME}/opt/include",
"OT_LIB=${HOME}/opt/lib",
"OT_RUNPATH=1",
"USE_PCRE=1",
"USE_PCRE_JIT=1",
"USE_LUA=1",
@ -139,6 +143,10 @@ matrix.append(
"FLAGS": get_asan_flags(CC)
+ [
"USE_ZLIB=1",
"USE_OT=1",
"OT_INC=${HOME}/opt/include",
"OT_LIB=${HOME}/opt/lib",
"OT_RUNPATH=1",
"USE_PCRE=1",
"USE_PCRE_JIT=1",
"USE_LUA=1",

View File

@ -64,6 +64,9 @@ jobs:
- name: Install SSL ${{ matrix.ssl }}
if: ${{ matrix.ssl && matrix.ssl != 'stock' }}
run: env ${{ matrix.ssl }} scripts/build-ssl.sh
- name: Install OpenTracing libs
if: ${{ contains(matrix.FLAGS, 'USE_OT=1') }}
run: scripts/build-ot.sh
- name: Build WURFL
if: ${{ contains(matrix.FLAGS, 'USE_WURFL=1') }}
run: make -C addons/wurfl/dummy

34
scripts/build-ot.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
#
# OT helper. script built from documentation: https://github.com/haproxytech/opentracing-c-wrapper
#
set -e
export OT_CPP_VERSION=1.5.0
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
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
make install
echo "${OT_CPP_VERSION}" > "${HOME}/opt/.ot-cpp-version"
fi
git clone https://github.com/haproxytech/opentracing-c-wrapper.git
cd opentracing-c-wrapper
./scripts/bootstrap
./configure --prefix=${HOME}/opt --with-opentracing=${HOME}/opt
make
make install