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:
parent
a087f87875
commit
e9efc3a5be
17
.github/workflows/vtest.yml
vendored
17
.github/workflows/vtest.yml
vendored
@ -42,7 +42,7 @@ jobs:
|
|||||||
TMPDIR: /tmp
|
TMPDIR: /tmp
|
||||||
# Force ASAN output into asan.log to make the output more readable.
|
# Force ASAN output into asan.log to make the output more readable.
|
||||||
ASAN_OPTIONS: log_path=asan.log
|
ASAN_OPTIONS: log_path=asan.log
|
||||||
OT_CPP_VERSION: 1.5.0
|
OT_CPP_VERSION: 1.6.0
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@ -78,20 +78,7 @@ jobs:
|
|||||||
- name: Install OpenTracing libs
|
- name: Install OpenTracing libs
|
||||||
if: ${{ contains(matrix.FLAGS, 'USE_OT=1') && steps.cache_ot.outputs.cache-hit != 'true' }}
|
if: ${{ contains(matrix.FLAGS, 'USE_OT=1') && steps.cache_ot.outputs.cache-hit != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/opentracing/opentracing-cpp/archive/v${OT_CPP_VERSION}.tar.gz
|
OT_PREFIX=${HOME}/opt-ot scripts/build-ot.sh
|
||||||
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
|
|
||||||
- name: Build WURFL
|
- name: Build WURFL
|
||||||
if: ${{ contains(matrix.FLAGS, 'USE_WURFL=1') }}
|
if: ${{ contains(matrix.FLAGS, 'USE_WURFL=1') }}
|
||||||
run: make -C addons/wurfl/dummy
|
run: make -C addons/wurfl/dummy
|
||||||
|
@ -6,29 +6,22 @@
|
|||||||
|
|
||||||
set -e
|
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"
|
||||||
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
|
||||||
tar xf download-cache/v${OT_CPP_VERSION}.tar.gz
|
cd opentracing-cpp-${OT_CPP_VERSION}
|
||||||
cd opentracing-cpp-${OT_CPP_VERSION}
|
mkdir build
|
||||||
mkdir build
|
cd build
|
||||||
cd build
|
cmake -DCMAKE_INSTALL_PREFIX=${OT_PREFIX} -DBUILD_STATIC_LIBS=OFF -DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/opt -DBUILD_STATIC_LIBS=OFF -DBUILD_MOCKTRACER=OFF -DBUILD_TESTING=OFF ..
|
make -j$(nproc)
|
||||||
make -j$(nproc)
|
make install
|
||||||
make install
|
|
||||||
echo "${OT_CPP_VERSION}" > "${HOME}/opt/.ot-cpp-version"
|
|
||||||
fi
|
|
||||||
|
|
||||||
git clone https://github.com/haproxytech/opentracing-c-wrapper.git
|
git clone https://github.com/haproxytech/opentracing-c-wrapper.git
|
||||||
cd opentracing-c-wrapper
|
cd opentracing-c-wrapper
|
||||||
./scripts/bootstrap
|
./scripts/bootstrap
|
||||||
./configure --prefix=${HOME}/opt --with-opentracing=${HOME}/opt
|
./configure --prefix=${OT_PREFIX} --with-opentracing=${OT_PREFIX}
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user