Skip to content

Commit d4b1091

Browse files
committed
add support for adding googltest and benchmark from submodule or git repo based on the tag in the thrid_party_release file. Remove calling setup_googletest.sh from ci jobs that don't build otlp components
1 parent 021490e commit d4b1091

File tree

11 files changed

+150
-209
lines changed

11 files changed

+150
-209
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: setup
5151
run: |
5252
sudo -E ./ci/setup_ci_environment.sh
53-
sudo -E ./ci/setup_googletest.sh
53+
sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev nlohmann-json3-dev
5454
- name: run cmake tests
5555
run: |
5656
./ci/do_ci.sh cmake.test
@@ -72,11 +72,10 @@ jobs:
7272
- name: setup
7373
run: |
7474
sudo -E ./ci/setup_ci_environment.sh
75-
sudo -E ./ci/setup_googletest.sh
76-
- name: Install abseil, protobuf, and grpc with apt
75+
- name: install dependencies
7776
run: |
7877
sudo -E apt-get update
79-
sudo -E apt-get install -y libabsl-dev libprotobuf-dev libgrpc++-dev protobuf-compiler protobuf-compiler-grpc
78+
sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev libabsl-dev libprotobuf-dev libgrpc++-dev protobuf-compiler protobuf-compiler-grpc
8079
- name: run fetch content cmake test
8180
run: |
8281
./ci/do_ci.sh cmake.fetch_content.test
@@ -362,7 +361,6 @@ jobs:
362361
CXX: /usr/bin/g++-12
363362
run: |
364363
sudo -E ./ci/setup_ci_environment.sh
365-
sudo -E ./ci/setup_googletest.sh
366364
- name: run cmake tests (without otlp-exporter)
367365
env:
368366
CC: /usr/bin/gcc-12
@@ -385,7 +383,6 @@ jobs:
385383
- name: setup
386384
run: |
387385
sudo -E ./ci/setup_ci_environment.sh
388-
sudo -E ./ci/setup_googletest.sh
389386
- name: run cmake tests (enable opentracing-shim)
390387
run: ./ci/do_ci.sh cmake.opentracing_shim.test
391388

@@ -404,7 +401,6 @@ jobs:
404401
- name: setup
405402
run: |
406403
sudo -E ./ci/setup_ci_environment.sh
407-
sudo -E ./ci/setup_googletest.sh
408404
- name: run tests (enable stl)
409405
env:
410406
CXX_STANDARD: '14'
@@ -425,7 +421,6 @@ jobs:
425421
- name: setup
426422
run: |
427423
sudo -E ./ci/setup_ci_environment.sh
428-
sudo -E ./ci/setup_googletest.sh
429424
- name: run tests (enable stl)
430425
env:
431426
CXX_STANDARD: '17'
@@ -446,7 +441,6 @@ jobs:
446441
- name: setup
447442
run: |
448443
sudo -E ./ci/setup_ci_environment.sh
449-
sudo -E ./ci/setup_googletest.sh
450444
- name: run tests
451445
env:
452446
CXX_STANDARD: '20'
@@ -475,7 +469,6 @@ jobs:
475469
CXXFLAGS: "-stdlib=libc++"
476470
run: |
477471
sudo -E ./ci/setup_ci_environment.sh
478-
sudo -E ./ci/setup_googletest.sh
479472
- name: run tests
480473
env:
481474
CC: /usr/bin/clang
@@ -506,7 +499,6 @@ jobs:
506499
- name: setup
507500
run: |
508501
sudo -E ./ci/setup_ci_environment.sh
509-
sudo -E ./ci/setup_googletest.sh
510502
- name: run tests
511503
env:
512504
CXX_STANDARD: '23'
@@ -535,7 +527,6 @@ jobs:
535527
CXXFLAGS: "-stdlib=libc++"
536528
run: |
537529
sudo -E ./ci/setup_ci_environment.sh
538-
sudo -E ./ci/setup_googletest.sh
539530
- name: run tests
540531
env:
541532
CC: /usr/bin/clang
@@ -670,7 +661,6 @@ jobs:
670661
CXX: /usr/bin/g++-12
671662
run: |
672663
sudo -E ./ci/setup_ci_environment.sh
673-
sudo -E ./ci/setup_googletest.sh
674664
- name: run tests
675665
env:
676666
CC: /usr/bin/gcc-12
@@ -1087,7 +1077,6 @@ jobs:
10871077
CXX: /usr/bin/g++-10
10881078
run: |
10891079
sudo -E ./ci/setup_ci_environment.sh
1090-
sudo -E ./ci/setup_googletest.sh
10911080
- name: run tests and generate report
10921081
env:
10931082
CC: /usr/bin/gcc-10
@@ -1183,7 +1172,6 @@ jobs:
11831172
CXX: /usr/bin/g++-12
11841173
run: |
11851174
sudo -E ./ci/setup_ci_environment.sh
1186-
sudo -E ./ci/setup_googletest.sh
11871175
- name: run w3c trace-context test server (background)
11881176
env:
11891177
CXX_STANDARD: '14'

