Skip to content

Commit dc0fda0

Browse files
committed
fix: redid to match logic
1 parent d9163c8 commit dc0fda0

File tree

3 files changed

+47
-61
lines changed

3 files changed

+47
-61
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,3 +1003,21 @@ jobs:
10031003
|
10041004
python ${GITHUB_WORKSPACE}/trace-context/test/test.py http://localhost:30000/test TraceContextTest AdvancedTest
10051005
curl http://localhost:30000/stop
1006+
1007+
verify-examples:
1008+
name: Verify Examples
1009+
runs-on: ubuntu-latest
1010+
steps:
1011+
- uses: actions/checkout@v4
1012+
with:
1013+
submodules: 'recursive'
1014+
- name: Setup Environment for Examples
1015+
run: |
1016+
sudo apt-get update
1017+
sudo -E ./ci/setup_ci_environment.sh
1018+
sudo apt-get update && sudo apt-get install -y cmake
1019+
- name: Run Examples Verification Script
1020+
run: |
1021+
chmod +x ci/do_ci_verify_examples.sh
1022+
./ci/do_ci_verify_examples.sh
1023+

.github/workflows/verify-examples.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

ci/do_ci_verify_examples.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
4+
set -e
5+
6+
echo "Running Bazel tests for examples..."
7+
# Ensure Bazelisk is installed or available
8+
sudo apt-get update
9+
sudo apt-get install -y bazelisk
10+
bazelisk test //examples/...
11+
12+
echo "Running CMake tests for examples..."
13+
sudo apt-get update
14+
sudo apt-get install -y cmake
15+
16+
# Loop over each subdirectory in examples and run CMake tests if a CMakeLists.txt exists.
17+
for d in examples/*/ ; do
18+
if [ -f "$d/CMakeLists.txt" ]; then
19+
echo "Building CMake project in $d"
20+
mkdir -p "$d/build"
21+
pushd "$d/build"
22+
cmake ..
23+
cmake --build .
24+
ctest --output-on-failure
25+
popd
26+
else
27+
echo "Skipping $d as no CMakeLists.txt found."
28+
fi
29+
done

0 commit comments

Comments
 (0)