From 4b6f52ae230f2d5fc35eb0205f8017e63c572e87 Mon Sep 17 00:00:00 2001 From: Doug Barker Date: Thu, 22 May 2025 01:00:53 -0600 Subject: [PATCH] [TEST] add all components to the cmake fetch content test (#3433) --- .github/workflows/ci.yml | 5 +++ CHANGELOG.md | 3 ++ ci/do_ci.sh | 22 ++++++------- .../cmake/fetch_content_test/CMakeLists.txt | 31 ++++++++++++++++++- 4 files changed, 49 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8415f13967..bc585fc26e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,7 @@ jobs: runs-on: ubuntu-24.04 env: CXX_STANDARD: '17' + BUILD_TYPE: 'Debug' steps: - name: Harden the runner (Audit all outbound calls) uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 @@ -75,6 +76,10 @@ jobs: sudo -E ./ci/setup_ci_environment.sh sudo -E ./ci/setup_cmake.sh sudo -E ./ci/setup_googletest.sh + - name: Install abseil, protobuf, and grpc with apt + run: | + sudo -E apt-get update + sudo -E apt-get install -y libabsl-dev libprotobuf-dev libgrpc++-dev protobuf-compiler protobuf-compiler-grpc - name: run fetch content cmake test run: | ./ci/do_ci.sh cmake.fetch_content.test diff --git a/CHANGELOG.md b/CHANGELOG.md index 741642377b..a6f91d0b50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,9 @@ Increment the: * [EXPORTER] ostream log exporter, fixed memory ownership issues [#3417](https://github.com/open-telemetry/opentelemetry-cpp/pull/3417) +* [TEST] Test all components in a CMake super build + [#3433](https://github.com/open-telemetry/opentelemetry-cpp/pull/3433) + Important changes: * [EXPORTER] ostream log exporter, fixed memory ownership issues diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 57b2053512..10b4f98216 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -535,17 +535,17 @@ elif [[ "$1" == "cmake.fetch_content.test" ]]; then -DWITH_THREAD_INSTRUMENTATION_PREVIEW=ON \ -DWITH_OTLP_GRPC_SSL_MTLS_PREVIEW=ON \ -DWITH_OTLP_RETRY_PREVIEW=ON \ - -DWITH_OTLP_GRPC=OFF \ - -DWITH_OTLP_HTTP=OFF \ - -DWITH_OTLP_FILE=OFF \ - -DWITH_OTLP_HTTP_COMPRESSION=OFF \ - -DWITH_HTTP_CLIENT_CURL=OFF \ - -DWITH_PROMETHEUS=OFF \ - -DWITH_ZIPKIN=OFF \ - -DWITH_ELASTICSEARCH=OFF \ - -DWITH_EXAMPLES=OFF \ - -DWITH_EXAMPLES_HTTP=OFF \ - -DBUILD_W3CTRACECONTEXT_TEST=OFF \ + -DWITH_OTLP_GRPC=ON \ + -DWITH_OTLP_HTTP=ON \ + -DWITH_OTLP_FILE=ON \ + -DWITH_OTLP_HTTP_COMPRESSION=ON \ + -DWITH_HTTP_CLIENT_CURL=ON \ + -DWITH_PROMETHEUS=ON \ + -DWITH_ZIPKIN=ON \ + -DWITH_ELASTICSEARCH=ON \ + -DWITH_EXAMPLES=ON \ + -DWITH_EXAMPLES_HTTP=ON \ + -DBUILD_W3CTRACECONTEXT_TEST=ON \ -DOPENTELEMETRY_INSTALL=OFF \ -DOPENTELEMETRY_CPP_SRC_DIR="${SRC_DIR}" \ "${SRC_DIR}/install/test/cmake/fetch_content_test" diff --git a/install/test/cmake/fetch_content_test/CMakeLists.txt b/install/test/cmake/fetch_content_test/CMakeLists.txt index 0bfbc87669..79df956248 100644 --- a/install/test/cmake/fetch_content_test/CMakeLists.txt +++ b/install/test/cmake/fetch_content_test/CMakeLists.txt @@ -33,7 +33,18 @@ FetchContent_MakeAvailable(opentelemetry-cpp) add_executable( fetch_content_src_test ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_api.cc - ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_sdk.cc) + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_sdk.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_ext_common.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_ext_http_curl.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_ostream.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_in_memory.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_otlp_common.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_otlp_grpc.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_otlp_http.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_otlp_file.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_prometheus.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_zipkin.cc + ${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_elasticsearch.cc) target_link_libraries( fetch_content_src_test @@ -42,6 +53,24 @@ target_link_libraries( opentelemetry-cpp::metrics opentelemetry-cpp::trace opentelemetry-cpp::logs + opentelemetry-cpp::http_client_curl + opentelemetry-cpp::in_memory_span_exporter + opentelemetry-cpp::in_memory_metric_exporter + opentelemetry-cpp::ostream_log_record_exporter + opentelemetry-cpp::ostream_metrics_exporter + opentelemetry-cpp::ostream_span_exporter + opentelemetry-cpp::otlp_file_exporter + opentelemetry-cpp::otlp_file_log_record_exporter + opentelemetry-cpp::otlp_file_metric_exporter + opentelemetry-cpp::otlp_grpc_exporter + opentelemetry-cpp::otlp_grpc_log_record_exporter + opentelemetry-cpp::otlp_grpc_metrics_exporter + opentelemetry-cpp::otlp_http_exporter + opentelemetry-cpp::otlp_http_log_record_exporter + opentelemetry-cpp::otlp_http_metric_exporter + opentelemetry-cpp::prometheus_exporter + opentelemetry-cpp::zipkin_trace_exporter + opentelemetry-cpp::elasticsearch_log_record_exporter GTest::gtest GTest::gtest_main)