-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-random-memory-leak
- Loading branch information
Showing
370 changed files
with
8,075 additions
and
4,274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.4.1 | ||
7.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
Checks: > | ||
-*, | ||
performance-*, | ||
portability-*, | ||
abseil-*, | ||
-abseil-string-find-str-contains, | ||
bugprone-*, | ||
-bugprone-easily-swappable-parameters, | ||
-bugprone-implicit-widening-of-multiplication-result, | ||
-bugprone-inc-dec-in-conditions, | ||
-bugprone-narrowing-conversions, | ||
-bugprone-unchecked-optional-access, | ||
-bugprone-unhandled-exception-at-new, | ||
-bugprone-unused-local-non-trivial-variable, | ||
google-*, | ||
-google-build-using-namespace, | ||
-google-default-arguments, | ||
-google-explicit-constructor, | ||
-google-readability-avoid-underscore-in-googletest-name, | ||
-google-readability-braces-around-statements, | ||
-google-readability-namespace-comments, | ||
-google-readability-todo, | ||
-google-runtime-references, | ||
misc-*, | ||
-misc-const-correctness, | ||
-misc-include-cleaner, | ||
-misc-non-private-member-variables-in-classes, | ||
-misc-unused-alias-decls, | ||
-misc-use-anonymous-namespace, | ||
cppcoreguidelines-*, | ||
-cppcoreguidelines-avoid-c-arrays, | ||
-cppcoreguidelines-avoid-magic-numbers, | ||
-cppcoreguidelines-init-variables, | ||
-cppcoreguidelines-macro-usage, | ||
-cppcoreguidelines-non-private-member-variables-in-classes, | ||
-cppcoreguidelines-pro-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: clang-tidy | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
clang-tidy: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Environment | ||
env: | ||
PROTOBUF_VERSION: '23.3' | ||
ABSEIL_CPP_VERSION: '20230125.3' | ||
CXX_STANDARD: '14' | ||
run: | | ||
sudo apt update -y | ||
sudo apt install -y --no-install-recommends --no-install-suggests \ | ||
build-essential \ | ||
iwyu \ | ||
cmake \ | ||
libssl-dev \ | ||
libcurl4-openssl-dev \ | ||
libprotobuf-dev \ | ||
protobuf-compiler \ | ||
libgmock-dev \ | ||
libgtest-dev \ | ||
libbenchmark-dev | ||
if ! command -v clang-tidy &> /dev/null; then | ||
echo "clang-tidy could not be found" | ||
exit 1 | ||
fi | ||
echo "Using clang-tidy version: $(clang-tidy --version)" | ||
echo "clang-tidy installed at: $(which clang-tidy)" | ||
- name: Prepare CMake | ||
env: | ||
CC: clang | ||
CXX: clang++ | ||
run: | | ||
mkdir -p build && cd build | ||
echo "Running cmake..." | ||
cmake .. \ | ||
-DCMAKE_CXX_STANDARD=14 \ | ||
-DWITH_STL=CXX14 \ | ||
-DWITH_OTLP_HTTP=ON \ | ||
-DWITH_OTLP_FILE=ON \ | ||
-DWITH_PROMETHEUS=ON \ | ||
-DWITH_ZIPKIN=ON \ | ||
-DWITH_ELASTICSEARCH=ON \ | ||
-DWITH_OTLP_HTTP_COMPRESSION=ON \ | ||
-DWITH_EXAMPLES=ON \ | ||
-DWITH_EXAMPLES_HTTP=ON \ | ||
-DBUILD_W3CTRACECONTEXT_TEST=ON \ | ||
-DWITH_METRICS_EXEMPLAR_PREVIEW=ON \ | ||
-DWITH_ASYNC_EXPORT_PREVIEW=ON \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
-DCMAKE_CXX_CLANG_TIDY="clang-tidy" | ||
- name: Run clang-tidy | ||
run: | | ||
cd build | ||
make -j$(nproc) 2>&1 | tee -a clang-tidy.log || exit 1 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: Logs (clang-tidy) | ||
path: ./build/clang-tidy.log | ||
|
||
- name: Count warnings | ||
run: | | ||
cd build | ||
COUNT=$(grep -c "warning:" clang-tidy.log) | ||
echo "clang-tidy reported ${COUNT} warning(s)" | ||
# TODO: include WITH_OTLP_GRPC and WITH_ABSEIL flags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
name: include-what-you-use | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
iwyu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: setup dependencies | ||
run: | | ||
sudo apt update -y | ||
sudo apt install -y --no-install-recommends --no-install-suggests \ | ||
build-essential \ | ||
iwyu \ | ||
cmake \ | ||
ninja-build \ | ||
libssl-dev \ | ||
libcurl4-openssl-dev \ | ||
libprotobuf-dev \ | ||
protobuf-compiler \ | ||
libgmock-dev \ | ||
libgtest-dev \ | ||
libbenchmark-dev | ||
- name: Prepare CMake | ||
run: | | ||
TOPDIR=`pwd` | ||
mkdir build && cd build | ||
CC="clang" CXX="clang++" cmake \ | ||
-DCMAKE_CXX_STANDARD=14 \ | ||
-DWITH_STL=CXX14 \ | ||
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-w;-Xiwyu;--mapping_file=${TOPDIR}/.iwyu.imp;" \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_W3CTRACECONTEXT_TEST=OFF \ | ||
-DWITH_OTLP_GRPC=OFF \ | ||
-DWITH_OTLP_HTTP=ON \ | ||
-DWITH_OTLP_FILE=ON \ | ||
-DWITH_OTLP_HTTP_COMPRESSION=ON \ | ||
-DWITH_ZIPKIN=ON \ | ||
-DWITH_PROMETHEUS=OFF \ | ||
.. | ||
- name: iwyu_tool | ||
run: | | ||
cd build | ||
make -k 2>&1 | tee -a iwyu.log | ||
- uses: actions/upload-artifact@v4 | ||
if: success() || failure() | ||
with: | ||
name: Logs (include-what-you-use) | ||
path: ./build/*.log | ||
|
||
- name: count warnings | ||
run: | | ||
cd build | ||
COUNT=`grep -c "Warning:" iwyu.log` | ||
echo "include-what-you-use reported ${COUNT} warning(s)" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
*.app | ||
|
||
# Bazel files | ||
MODULE.bazel.lock | ||
/bazel-* | ||
|
||
# Mac | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# include-what-you-use mapping file | ||
|
||
[ | ||
# Work around for C++ STL | ||
{ "include": ["<bits/chrono.h>", "private", "<chrono>", "public"] }, | ||
|
||
# Local opentelemetry-cpp | ||
|
||
] | ||
|
Oops, something went wrong.