From 497eaf43e5676ae7982f7119a2ac70d09211a6f5 Mon Sep 17 00:00:00 2001 From: bcsgh <33939446+bcsgh@users.noreply.github.com> Date: Tue, 30 Jan 2024 00:13:51 -0800 Subject: [PATCH 1/2] [BUILD] Better handling of OPENTELEMETRY_STL_VERSION under Bazel. (#2503) --- api/BUILD | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/api/BUILD b/api/BUILD index e650d5f7ce..fa4da45a66 100644 --- a/api/BUILD +++ b/api/BUILD @@ -1,7 +1,7 @@ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 -load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") +load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag") package(default_visibility = ["//visibility:public"]) @@ -10,12 +10,39 @@ bool_flag( build_setting_default = False, ) +CPP_STDLIBS = [ + "none", + "best", + "2014", + "2017", + "2020", + "2023", +] + +string_flag( + name = "with_cxx_stdlib", + build_setting_default = "best", + values = CPP_STDLIBS, +) + cc_library( name = "api", hdrs = glob(["include/**/*.h"]), defines = select({ ":with_external_abseil": ["HAVE_ABSEIL"], "//conditions:default": [], + }) + select({ + ":set_cxx_stdlib_none": [], + ### automatic selection + ":set_cxx_stdlib_best": ["OPENTELEMETRY_STL_VERSION=(__cplusplus/100)"], + # See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus + ":set_cxx_stdlib_best_and_msvc": ["OPENTELEMETRY_STL_VERSION=(_MSVC_LANG/100)"], + ### manual selection + ":set_cxx_stdlib_2014": ["OPENTELEMETRY_STL_VERSION=2014"], + ":set_cxx_stdlib_2017": ["OPENTELEMETRY_STL_VERSION=2017"], + ":set_cxx_stdlib_2020": ["OPENTELEMETRY_STL_VERSION=2020"], + ":set_cxx_stdlib_2023": ["OPENTELEMETRY_STL_VERSION=2023"], + "//conditions:default": [], }), strip_include_prefix = "include", tags = ["api"], @@ -33,3 +60,14 @@ config_setting( name = "with_external_abseil", flag_values = {":with_abseil": "true"}, ) + +[config_setting( + name = "set_cxx_stdlib_%s" % v, + flag_values = {":with_cxx_stdlib": v}, +) for v in CPP_STDLIBS] + +config_setting( + name = "set_cxx_stdlib_best_and_msvc", + constraint_values = ["@bazel_tools//tools/cpp:msvc"], + flag_values = {":with_cxx_stdlib": "best"}, +) From d32f9609b965dbb34030c1740ddb464d93cd3065 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 11:07:30 +0100 Subject: [PATCH 2/2] Bump codecov/codecov-action from 3 to 4 (#2519) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9772ccc2c3..2335155584 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -854,7 +854,7 @@ jobs: CXX: /usr/bin/g++-10 run: ./ci/do_ci.sh code.coverage - name: upload report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: /home/runner/build/coverage.info