Skip to content

[Geneva] Fix example build on Windows #138

[Geneva] Fix example build on Windows

[Geneva] Fix example build on Windows #138

Workflow file for this run

name: Geneva Metrics CI
on:
push:
branches: "*"
paths:
- "exporters/geneva/**"
- ".github/workflows/geneva_metrics.yml"
pull_request:
branches: [main]
paths:
- "exporters/geneva/**"
- ".github/workflows/geneva_metrics.yml"
jobs:
cmake_linux:
name: CMake on Linux
runs-on: ubuntu-latest
steps:
- name: checkout otel contrib geneva metrics
uses: actions/checkout@v3
with:
path: "otel_cpp_contrib"
- name: checkout otel cpp
uses: actions/checkout@v3
with:
repository: "open-telemetry/opentelemetry-cpp"
ref: "v1.15.0"
path: "otel_cpp"
submodules: "recursive"
- name: setup
run: |
sudo apt update -y
sudo apt install -y --no-install-recommends --no-install-suggests build-essential\
ca-certificates wget git valgrind lcov
- name: run tests
run: |
sudo $GITHUB_WORKSPACE/otel_cpp/ci/setup_googletest.sh
mkdir -p "$GITHUB_WORKSPACE/otel_cpp/build"
cd "$GITHUB_WORKSPACE/otel_cpp/build"
cmake .. -DOPENTELEMETRY_INSTALL=ON
cmake --build . -j$(nproc)
cmake --install . --prefix "$HOME/prebuilt-otel"
mkdir -p "$GITHUB_WORKSPACE/otel_cpp_contrib/exporters/geneva/build"
cd "$GITHUB_WORKSPACE/otel_cpp_contrib/exporters/geneva/build"
cmake .. "-DCMAKE_PREFIX_PATH=$HOME/prebuilt-otel" \
-DBUILD_TESTING=ON -DWITH_EXAMPLES=ON
cmake --build . -j$(nproc)
ctest