Skip to content

Commit bb5358e

Browse files
authored
chore: publish coverage to codecov (#126)
1 parent 0d89feb commit bb5358e

File tree

7 files changed

+14
-98
lines changed

7 files changed

+14
-98
lines changed

.circleci/config.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
version: 2.1
22

3+
orbs:
4+
codecov: codecov/[email protected]
5+
36
executors:
47
docker-amd64:
58
docker:
@@ -115,10 +118,9 @@ jobs:
115118
steps:
116119
- checkout
117120
- run: bin/test --coverage --verbose
118-
- add_ssh_keys:
119-
fingerprints:
120-
- "d3:8f:a8:6e:b6:ef:37:65:1a:dc:2b:88:3b:ff:50:f4"
121-
- run: bin/publish-coverage
121+
- codecov/upload:
122+
file: .coverage/filtered.info
123+
upload_args: --disable-search
122124

123125
# Copy-pasta from dd-trace-java. Thank you <3
124126
system-tests:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ run apt-get update && apt-get install --yes software-properties-common && \
2020
apt-get update && apt-get upgrade --yes && \
2121
apt-get install --yes \
2222
wget build-essential clang sed gdb clang-format git ssh shellcheck \
23-
libc++-dev libc++abi-dev python3 pip
23+
libc++-dev libc++abi-dev python3 pip coreutils curl gnupg
2424

2525
# bazelisk, a launcher for bazel. `bazelisk --help` will cause the latest
2626
# version to be downloaded.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Datadog C++ Tracing Library
22
===========================
3+
[![codecov](https://codecov.io/gh/DataDog/dd-trace-cpp/graph/badge.svg?token=78VYILWPMC)](https://codecov.io/gh/DataDog/dd-trace-cpp)
4+
35
```c++
46
#include <datadog/span_config.h>
57
#include <datadog/tracer.h>

bin/publish-coverage

Lines changed: 0 additions & 89 deletions
This file was deleted.

bin/test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@ if [ "$coverage_flags" != '' ]; then
6161
lcov --quiet --capture --directory .build --output-file .coverage/raw.info --rc geninfo_json_module=JSON::XS
6262
# Filter out system headers and test drivers.
6363
lcov --quiet --remove .coverage/raw.info -o .coverage/filtered.info '/usr/*' "$(pwd)/test/*" '*json.hpp'
64-
# Generate an HTML coverage report at ".coverage/report/index.html".
65-
genhtml --quiet --dark-mode .coverage/filtered.info --output-directory .coverage/report
6664

6765
echo 'Done.'
6866
fi
6967

7068
if [ "$show_coverage" -eq 1 ]; then
69+
# Generate an HTML coverage report at ".coverage/report/index.html".
70+
genhtml --quiet --dark-mode .coverage/filtered.info --output-directory .coverage/report
71+
7172
index='.coverage/report/index.html'
7273
case "$(uname -s)" in
7374
Darwin) open "$index" ;;

cmake/compiler/clang.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if (DD_TRACE_ENABLE_COVERAGE)
6969

7070
target_link_libraries(dd_trace_cpp-specs
7171
INTERFACE
72-
gcov
72+
-fprofile-arcs
7373
)
7474
endif()
7575

cmake/compiler/gcc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if (DD_TRACE_ENABLE_COVERAGE)
6161

6262
target_link_libraries(dd_trace_cpp-specs
6363
INTERFACE
64-
gcov
64+
-fprofile-arcs
6565
)
6666
endif()
6767

0 commit comments

Comments
 (0)