Skip to content

Commit

Permalink
Add CI for trace context validation
Browse files Browse the repository at this point in the history
  • Loading branch information
psx95 committed Nov 1, 2024
1 parent 06283f7 commit 78a34a7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -923,3 +923,42 @@ jobs:
- name: run ./ci/docfx.cmd
shell: cmd
run: ./ci/docfx.cmd

w3c_trace_context_compliance_v1:
name: W3C Distributed Tracing Validation V1
runs-on: ubuntu-24.04
steps:
- name: Checkout open-telemetry/opentelemetry-cpp
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup
env:
CC: /usr/bin/gcc-14
CXX: /usr/bin/g++-14
PROTOBUF_VERSION: 21.12
run: |
sudo -E ./ci/setup_googletest.sh
sudo -E ./ci/setup_ci_environment.sh
- name: run w3c trace-context test server (background)
env:
CXX_STANDARD: '14'
run: |
./ci/do_ci.sh cmake.w3c.trace-context.build-server
echo "action running from $(pwd)"
ls -lah $HOME/build/ext/test/w3c_tracecontext_test
./$HOME/build/ext/test/w3c_tracecontext_test/w3c_tracecontext_test &
sleep 10
- name: Checkout w3c/trace-context repo
uses: actions/checkout@v4
with:
repository: w3c/trace-context
path: trace-context
- name: install dependencies
run: |
sudo apt update && sudo apt install python3-pip
sudo pip3 install aiohttp
- name: run w3c trace-context test suite
run:
|
python ${GITHUB_WORKSPACE}/trace-context/test/test.py http://localhost:30000/test
13 changes: 13 additions & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,19 @@ elif [[ "$1" == "cmake.exporter.otprotocol.with_async_export.test" ]]; then
make -j $(nproc)
cd exporters/otlp && make test
exit 0
elif [[ "$1" == "cmake.w3c.trace-context.build-server" ]]; then
echo "Building w3c trace context test server"
cd "${BUILD_DIR}"
rm -rf *
cmake "${CMAKE_OPTIONS[@]}" \
-DBUILD_W3CTRACECONTEXT_TEST=ON \
-DCMAKE_CXX_STANDARD=${CXX_STANDARD} \
"${SRC_DIR}"
eval "$MAKE_COMMAND"
echo "currently at $(pwd)"
echo "${BUILD_DIR}"
ls -lah "${BUILD_DIR}/ext/test/w3c_tracecontext_test"
exit 0
elif [[ "$1" == "cmake.do_not_install.test" ]]; then
cd "${BUILD_DIR}"
rm -rf *
Expand Down

0 comments on commit 78a34a7

Please sign in to comment.