Skip to content

Commit 4b6f52a

Browse files
authored
[TEST] add all components to the cmake fetch content test (#3433)
1 parent b4254a4 commit 4b6f52a

File tree

4 files changed

+49
-12
lines changed

4 files changed

+49
-12
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
runs-on: ubuntu-24.04
6363
env:
6464
CXX_STANDARD: '17'
65+
BUILD_TYPE: 'Debug'
6566
steps:
6667
- name: Harden the runner (Audit all outbound calls)
6768
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -75,6 +76,10 @@ jobs:
7576
sudo -E ./ci/setup_ci_environment.sh
7677
sudo -E ./ci/setup_cmake.sh
7778
sudo -E ./ci/setup_googletest.sh
79+
- name: Install abseil, protobuf, and grpc with apt
80+
run: |
81+
sudo -E apt-get update
82+
sudo -E apt-get install -y libabsl-dev libprotobuf-dev libgrpc++-dev protobuf-compiler protobuf-compiler-grpc
7883
- name: run fetch content cmake test
7984
run: |
8085
./ci/do_ci.sh cmake.fetch_content.test

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Increment the:
6464
* [EXPORTER] ostream log exporter, fixed memory ownership issues
6565
[#3417](https://github.com/open-telemetry/opentelemetry-cpp/pull/3417)
6666

67+
* [TEST] Test all components in a CMake super build
68+
[#3433](https://github.com/open-telemetry/opentelemetry-cpp/pull/3433)
69+
6770
Important changes:
6871

6972
* [EXPORTER] ostream log exporter, fixed memory ownership issues

ci/do_ci.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -535,17 +535,17 @@ elif [[ "$1" == "cmake.fetch_content.test" ]]; then
535535
-DWITH_THREAD_INSTRUMENTATION_PREVIEW=ON \
536536
-DWITH_OTLP_GRPC_SSL_MTLS_PREVIEW=ON \
537537
-DWITH_OTLP_RETRY_PREVIEW=ON \
538-
-DWITH_OTLP_GRPC=OFF \
539-
-DWITH_OTLP_HTTP=OFF \
540-
-DWITH_OTLP_FILE=OFF \
541-
-DWITH_OTLP_HTTP_COMPRESSION=OFF \
542-
-DWITH_HTTP_CLIENT_CURL=OFF \
543-
-DWITH_PROMETHEUS=OFF \
544-
-DWITH_ZIPKIN=OFF \
545-
-DWITH_ELASTICSEARCH=OFF \
546-
-DWITH_EXAMPLES=OFF \
547-
-DWITH_EXAMPLES_HTTP=OFF \
548-
-DBUILD_W3CTRACECONTEXT_TEST=OFF \
538+
-DWITH_OTLP_GRPC=ON \
539+
-DWITH_OTLP_HTTP=ON \
540+
-DWITH_OTLP_FILE=ON \
541+
-DWITH_OTLP_HTTP_COMPRESSION=ON \
542+
-DWITH_HTTP_CLIENT_CURL=ON \
543+
-DWITH_PROMETHEUS=ON \
544+
-DWITH_ZIPKIN=ON \
545+
-DWITH_ELASTICSEARCH=ON \
546+
-DWITH_EXAMPLES=ON \
547+
-DWITH_EXAMPLES_HTTP=ON \
548+
-DBUILD_W3CTRACECONTEXT_TEST=ON \
549549
-DOPENTELEMETRY_INSTALL=OFF \
550550
-DOPENTELEMETRY_CPP_SRC_DIR="${SRC_DIR}" \
551551
"${SRC_DIR}/install/test/cmake/fetch_content_test"

install/test/cmake/fetch_content_test/CMakeLists.txt

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,18 @@ FetchContent_MakeAvailable(opentelemetry-cpp)
3333
add_executable(
3434
fetch_content_src_test
3535
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_api.cc
36-
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_sdk.cc)
36+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_sdk.cc
37+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_ext_common.cc
38+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_ext_http_curl.cc
39+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_ostream.cc
40+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_in_memory.cc
41+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_otlp_common.cc
42+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_otlp_grpc.cc
43+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_otlp_http.cc
44+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_otlp_file.cc
45+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_prometheus.cc
46+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_zipkin.cc
47+
${OPENTELEMETRY_CPP_SRC_DIR}/install/test/src/test_exporters_elasticsearch.cc)
3748

3849
target_link_libraries(
3950
fetch_content_src_test
@@ -42,6 +53,24 @@ target_link_libraries(
4253
opentelemetry-cpp::metrics
4354
opentelemetry-cpp::trace
4455
opentelemetry-cpp::logs
56+
opentelemetry-cpp::http_client_curl
57+
opentelemetry-cpp::in_memory_span_exporter
58+
opentelemetry-cpp::in_memory_metric_exporter
59+
opentelemetry-cpp::ostream_log_record_exporter
60+
opentelemetry-cpp::ostream_metrics_exporter
61+
opentelemetry-cpp::ostream_span_exporter
62+
opentelemetry-cpp::otlp_file_exporter
63+
opentelemetry-cpp::otlp_file_log_record_exporter
64+
opentelemetry-cpp::otlp_file_metric_exporter
65+
opentelemetry-cpp::otlp_grpc_exporter
66+
opentelemetry-cpp::otlp_grpc_log_record_exporter
67+
opentelemetry-cpp::otlp_grpc_metrics_exporter
68+
opentelemetry-cpp::otlp_http_exporter
69+
opentelemetry-cpp::otlp_http_log_record_exporter
70+
opentelemetry-cpp::otlp_http_metric_exporter
71+
opentelemetry-cpp::prometheus_exporter
72+
opentelemetry-cpp::zipkin_trace_exporter
73+
opentelemetry-cpp::elasticsearch_log_record_exporter
4574
GTest::gtest
4675
GTest::gtest_main)
4776

0 commit comments

Comments
 (0)