Skip to content

Commit c9f36e0

Browse files
committed
Add statsd ci
1 parent b2d3cb1 commit c9f36e0

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/statsd.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Statsd Metrics CI
2+
3+
on:
4+
push:
5+
branches: "*"
6+
paths:
7+
- "exporters/statsd/**"
8+
- ".github/workflows/statsd.yml"
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- "exporters/statsd/**"
13+
- ".github/workflows/statsd.yml"
14+
jobs:
15+
cmake_linux:
16+
name: CMake on Linux
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: checkout otel contrib statsd
20+
uses: actions/checkout@v3
21+
with:
22+
path: "otel_cpp_contrib"
23+
- name: checkout otel cpp
24+
uses: actions/checkout@v3
25+
with:
26+
repository: "open-telemetry/opentelemetry-cpp"
27+
ref: "v1.20.0"
28+
path: "otel_cpp"
29+
submodules: "recursive"
30+
- name: setup
31+
run: |
32+
sudo apt update -y
33+
sudo apt install -y --no-install-recommends --no-install-suggests build-essential\
34+
ca-certificates wget git valgrind lcov
35+
- name: run tests
36+
run: |
37+
sudo $GITHUB_WORKSPACE/otel_cpp/ci/setup_googletest.sh
38+
mkdir -p "$GITHUB_WORKSPACE/otel_cpp/build"
39+
cd "$GITHUB_WORKSPACE/otel_cpp/build"
40+
cmake .. -DOPENTELEMETRY_INSTALL=ON
41+
cmake --build . -j$(nproc)
42+
cmake --install . --prefix "$HOME/prebuilt-otel"
43+
mkdir -p "$GITHUB_WORKSPACE/otel_cpp_contrib/exporters/statsd/build"
44+
cd "$GITHUB_WORKSPACE/otel_cpp_contrib/exporters/statsd/build"
45+
cmake .. "-DCMAKE_PREFIX_PATH=$HOME/prebuilt-otel" \
46+
-DBUILD_TESTING=ON -DWITH_EXAMPLES=ON
47+
cmake --build . -j$(nproc)
48+
ctest

0 commit comments

Comments
 (0)