.github/workflows/cmake_install.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,13 @@ jobs:
7171
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7272
with:
7373
submodules: 'recursive'
74-
- name: Install libcurl, zlib, nlohmann-json with apt
74+
- name: Setup Environment
7575
run: |
7676
sudo -E ./ci/setup_ci_environment.sh
77-
sudo -E ./ci/setup_googletest.sh
78-
- name: Install abseil, protobuf, and grpc with apt
77+
- name: Install Dependencies
7978
run: |
8079
sudo -E apt-get update
81-
sudo -E apt-get install -y libabsl-dev libprotobuf-dev libgrpc++-dev protobuf-compiler protobuf-compiler-grpc
80+
sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev nlohmann-json3-dev libabsl-dev libprotobuf-dev libgrpc++-dev protobuf-compiler protobuf-compiler-grpc
8281
- name: Run Tests (static libs)
8382
env:
8483
BUILD_SHARED_LIBS: 'OFF'
@@ -98,7 +97,6 @@ jobs:
9897
# Versions below set to the latest version available
9998
# The abseil and protobuf versions are taken from
10099
# the grpc submodules at the GRPC_VERSION tag
101-
GOOGLETEST_VERSION: '1.16.0'
102100
ABSEIL_CPP_VERSION: '20240722.1'
103101
PROTOBUF_VERSION: '29.0'
104102
GRPC_VERSION: 'v1.71.0'
@@ -112,12 +110,12 @@ jobs:
112110
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
113111
with:
114112
submodules: 'recursive'
115-
- name: Install gtest, libcurl, zlib, nlohmann-json with apt
113+
- name: Setup Environment
116114
run: |
117115
sudo -E ./ci/setup_ci_environment.sh
118-
sudo -E ./ci/setup_googletest.sh
119-
- name: Build abseil, protobuf, and grpc with ci scripts
116+
- name: Install Dependencies
120117
run: |
118+
sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev
121119
sudo -E ./ci/install_abseil.sh
122120
sudo -E ./ci/install_protobuf.sh
123121
sudo -E ./ci/setup_grpc.sh -r $GRPC_VERSION -s $CXX_STANDARD -p protobuf -p abseil-cpp
@@ -134,7 +132,6 @@ jobs:
134132
CXX_STANDARD: '17'
135133
# These are stable versions tested in the main ci workflow
136134
# and defaults in the devcontainer
137-
GOOGLETEST_VERSION: '1.14.0'
138135
ABSEIL_CPP_VERSION: '20230125.3'
139136
PROTOBUF_VERSION: '23.3'
140137
GRPC_VERSION: 'v1.55.0'
@@ -148,12 +145,12 @@ jobs:
148145
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
149146
with:
150147
submodules: 'recursive'
151-
- name: Install gtest, libcurl, zlib, nlohmann-json with apt
148+
- name: Setup Environment
152149
run: |
153150
sudo -E ./ci/setup_ci_environment.sh
154-
sudo -E ./ci/setup_googletest.sh
155-
- name: Build abseil, protobuf, and grpc with ci scripts
151+
- name: Install Dependencies
156152
run: |
153+
sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev
157154
sudo -E ./ci/install_abseil.sh
158155
sudo -E ./ci/install_protobuf.sh
159156
sudo -E ./ci/setup_grpc.sh -r $GRPC_VERSION -s $CXX_STANDARD -p protobuf -p abseil-cpp
@@ -175,8 +172,6 @@ jobs:
175172
CMAKE_VERSION: '3.14.0'
176173
# cxx14 is the default for Ubuntu 22.04
177174
CXX_STANDARD: '14'
178-
# This is the apt package version of googletest for Ubuntu 22.04
179-
GOOGLETEST_VERSION: '1.11.0'
180175
# These are minimum versions tested in the main ci workflow
181176
ABSEIL_CPP_VERSION: '20220623.2'
182177
PROTOBUF_VERSION: '21.12'
@@ -191,13 +186,13 @@ jobs:
191186
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
192187
with:
193188
submodules: 'recursive'
194-
- name: Install gtest, libcurl, zlib, nlohmann-json with apt
189+
- name: Setup Environment
195190
run: |
196191
sudo -E ./ci/setup_ci_environment.sh
197192
sudo -E ./ci/setup_cmake.sh
198-
sudo -E ./ci/setup_googletest.sh
199-
- name: Build abseil, protobuf, and grpc with ci scripts
193+
- name: Install Dependencies
200194
run: |
195+
sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev
201196
sudo -E ./ci/install_abseil.sh
202197
sudo -E ./ci/install_protobuf.sh
203198
sudo -E ./ci/setup_grpc.sh -r $GRPC_VERSION -s $CXX_STANDARD -p protobuf -p abseil-cpp

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ jobs:
3434
env:
3535
CC: /usr/bin/gcc-12
3636
CXX: /usr/bin/g++-12
37-
GOOGLETEST_VERSION: 1.12.1
3837
run: |
39-
sudo -E ./ci/setup_googletest.sh
4038
sudo -E ./ci/setup_ci_environment.sh
4139
- name: Initialize CodeQL
4240
uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0

0 commit comments

Comments
 (0)