Skip to content

Commit 6fbc78a

Browse files
committed
Make the cmake.fetch_content.test fetch all dependencies
1 parent 9f7165a commit 6fbc78a

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
runs-on: ubuntu-24.04
5757
env:
5858
CXX_STANDARD: '17'
59-
BUILD_TYPE: 'Debug'
59+
BUILD_TYPE: 'Release'
6060
steps:
6161
- name: Harden the runner (Audit all outbound calls)
6262
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -69,11 +69,6 @@ jobs:
6969
run: |
7070
sudo -E ./ci/setup_ci_environment.sh
7171
sudo -E ./ci/setup_cmake.sh
72-
sudo -E ./ci/setup_googletest.sh
73-
- name: Install abseil, protobuf, and grpc with apt
74-
run: |
75-
sudo -E apt-get update
76-
sudo -E apt-get install -y libabsl-dev libprotobuf-dev libgrpc++-dev protobuf-compiler protobuf-compiler-grpc
7772
- name: run fetch content cmake test
7873
run: |
7974
./ci/do_ci.sh cmake.fetch_content.test
@@ -608,7 +603,6 @@ jobs:
608603
- name: Install Dependencies
609604
run: |
610605
sudo -E ./ci/install_abseil.sh
611-
sudo -E ./ci/setup_googletest.sh
612606
sudo -E ./ci/install_protobuf.sh
613607
sudo -E ./ci/setup_grpc.sh -r $GRPC_VERSION -s $CXX_STANDARD -p protobuf -p abseil-cpp
614608
- name: run otlp exporter tests

install/test/cmake/fetch_content_test/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ cmake_minimum_required(VERSION 3.14)
88

99
project(opentelemetry-cpp-fetch-content-test LANGUAGES CXX)
1010

11-
find_package(GTest CONFIG REQUIRED)
12-
1311
set(BUILD_TESTING
1412
ON
1513
CACHE BOOL "Build tests" FORCE)
@@ -27,8 +25,13 @@ message(
2725
)
2826

2927
include(FetchContent)
28+
29+
FetchContent_Declare(
30+
googletest SOURCE_DIR ${OPENTELEMETRY_CPP_SRC_DIR}/third_party/googletest)
31+
3032
FetchContent_Declare(opentelemetry-cpp SOURCE_DIR ${OPENTELEMETRY_CPP_SRC_DIR})
31-
FetchContent_MakeAvailable(opentelemetry-cpp)
33+
34+
FetchContent_MakeAvailable(googletest opentelemetry-cpp)
3235

3336
add_executable(
3437
fetch_content_src_test

0 commit comments

Comments
 (0)