-
Notifications
You must be signed in to change notification settings - Fork 440
Ci gha v3 windows3 #15924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: prepare-for-v3.0.0
Are you sure you want to change the base?
Ci gha v3 windows3 #15924
Changes from all commits
9952159
3f83e44
137a960
b2e8990
61e7862
5c7abaa
088f9eb
ac6164f
7f8e128
7243646
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 2025.10.17 | ||
| 3895230f38e498525f2560a281223d12066fa74a |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ function cmake::common_args() { | |
| fi | ||
| local args | ||
| args=( | ||
| -DCMAKE_CXX_STANDARD=17 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Setting References
|
||
| -DGOOGLE_CLOUD_CPP_ENABLE_CCACHE=OFF | ||
| -DGOOGLE_CLOUD_CPP_ENABLE_WERROR=ON | ||
| -GNinja | ||
|
|
@@ -58,7 +59,7 @@ function cmake::common_args() { | |
| if [[ -n "${VCPKG_TRIPLET:-}" ]]; then | ||
| args+=("-DVCPKG_TARGET_TRIPLET=${VCPKG_TRIPLET}") | ||
| fi | ||
| args+=("-DVCPKG_OVERLAY_PORTS=ci/gha/builds/vcpkg-overlays") | ||
| args+=("-DVCPKG_OVERLAY_PORTS=ci\gha\builds\vcpkg-overlays") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| printf "%s\n" "${args[@]}" | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| diff --git a/cmake/opentracing-cpp.cmake b/cmake/opentracing-cpp.cmake | ||
| index f014ecd..fd8898a 100644 | ||
| --- a/cmake/opentracing-cpp.cmake | ||
| +++ b/cmake/opentracing-cpp.cmake | ||
| @@ -1,7 +1,11 @@ | ||
| # Copyright The OpenTelemetry Authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| -find_package(OpenTracing CONFIG QUIET) | ||
| +find_package(OpenTracing CONFIG REQUIRED) | ||
| +if(NOT TARGET OpenTracing::opentracing AND TARGET OpenTracing::opentracing-static) | ||
| + add_library(OpenTracing::opentracing ALIAS OpenTracing::opentracing-static) | ||
| +endif() | ||
| + | ||
| set(OpenTracing_PROVIDER "find_package") | ||
|
|
||
| if(NOT OpenTracing_FOUND) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,12 +10,11 @@ vcpkg_from_github( | |
| REF | ||
| "v${VERSION}" | ||
| SHA512 | ||
| c93005c9b24b358a9998141f6c7fd9675778731775dacaad18f0e81117fd00aaabff371c04cf96688a9c86117727181052a141d961d4db28fc457b454351c570 | ||
| 6dc0357d8b3410852d3f970f72b8bec59dba9d6c533ca600432102e65de161903bd9170d98cef7ff0af5191309577ffd2a69ccd004b840914a910a6a282204e4 | ||
| HEAD_REF | ||
| main | ||
| PATCHES | ||
| # Missing find_dependency for Abseil | ||
| add-missing-find-dependency.patch) | ||
| fix-target_link.patch) | ||
|
|
||
| vcpkg_check_features( | ||
| OUT_FEATURE_OPTIONS | ||
|
|
@@ -29,6 +28,8 @@ vcpkg_check_features( | |
| WITH_PROMETHEUS | ||
| elasticsearch | ||
| WITH_ELASTICSEARCH | ||
| otlp-file | ||
| WITH_OTLP_FILE | ||
| otlp-http | ||
| WITH_OTLP_HTTP | ||
| otlp-grpc | ||
|
|
@@ -37,22 +38,26 @@ vcpkg_check_features( | |
| WITH_GENEVA | ||
| user-events | ||
| WITH_USER_EVENTS | ||
| opentracing | ||
| WITH_OPENTRACING | ||
| INVERTED_FEATURES | ||
| user-events | ||
| BUILD_TRACEPOINTS) | ||
|
|
||
| # opentelemetry-proto is a third party submodule and opentelemetry-cpp release | ||
| # did not pack it. | ||
| if (WITH_OTLP_GRPC OR WITH_OTLP_HTTP) | ||
| set(OTEL_PROTO_VERSION "1.3.1") | ||
| if (WITH_OTLP_FILE | ||
| OR WITH_OTLP_GRPC | ||
| OR WITH_OTLP_HTTP) | ||
| set(OTEL_PROTO_VERSION "1.6.0") | ||
| vcpkg_download_distfile( | ||
| ARCHIVE | ||
| URLS | ||
| "https://github.com/open-telemetry/opentelemetry-proto/archive/v${OTEL_PROTO_VERSION}.tar.gz" | ||
| FILENAME | ||
| "opentelemetry-proto-${OTEL_PROTO_VERSION}.tar.gz" | ||
| SHA512 | ||
| 8c75e4ff79c4b5b251e0ec8ece92ec901d70ec601644505ffdd137fb728daac91fd9203e1f448500124906737d91d80f10b694977688c655418b94f61c828d06 | ||
| 0e72e0c32d2d699d7a832a4c57a9dbe60e844d4c4e8d7b39eb45e4282cde89fccfeef893eae70b9d018643782090a7228c3ef60863b00747498e80f0cf1db8ae | ||
| ) | ||
|
|
||
| vcpkg_extract_source_archive(src ARCHIVE "${ARCHIVE}") | ||
|
|
@@ -62,13 +67,13 @@ if (WITH_OTLP_GRPC OR WITH_OTLP_HTTP) | |
| # Create empty .git directory to prevent opentelemetry from cloning it | ||
| # during build time | ||
| file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/opentelemetry-proto/.git") | ||
| list(APPEND FEATURE_OPTIONS -DCMAKE_CXX_STANDARD=14) | ||
| list( | ||
| APPEND | ||
| FEATURE_OPTIONS | ||
| "-DgRPC_CPP_PLUGIN_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/grpc/grpc_cpp_plugin${VCPKG_HOST_EXECUTABLE_SUFFIX}" | ||
| ) | ||
| endif () | ||
| list(APPEND FEATURE_OPTIONS -DCMAKE_CXX_STANDARD=17 -DWITH_STL=CXX17) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explicitly setting References
|
||
|
|
||
| set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "OFF") | ||
|
|
||
|
|
@@ -111,15 +116,16 @@ vcpkg_cmake_configure( | |
| -DBUILD_TESTING=OFF | ||
| -DWITH_EXAMPLES=OFF | ||
| -DOPENTELEMETRY_INSTALL=ON | ||
| -DWITH_STL=CXX14 | ||
| -DWITH_ABSEIL=ON | ||
| -DWITH_BENCHMARK=OFF | ||
| -DCMAKE_CXX_STANDARD=17 | ||
| -DWITH_STL=CXX17 | ||
| -DOPENTELEMETRY_EXTERNAL_COMPONENT_PATH=${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS} | ||
| ${FEATURE_OPTIONS} | ||
| MAYBE_UNUSED_VARIABLES | ||
| WITH_GENEVA | ||
| WITH_USER_EVENTS | ||
| BUILD_TRACEPOINTS) | ||
| BUILD_TRACEPOINTS | ||
| gRPC_CPP_PLUGIN_EXECUTABLE) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| vcpkg_cmake_install() | ||
| vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", | ||
| "name": "opentelemetry-cpp", | ||
| "version-semver": "1.23.0", | ||
| "description": [ | ||
| "OpenTelemetry is a collection of tools, APIs, and SDKs.", | ||
| "You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior." | ||
| ], | ||
| "homepage": "https://github.com/open-telemetry/opentelemetry-cpp", | ||
| "license": "Apache-2.0", | ||
| "dependencies": [ | ||
| "abseil", | ||
| "nlohmann-json", | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| } | ||
| ], | ||
| "features": { | ||
| "elasticsearch": { | ||
| "description": "Whether to include the Elasticsearch Client in the SDK", | ||
| "dependencies": [ | ||
| { | ||
| "name": "curl", | ||
| "default-features": false | ||
| } | ||
| ] | ||
| }, | ||
| "etw": { | ||
| "description": "Whether to include the ETW Exporter in the SDK", | ||
| "supports": "windows" | ||
| }, | ||
| "geneva": { | ||
| "description": "Whether to include the Geneva Exporter from the opentelemetry-cpp-contrib repository", | ||
| "dependencies": [ | ||
| { | ||
| "name": "opentelemetry-cpp", | ||
| "features": [ | ||
| "etw" | ||
| ], | ||
| "platform": "windows" | ||
| }, | ||
| "opentelemetry-cpp-contrib-version" | ||
| ] | ||
| }, | ||
| "opentracing": { | ||
| "description": "Whether to include the Opentracing shim", | ||
| "dependencies": [ | ||
| "opentracing" | ||
| ] | ||
| }, | ||
| "otlp-file": { | ||
| "description": "Whether to include the OpenTelemetry Protocol to File exporter in the SDK", | ||
| "supports": "!uwp", | ||
| "dependencies": [ | ||
| "protobuf" | ||
| ] | ||
| }, | ||
| "otlp-grpc": { | ||
| "description": "Whether to include the OTLP gRPC exporter in the SDK", | ||
| "dependencies": [ | ||
| "grpc", | ||
| { | ||
| "name": "grpc", | ||
| "host": true | ||
| } | ||
| ] | ||
| }, | ||
| "otlp-http": { | ||
| "description": "Whether to include the OpenTelemetry Protocol over HTTP in the SDK", | ||
| "dependencies": [ | ||
| "curl", | ||
| "protobuf" | ||
| ] | ||
| }, | ||
| "prometheus": { | ||
| "description": "Whether to include the Prometheus Client in the SDK", | ||
| "dependencies": [ | ||
| "prometheus-cpp" | ||
| ] | ||
| }, | ||
| "user-events": { | ||
| "description": "Whether to include the User Events Exporter from the opentelemetry-cpp-contrib repository", | ||
| "supports": "linux", | ||
| "dependencies": [ | ||
| "libeventheader-tracepoint", | ||
| "libtracepoint", | ||
| { | ||
| "name": "opentelemetry-cpp", | ||
| "features": [ | ||
| "otlp-http" | ||
| ] | ||
| }, | ||
| "opentelemetry-cpp-contrib-version" | ||
| ] | ||
| }, | ||
| "zipkin": { | ||
| "description": "Whether to include the Zipkin exporter in the SDK", | ||
| "dependencies": [ | ||
| "curl" | ||
| ] | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| diff --git a/cmake/opentracing-cpp.cmake b/cmake/opentracing-cpp.cmake | ||
| index f014ecd..fd8898a 100644 | ||
| --- a/cmake/opentracing-cpp.cmake | ||
| +++ b/cmake/opentracing-cpp.cmake | ||
| @@ -1,7 +1,11 @@ | ||
| # Copyright The OpenTelemetry Authors | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| -find_package(OpenTracing CONFIG QUIET) | ||
| +find_package(OpenTracing CONFIG REQUIRED) | ||
| +if(NOT TARGET OpenTracing::opentracing AND TARGET OpenTracing::opentracing-static) | ||
| + add_library(OpenTracing::opentracing ALIAS OpenTracing::opentracing-static) | ||
| +endif() | ||
| + | ||
| set(OpenTracing_PROVIDER "find_package") | ||
|
|
||
| if(NOT OpenTracing_FOUND) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
-DNOMINMAXis a crucial step for Windows compatibility in C++ projects. This prevents conflicts between themin/maxmacros defined inwindows.handstd::min/std::maxfrom the C++ standard library, which can lead to unexpected compilation errors or behavior.