Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 55 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# submodules: 'recursive'
# - name: setup
# env:
# CXX_STANDARD: '14'
# CXX_STANDARD: '17'
# CC: /usr/bin/gcc-10
# CXX: /usr/bin/g++-10
# run: |
Expand Down Expand Up @@ -59,15 +59,18 @@ jobs:
env:
CXX_STANDARD: '17'
CMAKE_VERSION: '3.16.0'
BUILD_TYPE: 'Debug'
BUILD_TYPE: 'Release'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: 'recursive'
submodules: 'false'
- name: checkout googletest
run: |
git submodule update --init --recursive ./third_party/googletest
- name: setup
run: |
sudo -E ./ci/setup_ci_environment.sh
Expand All @@ -86,7 +89,7 @@ jobs:
env:
CC: /usr/bin/gcc-14
CXX: /usr/bin/g++-14
CXX_STANDARD: '14'
CXX_STANDARD: '17'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
Expand Down Expand Up @@ -120,7 +123,7 @@ jobs:
env:
CC: /usr/bin/gcc-14
CXX: /usr/bin/g++-14
CXX_STANDARD: '14'
CXX_STANDARD: '17'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
Expand Down Expand Up @@ -154,7 +157,7 @@ jobs:
env:
CC: /usr/bin/clang-18
CXX: /usr/bin/clang++-18
CXX_STANDARD: '14'
CXX_STANDARD: '17'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
Expand Down Expand Up @@ -182,13 +185,47 @@ jobs:
run: |
(cd ./functional/otlp; ./run_test.sh)

cmake_clang_maintainer_cxx14_async_test:
name: CMake clang 18 with C++14 (maintainer mode, async)
runs-on: ubuntu-24.04
env:
CC: /usr/bin/clang-18
CXX: /usr/bin/clang++-18
CXX_STANDARD: '14'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: 'recursive'
- name: setup
run: |
sudo -E ./ci/setup_ci_environment.sh
- name: install dependencies
run: | # install c++14 compatible third-party versions
sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file ./install/cmake/third_party_stable
- name: run cmake clang (maintainer mode, async)
run: |
./ci/do_ci.sh cmake.maintainer.async.test
- name: generate test cert
env:
CFSSL_VERSION: 1.6.3
run: |
sudo -E ./tools/setup-cfssl.sh
(cd ./functional/cert; ./generate_cert.sh)
- name: run func test
run: |
(cd ./functional/otlp; ./run_test.sh)

cmake_clang_yaml_config:
name: CMake clang 18 (maintainer mode, yaml config)
runs-on: ubuntu-24.04
env:
CC: /usr/bin/clang-18
CXX: /usr/bin/clang++-18
CXX_STANDARD: '14'
CXX_STANDARD: '17'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
Expand Down Expand Up @@ -227,7 +264,7 @@ jobs:
env:
CC: /usr/bin/clang-18
CXX: /usr/bin/clang++-18
CXX_STANDARD: '14'
CXX_STANDARD: '17'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
Expand Down Expand Up @@ -261,7 +298,7 @@ jobs:
env:
CC: /usr/bin/clang-18
CXX: /usr/bin/clang++-18
CXX_STANDARD: '14'
CXX_STANDARD: '17'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
Expand Down Expand Up @@ -406,6 +443,9 @@ jobs:
- name: setup
run: |
sudo -E ./ci/setup_ci_environment.sh
- name: install dependencies
run: |
sudo -E ./ci/install_thirdparty.sh --install-dir /usr/local --tags-file ./install/cmake/third_party_stable --packages "googletest;benchmark"
- name: run tests (enable stl)
env:
CXX_STANDARD: '14'
Expand Down Expand Up @@ -889,6 +929,11 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: 'recursive'
- name: Install CMake
env:
CMAKE_VERSION: 3.31.6 # the macos runner installs CMake 4.x and is not compatible with opentracing
run: |
./ci/setup_cmake_macos.sh
- name: Mount Bazel Cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
env:
Expand Down Expand Up @@ -1177,7 +1222,7 @@ jobs:
sudo -E apt-get install -y zlib1g-dev libcurl4-openssl-dev
- name: run w3c trace-context test server (background)
env:
CXX_STANDARD: '14'
CXX_STANDARD: '17'
run: |
./ci/do_ci.sh cmake.w3c.trace-context.build-server
cd $HOME/build/ext/test/w3c_tracecontext_http_test_server
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
--inline-suppr \
--suppress=unknownMacro:exporters/etw/include/opentelemetry/exporters/etw/TraceLoggingDynamic.h \
--language=c++ \
--std=c++14 \
--std=c++17 \
-I api/include \
-I exporters/elasticsearch/include \
-I exporters/etw/include \
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ message(STATUS "OTELCPP_MAINTAINER_MODE: ${OTELCPP_MAINTAINER_MODE}")
message(STATUS "WITH_STL: ${WITH_STL}")
message(STATUS "WITH_GSL: ${WITH_GSL}")
message(STATUS "WITH_NO_GETENV: ${WITH_NO_GETENV}")
message(STATUS "OPENTELEMETRY_INSTALL: ${OPENTELEMETRY_INSTALL}")

