Skip to content

Commit f51d390

Browse files
authored
[BUILD] Upgrade third party versions to the latest (open-telemetry#3685)
1 parent f81224d commit f51d390

File tree

12 files changed

+81
-29
lines changed

12 files changed

+81
-29
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# submodules: 'recursive'
2222
# - name: setup
2323
# env:
24-
# CXX_STANDARD: '14'
24+
# CXX_STANDARD: '17'
2525
# CC: /usr/bin/gcc-10
2626
# CXX: /usr/bin/g++-10
2727
# run: |
@@ -59,15 +59,18 @@ jobs:
5959
env:
6060
CXX_STANDARD: '17'
6161
CMAKE_VERSION: '3.16.0'
62-
BUILD_TYPE: 'Debug'
62+
BUILD_TYPE: 'Release'
6363
steps:
6464
- name: Harden the runner (Audit all outbound calls)
6565
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
6666
with:
6767
egress-policy: audit
6868
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6969
with:
70-
submodules: 'recursive'
70+
submodules: 'false'
71+
- name: checkout googletest
72+
run: |
73+
git submodule update --init --recursive ./third_party/googletest
7174
- name: setup
7275
run: |
7376
sudo -E ./ci/setup_ci_environment.sh
@@ -86,7 +89,7 @@ jobs:
8689
env:
8790
CC: /usr/bin/gcc-14
8891
CXX: /usr/bin/g++-14
89-
CXX_STANDARD: '14'
92+
CXX_STANDARD: '17'
9093
steps:
9194
- name: Harden the runner (Audit all outbound calls)
9295
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -120,7 +123,7 @@ jobs:
120123
env:
121124
CC: /usr/bin/gcc-14
122125
CXX: /usr/bin/g++-14
123-
CXX_STANDARD: '14'
126+
CXX_STANDARD: '17'
124127
steps:
125128
- name: Harden the runner (Audit all outbound calls)
126129
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -154,7 +157,7 @@ jobs:
154157
env:
155158
CC: /usr/bin/clang-18
156159
CXX: /usr/bin/clang++-18
157-
CXX_STANDARD: '14'
160+
CXX_STANDARD: '17'
158161
steps:
159162
- name: Harden the runner (Audit all outbound calls)
160163
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -182,13 +185,47 @@ jobs:
182185
run: |
183186
(cd ./functional/otlp; ./run_test.sh)
184187
188+
cmake_clang_maintainer_cxx14_async_test:
189+
name: CMake clang 18 with C++14 (maintainer mode, async)
190+
runs-on: ubuntu-24.04
191+
env:
192+
CC: /usr/bin/clang-18
193+
CXX: /usr/bin/clang++-18
194+
CXX_STANDARD: '14'
195+
steps:
196+
- name: Harden the runner (Audit all outbound calls)
197+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
198+
with:
199+
egress-policy: audit
200+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
201+
with:
202+
submodules: 'recursive'
203+
- name: setup
204+
run: |
205+
sudo -E ./ci/setup_ci_environment.sh
206+
- name: install dependencies
207+
run: | # install c++14 compatible third-party versions
208+
sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file ./install/cmake/third_party_stable
209+
- name: run cmake clang (maintainer mode, async)
210+
run: |
211+
./ci/do_ci.sh cmake.maintainer.async.test
212+
- name: generate test cert
213+
env:
214+
CFSSL_VERSION: 1.6.3
215+
run: |
216+
sudo -E ./tools/setup-cfssl.sh
217+
(cd ./functional/cert; ./generate_cert.sh)
218+
- name: run func test
219+
run: |
220+
(cd ./functional/otlp; ./run_test.sh)
221+
185222
cmake_clang_yaml_config:
186223
name: CMake clang 18 (maintainer mode, yaml config)
187224
runs-on: ubuntu-24.04
188225
env:
189226
CC: /usr/bin/clang-18
190227
CXX: /usr/bin/clang++-18
191-
CXX_STANDARD: '14'
228+
CXX_STANDARD: '17'
192229
steps:
193230
- name: Harden the runner (Audit all outbound calls)
194231
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -227,7 +264,7 @@ jobs:
227264
env:
228265
CC: /usr/bin/clang-18
229266
CXX: /usr/bin/clang++-18
230-
CXX_STANDARD: '14'
267+
CXX_STANDARD: '17'
231268
steps:
232269
- name: Harden the runner (Audit all outbound calls)
233270
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -261,7 +298,7 @@ jobs:
261298
env:
262299
CC: /usr/bin/clang-18
263300
CXX: /usr/bin/clang++-18
264-
CXX_STANDARD: '14'
301+
CXX_STANDARD: '17'
265302
steps:
266303
- name: Harden the runner (Audit all outbound calls)
267304
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
@@ -406,6 +443,9 @@ jobs:
406443
- name: setup
407444
run: |
408445
sudo -E ./ci/setup_ci_environment.sh
446+
- name: install dependencies
447+
run: |
448+
sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file ./install/cmake/third_party_stable --packages "googletest;benchmark"
409449
- name: run tests (enable stl)
410450
env:
411451
CXX_STANDARD: '14'
@@ -889,6 +929,11 @@ jobs:
889929
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
890930
with:
891931
submodules: 'recursive'
932+
- name: Install CMake
933+
env:
934+
CMAKE_VERSION: 3.31.6 # the macos runner installs CMake 4.x and is not compatible with opentracing
935+
run: |
936+
./ci/setup_cmake_macos.sh
892937
- name: Mount Bazel Cache
893938
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
894939
env:
@@ -1177,7 +1222,7 @@ jobs:
11771222
sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev
11781223
- name: run w3c trace-context test server (background)
11791224
env:
1180-
CXX_STANDARD: '14'
1225+
CXX_STANDARD: '17'
11811226
run: |
11821227
./ci/do_ci.sh cmake.w3c.trace-context.build-server
11831228
cd $HOME/build/ext/test/w3c_tracecontext_http_test_server

.github/workflows/cppcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
--inline-suppr \
3737
--suppress=unknownMacro:exporters/etw/include/opentelemetry/exporters/etw/TraceLoggingDynamic.h \
3838
--language=c++ \
39-
--std=c++14 \
39+
--std=c++17 \
4040
-I api/include \
4141
-I exporters/elasticsearch/include \
4242
-I exporters/etw/include \

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ message(STATUS "OTELCPP_MAINTAINER_MODE: ${OTELCPP_MAINTAINER_MODE}")
495495
message(STATUS "WITH_STL: ${WITH_STL}")
496496
message(STATUS "WITH_GSL: ${WITH_GSL}")
497497
message(STATUS "WITH_NO_GETENV: ${WITH_NO_GETENV}")
498+
message(STATUS "OPENTELEMETRY_INSTALL: ${OPENTELEMETRY_INSTALL}")
498499

499500
message(STATUS "---------------------------------------------")
500501
message(STATUS "opentelemetry-cpp cmake component options")

ci/do_ci.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ switch ($action) {
318318
if (Test-Path Env:\CXX_STANDARD) {
319319
$CXX_STANDARD = [int](Get-Item Env:\CXX_STANDARD).Value
320320
} else {
321-
$CXX_STANDARD = 14
321+
$CXX_STANDARD = 17
322322
}
323323
if (-not $CXX_STANDARD) {
324-
$CXX_STANDARD = 14
324+
$CXX_STANDARD = 17
325325
}
326326
Write-Host "Using CXX_STANDARD: $CXX_STANDARD"
327327

ci/do_ci.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ MAKE_COMMAND="make -k -j \$(nproc)"
6969

7070
echo "make command: ${MAKE_COMMAND}"
7171

72+
export BAZEL_CXXOPTS="-std=c++17"
73+
74+
7275
BAZEL_OPTIONS_DEFAULT="--copt=-DENABLE_METRICS_EXEMPLAR_PREVIEW --//exporters/otlp:with_otlp_grpc_credential_preview=true"
7376
BAZEL_OPTIONS="$BAZEL_OPTIONS_DEFAULT"
7477

@@ -92,7 +95,7 @@ fi
9295
if [ -n "${CXX_STANDARD}" ]; then
9396
CMAKE_OPTIONS+=("-DCMAKE_CXX_STANDARD=${CXX_STANDARD}")
9497
else
95-
CMAKE_OPTIONS+=("-DCMAKE_CXX_STANDARD=14")
98+
CMAKE_OPTIONS+=("-DCMAKE_CXX_STANDARD=17")
9699
fi
97100

98101
CMAKE_OPTIONS+=("-DCMAKE_CXX_STANDARD_REQUIRED=ON")
@@ -574,8 +577,10 @@ elif [[ "$1" == "bazel.noexcept" ]]; then
574577
# there are some exceptions and error handling code from the Prometheus Client
575578
# as well as Opentracing shim (due to some third party code in its Opentracing dependency)
576579
# that make this test always fail. Ignore these packages in the noexcept test here.
577-
bazel $BAZEL_STARTUP_OPTIONS build --copt=-fno-exceptions $BAZEL_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/...
578-
bazel $BAZEL_STARTUP_OPTIONS test --copt=-fno-exceptions $BAZEL_TEST_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/...
580+
# Set the api:with_cxx_stdlib=none because C++17 std::variant::get<> throws
581+
582+
bazel $BAZEL_STARTUP_OPTIONS build --copt=-fno-exceptions --//api:with_cxx_stdlib=none $BAZEL_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/...
583+
bazel $BAZEL_STARTUP_OPTIONS test --copt=-fno-exceptions --//api:with_cxx_stdlib=none $BAZEL_TEST_OPTIONS_ASYNC -- //... -//exporters/prometheus/... -//examples/prometheus/... -//opentracing-shim/... -//examples/configuration/... -//sdk/src/configuration/... -//sdk/test/configuration/...
579584
exit 0
580585
elif [[ "$1" == "bazel.nortti" ]]; then
581586
# there are some exceptions and error handling code from the Prometheus Client

ci/install_thirdparty.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if [ -z "${THIRDPARTY_INSTALL_DIR}" ]; then
6666
fi
6767

6868
if [ -z "${CXX_STANDARD}" ]; then
69-
CXX_STANDARD=14
69+
CXX_STANDARD=17
7070
fi
7171

7272
THIRDPARTY_BUILD_DIR="/tmp/otel-cpp-third-party-build"

cmake/grpc.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ if(NOT gRPC_FOUND)
2828
set(gRPC_PROVIDER "fetch_repository")
2929

3030
set(gRPC_INSTALL ${OPENTELEMETRY_INSTALL} CACHE BOOL "" FORCE)
31+
set(protobuf_INSTALL ${OPENTELEMETRY_INSTALL} CACHE BOOL "" FORCE)
3132
set(gRPC_BUILD_TESTS OFF CACHE BOOL "" FORCE)
3233
set(gRPC_BUILD_GRPC_CPP_PLUGIN ON CACHE BOOL "" FORCE)
3334
set(gRPC_BUILD_GRPC_CSHARP_PLUGIN OFF CACHE BOOL "" FORCE)

install/cmake/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ else()
9191
endif()
9292

9393
if(NOT CMAKE_CXX_STANDARD)
94-
set(CMAKE_CXX_STANDARD 14)
94+
set(CMAKE_CXX_STANDARD 17)
9595
endif()
9696

9797
set(CMAKE_OPTIONS

third_party/benchmark

Submodule benchmark updated 137 files

third_party/googletest

Submodule googletest updated 95 files

0 commit comments

Comments
 (0)