Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricziel authored Nov 30, 2023
2 parents a9de652 + 130c6e6 commit 02273c4
Show file tree
Hide file tree
Showing 236 changed files with 18,590 additions and 2,187 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/geneva_metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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.11.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_cmake.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 -DBUILD_EXAMPLE=ON
cmake --build . -j${nproc}
ctest
32 changes: 32 additions & 0 deletions .github/workflows/geneva_trace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

name: Geneva Trace Nuget Generation

on:
push:
branches: "*"
paths:
- "exporters/geneva-trace/**"
- ".github/workflows/geneva_trace.yml"
pull_request:
branches: [main]
paths:
- "exporters/geneva-trace/**"
- ".github/workflows/geneva_trace.yml"

jobs:
geneva-trace-nuget-generation:
name: Geneva Trace
runs-on: windows-latest
steps:
- name: github config
run: git config --system core.longpaths true
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: NuGet package generation
env:
PackageVersion: 0.0.1
run: |
cd exporters\geneva-trace\tools && .\build-nuget.cmd
2 changes: 1 addition & 1 deletion .github/workflows/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-21.04, ubuntu-20.04, ubuntu-18.04, debian-10.11]
os: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.04, debian-10.11, debian-11.3]
nginx-rel: [mainline, stable]
steps:
- name: checkout otel nginx
Expand Down
132 changes: 132 additions & 0 deletions .github/workflows/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: prometheus instrumentation CI

on:
push:
branches: "*"
paths:
- "exporters/prometheus/**"
- ".github/workflows/prometheus.yml"
pull_request:
branches: [main]
paths:
- "exporters/prometheus/**"
- ".github/workflows/prometheus.yml"

jobs:
prometheus_bazel_linux:
name: Bazel on Linux
runs-on: ubuntu-latest
steps:
- name: checkout otel contrib prometheus
uses: actions/checkout@v3
with:
path: "otel_cpp_contrib"
- name: Mount Bazel Cache
uses: actions/cache@v3
env:
cache-name: bazel_cache
with:
path: /home/runner/.cache/bazel
key: bazel_test
- name: run tests
run: |
cd otel_cpp_contrib/exporters/prometheus
bazel --output_user_root=$HOME/.cache/bazel build --copt=-DENABLE_TEST --@io_opentelemetry_cpp//api:with_abseil //...
bazel --output_user_root=$HOME/.cache/bazel test --copt=-DENABLE_TEST --@io_opentelemetry_cpp//api:with_abseil //...
prometheus_bazel_osx:
name: Bazel on MacOS
runs-on: macos-latest
steps:
- name: checkout otel contrib prometheus
uses: actions/checkout@v3
with:
path: "otel_cpp_contrib"
- name: Mount Bazel Cache
uses: actions/cache@v3
env:
cache-name: bazel_cache
with:
path: /Users/runner/.cache/bazel
key: bazel_osx
- name: run tests
run: |
cd otel_cpp_contrib/exporters/prometheus
bazel --output_user_root=$HOME/.cache/bazel build --copt=-DENABLE_TEST --@io_opentelemetry_cpp//api:with_abseil //...
bazel --output_user_root=$HOME/.cache/bazel test --copt=-DENABLE_TEST --@io_opentelemetry_cpp//api:with_abseil //...
prometheus_cmake_window:
name: CMake on Windows
runs-on: windows-latest
steps:
- name: checkout otel contrib prometheus
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.11.0"
path: "otel_cpp"
submodules: "recursive"
- name: run tests
shell: pwsh
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
vcpkg install "prometheus-cpp[pull,push]" nlohmann-json gtest benchmark --triplet=x64-windows-static-md
New-Item -Path "$ENV:GITHUB_WORKSPACE/otel_cpp/build_jobs_ci" -ItemType "directory" -Force
Set-Location "$ENV:GITHUB_WORKSPACE/otel_cpp/build_jobs_ci"
cmake .. -DWITH_PROMETHEUS=ON -DWITH_METRICS_PREVIEW=OFF -DCMAKE_BUILD_TYPE=Debug `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md `
"-DCMAKE_TOOLCHAIN_FILE=$ENV:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
"-DCMAKE_INSTALL_PREFIX=$HOME/prebuilt-otel" `
"-DBUILD_SHARED_LIBS=OFF" "-DBUILD_TESTING=OFF" "-DWITH_EXAMPLES=OFF" "-DWITH_FUNC_TESTS=OFF"
cmake --build . -j --config Debug || cmake --build . -j2 --config Debug || cmake --build . --config Debug
cmake --install . --prefix "$HOME/prebuilt-otel" --config Debug
New-Item -Path "$ENV:GITHUB_WORKSPACE/otel_cpp_contrib/exporters/prometheus/build_jobs_ci" -ItemType "directory" -Force
Set-Location "$ENV:GITHUB_WORKSPACE/otel_cpp_contrib/exporters/prometheus/build_jobs_ci"
cmake .. "-DCMAKE_PREFIX_PATH=$HOME/prebuilt-otel" -DCMAKE_BUILD_TYPE=Debug `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md `
"-DCMAKE_TOOLCHAIN_FILE=$ENV:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
"-DBUILD_SHARED_LIBS=OFF"
cmake --build . -j --config Debug || cmake --build . -j2 --config Debug || cmake --build . --config Debug
ctest -VV -C Debug -R "opentelemetry_cpp_ecosystem_test.*" .
prometheus_cmake_linux:
name: CMake on Linux
runs-on: ubuntu-latest
steps:
- name: checkout otel contrib prometheus
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.11.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: |
vcpkg install 'prometheus-cpp[pull,push]' nlohmann-json gtest benchmark --triplet=x64-linux
mkdir -p "$GITHUB_WORKSPACE/otel_cpp/build_jobs_ci"
cd "$GITHUB_WORKSPACE/otel_cpp/build_jobs_ci"
cmake .. -DWITH_PROMETHEUS=ON -DWITH_METRICS_PREVIEW=OFF -DCMAKE_BUILD_TYPE=Debug \
-DVCPKG_TARGET_TRIPLET=x64-linux \
"-DCMAKE_INSTALL_PREFIX=$HOME/prebuilt-otel" \
"-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
"-DBUILD_TESTING=OFF" "-DWITH_EXAMPLES=OFF" "-DWITH_FUNC_TESTS=OFF"
cmake --build . -j --config Debug || cmake --build . -j2 --config Debug || cmake --build . --config Debug
cmake --install . --prefix "$HOME/prebuilt-otel" --config Debug
mkdir -p "$GITHUB_WORKSPACE/otel_cpp_contrib/exporters/prometheus/build_jobs_ci"
cd "$GITHUB_WORKSPACE/otel_cpp_contrib/exporters/prometheus/build_jobs_ci"
cmake .. "-DCMAKE_PREFIX_PATH=$HOME/prebuilt-otel" -DCMAKE_BUILD_TYPE=Debug \
-DVCPKG_TARGET_TRIPLET=x64-linux \
"-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
cmake --build . -j --config Debug || cmake --build . -j2 --config Debug || cmake --build . --config Debug
ctest -VV -R "opentelemetry_cpp_ecosystem_test.*" .
Loading

0 comments on commit 02273c4

Please sign in to comment.