message(STATUS "---------------------------------------------")
message(STATUS "opentelemetry-cpp cmake component options")
Expand Down
4 changes: 2 additions & 2 deletions ci/do_ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ switch ($action) {
if (Test-Path Env:\CXX_STANDARD) {
$CXX_STANDARD = [int](Get-Item Env:\CXX_STANDARD).Value
} else {
$CXX_STANDARD = 14
$CXX_STANDARD = 17
}
if (-not $CXX_STANDARD) {
$CXX_STANDARD = 14
$CXX_STANDARD = 17
}
Write-Host "Using CXX_STANDARD: $CXX_STANDARD"

Expand Down
11 changes: 8 additions & 3 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ MAKE_COMMAND="make -k -j \$(nproc)"

echo "make command: ${MAKE_COMMAND}"

export BAZEL_CXXOPTS="-std=c++17"


BAZEL_OPTIONS_DEFAULT="--copt=-DENABLE_METRICS_EXEMPLAR_PREVIEW --//exporters/otlp:with_otlp_grpc_credential_preview=true"
BAZEL_OPTIONS="$BAZEL_OPTIONS_DEFAULT"

Expand All @@ -92,7 +95,7 @@ fi
if [ -n "${CXX_STANDARD}" ]; then
CMAKE_OPTIONS+=("-DCMAKE_CXX_STANDARD=${CXX_STANDARD}")
else
CMAKE_OPTIONS+=("-DCMAKE_CXX_STANDARD=14")
CMAKE_OPTIONS+=("-DCMAKE_CXX_STANDARD=17")
fi

CMAKE_OPTIONS+=("-DCMAKE_CXX_STANDARD_REQUIRED=ON")
Expand Down Expand Up @@ -574,8 +577,10 @@ elif [[ "$1" == "bazel.noexcept" ]]; then
# there are some exceptions and error handling code from the Prometheus Client
# as well as Opentracing shim (due to some third party code in its Opentracing dependency)
# that make this test always fail. Ignore these packages in the noexcept test here.
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/...
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/...
# Set the api:with_cxx_stdlib=none because C++17 std::variant::get<> throws

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/...
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/...
exit 0
elif [[ "$1" == "bazel.nortti" ]]; then
# there are some exceptions and error handling code from the Prometheus Client
Expand Down
2 changes: 1 addition & 1 deletion ci/install_thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if [ -z "${THIRDPARTY_INSTALL_DIR}" ]; then
fi

if [ -z "${CXX_STANDARD}" ]; then
CXX_STANDARD=14
CXX_STANDARD=17
fi

THIRDPARTY_BUILD_DIR="/tmp/otel-cpp-third-party-build"
Expand Down
1 change: 1 addition & 0 deletions cmake/grpc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ if(NOT gRPC_FOUND)
set(gRPC_PROVIDER "fetch_repository")

set(gRPC_INSTALL ${OPENTELEMETRY_INSTALL} CACHE BOOL "" FORCE)
set(protobuf_INSTALL ${OPENTELEMETRY_INSTALL} CACHE BOOL "" FORCE)
set(gRPC_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(gRPC_BUILD_GRPC_CPP_PLUGIN ON CACHE BOOL "" FORCE)
set(gRPC_BUILD_GRPC_CSHARP_PLUGIN OFF CACHE BOOL "" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion install/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ else()
endif()

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
endif()

set(CMAKE_OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion third_party/benchmark
Submodule benchmark updated 137 files
2 changes: 1 addition & 1 deletion third_party/googletest
Submodule googletest updated 95 files
+0 −43 .github/workflows/gtest-ci.yml
+1 −0 .gitignore
+44 −13 BUILD.bazel
+12 −3 CMakeLists.txt
+4 −4 CONTRIBUTING.md
+1 −0 CONTRIBUTORS
+76 −0 MODULE.bazel
+8 −21 README.md
+47 −13 WORKSPACE
+35 −0 WORKSPACE.bzlmod
+49 −29 ci/linux-presubmit.sh
+8 −4 ci/macos-presubmit.sh
+32 −15 ci/windows-presubmit.bat
+91 −61 docs/advanced.md
+18 −52 docs/faq.md
+87 −19 docs/gmock_cook_book.md
+4 −2 docs/gmock_for_dummies.md
+19 −20 docs/primer.md
+23 −30 docs/quickstart-bazel.md
+2 −1 docs/reference/actions.md
+10 −3 docs/reference/assertions.md
+7 −4 docs/reference/matchers.md
+1 −2 docs/reference/mocking.md
+123 −5 docs/reference/testing.md
+61 −0 fake_fuchsia_sdk.bzl
+14 −13 googlemock/CMakeLists.txt
+3 −3 googlemock/README.md
+132 −25 googlemock/include/gmock/gmock-actions.h
+5 −4 googlemock/include/gmock/gmock-function-mocker.h
+423 −155 googlemock/include/gmock/gmock-matchers.h
+12 −11 googlemock/include/gmock/gmock-more-actions.h
+4 −6 googlemock/include/gmock/gmock-spec-builders.h
+8 −7 googlemock/include/gmock/gmock.h
+8 −11 googlemock/include/gmock/internal/gmock-internal-utils.h
+5 −4 googlemock/include/gmock/internal/gmock-port.h
+4 −4 googlemock/src/gmock-cardinalities.cc
+3 −2 googlemock/src/gmock-internal-utils.cc
+14 −15 googlemock/src/gmock-matchers.cc
+2 −1 googlemock/src/gmock-spec-builders.cc
+71 −7 googlemock/test/gmock-actions_test.cc
+2 −2 googlemock/test/gmock-function-mocker_test.cc
+210 −27 googlemock/test/gmock-matchers-arithmetic_test.cc
+140 −5 googlemock/test/gmock-matchers-comparisons_test.cc
+331 −22 googlemock/test/gmock-matchers-containers_test.cc
+82 −23 googlemock/test/gmock-matchers-misc_test.cc
+78 −11 googlemock/test/gmock-more-actions_test.cc
+1 −1 googlemock/test/gmock-pp_test.cc
+4 −5 googlemock/test/gmock-spec-builders_test.cc
+9 −0 googlemock/test/gmock_link_test.h
+14 −14 googletest/CMakeLists.txt
+4 −4 googletest/README.md
+4 −0 googletest/cmake/Config.cmake.in
+23 −21 googletest/cmake/internal_utils.cmake
+7 −0 googletest/include/gtest/gtest-assertion-result.h
+4 −4 googletest/include/gtest/gtest-death-test.h
+3 −3 googletest/include/gtest/gtest-matchers.h
+9 −10 googletest/include/gtest/gtest-message.h
+96 −40 googletest/include/gtest/gtest-param-test.h
+102 −27 googletest/include/gtest/gtest-printers.h
+21 −21 googletest/include/gtest/gtest-typed-test.h
+38 −21 googletest/include/gtest/gtest.h
+25 −26 googletest/include/gtest/internal/gtest-death-test-internal.h
+7 −1 googletest/include/gtest/internal/gtest-filepath.h
+68 −111 googletest/include/gtest/internal/gtest-internal.h
+125 −87 googletest/include/gtest/internal/gtest-param-util.h
+2 −0 googletest/include/gtest/internal/gtest-port-arch.h
+94 −89 googletest/include/gtest/internal/gtest-port.h
+3 −3 googletest/include/gtest/internal/gtest-type-util.h
+19 −17 googletest/src/gtest-death-test.cc
+1 −1 googletest/src/gtest-filepath.cc
+33 −17 googletest/src/gtest-internal-inl.h
+70 −28 googletest/src/gtest-port.cc
+329 −152 googletest/src/gtest.cc
+51 −17 googletest/test/BUILD.bazel
+1 −0 googletest/test/googletest-color-test.py
+41 −37 googletest/test/googletest-death-test-test.cc
+38 −0 googletest/test/googletest-fail-if-no-test-linked-test-with-disabled-test_.cc
+38 −0 googletest/test/googletest-fail-if-no-test-linked-test-with-enabled-test_.cc
+169 −0 googletest/test/googletest-fail-if-no-test-linked-test.py
+19 −0 googletest/test/googletest-filter-unittest.py
+110 −16 googletest/test/googletest-json-output-unittest.py
+4 −1 googletest/test/googletest-options-test.cc
+0 −5 googletest/test/googletest-output-test-golden-lin.txt
+70 −0 googletest/test/googletest-param-test-test.cc
+3 −3 googletest/test/googletest-port-test.cc
+47 −1 googletest/test/googletest-printers-test.cc
+2 −2 googletest/test/googletest-setuptestsuite-test_.cc
+52 −44 googletest/test/gtest_environment_test.cc
+23 −41 googletest/test/gtest_help_test.py
+3 −0 googletest/test/gtest_json_test_utils.py
+1 −3 googletest/test/gtest_repeat_test.cc
+67 −27 googletest/test/gtest_unittest.cc
+76 −32 googletest/test/gtest_xml_output_unittest.py
+21 −1 googletest/test/gtest_xml_output_unittest_.cc
+16 −10 googletest_deps.bzl
2 changes: 1 addition & 1 deletion third_party/ms-gsl
Submodule ms-gsl updated 50 files
+1 −0 .gitattributes
+29 −0 .github/ISSUE_TEMPLATE/bug_report.md
+21 −12 .github/workflows/android.yml
+56 −0 .github/workflows/cmake/action.yml
+25 −0 .github/workflows/cmake_find_package.yml
+115 −0 .github/workflows/compilers.yml
+7 −6 .github/workflows/ios.yml
+0 −337 .travis.yml
+32 −111 CMakeLists.txt
+1 −1 CONTRIBUTING.md
+4 −31 GSL.natvis
+103 −68 README.md
+41 −0 SECURITY.md
+0 −114 appveyor.yml
+884 −0 docs/headers.md
+13 −0 include/CMakeLists.txt
+4 −2 include/gsl/algorithm
+10 −10 include/gsl/assert
+38 −48 include/gsl/byte
+13 −8 include/gsl/gsl
+0 −52 include/gsl/gsl_narrow
+0 −129 include/gsl/gsl_util
+0 −2,263 include/gsl/multi_span
+82 −0 include/gsl/narrow
+121 −47 include/gsl/pointers
+141 −90 include/gsl/span
+20 −4 include/gsl/span_ext
+0 −785 include/gsl/string_span
+200 −0 include/gsl/util
+58 −0 include/gsl/zstring
+98 −51 tests/CMakeLists.txt
+2 −2 tests/CMakeLists.txt.in
+13 −16 tests/algorithm_tests.cpp
+6 −7 tests/assertion_tests.cpp
+68 −30 tests/at_tests.cpp
+0 −102 tests/bounds_tests.cpp
+65 −16 tests/byte_tests.cpp
+11 −0 tests/deathTestCommon.h
+0 −1,866 tests/multi_span_tests.cpp
+7 −0 tests/no_exception_ensure_tests.cpp
+254 −51 tests/notnull_tests.cpp
+17 −10 tests/owner_tests.cpp
+97 −0 tests/pointers_tests.cpp
+13 −8 tests/span_compatibility_tests.cpp
+302 −282 tests/span_ext_tests.cpp
+1,129 −981 tests/span_tests.cpp
+293 −22 tests/strict_notnull_tests.cpp
+0 −790 tests/strided_span_tests.cpp
+0 −1,217 tests/string_span_tests.cpp
+25 −7 tests/utils_tests.cpp
16 changes: 8 additions & 8 deletions third_party_release
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
# - opentelemetry-cpp/MODULE.bazel
# - opentelemetry-cpp/bazel/repository.bzl

abseil=20220623.2
abseil=20250127.0
zlib=v1.3.1
curl=curl-8_12_0
protobuf=v3.21.6
grpc=v1.49.2
benchmark=v1.8.3
googletest=v1.14.0
ms-gsl=v3.1.0
curl=curl-8_16_0
protobuf=v6.31.1
grpc=v1.75.1
benchmark=v1.9.4
googletest=v1.17.0
ms-gsl=v4.2.0
nlohmann-json=v3.12.0
opentelemetry-proto=v1.7.0
opentracing-cpp=v1.6.0
prometheus-cpp=v1.3.0
vcpkg=2024.02.14
ryml=v0.9.0
vcpkg=2024.02.14
Loading