Skip to content

Commit 61b90e7

Browse files
bcoemarco-ippolito
authored andcommitted
build: update gcovr to 7.2 and codecov config
PR-URL: #54019 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 77761af commit 61b90e7

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

.github/workflows/coverage-linux-without-intl.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Environment Information
6161
run: npx envinfo
6262
- name: Install gcovr
63-
run: pip install gcovr==4.2
63+
run: pip install gcovr==7.2
6464
- name: Build
6565
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
6666
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
@@ -72,7 +72,7 @@ jobs:
7272
env:
7373
NODE_OPTIONS: --max-old-space-size=8192
7474
- name: Report C++
75-
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
75+
run: gcovr --object-directory=out -v --filter src --xml -o ./coverage/coverage-cxx.xml --root=./ --gcov-executable="llvm-cov-18 gcov"
7676
# Clean temporary output from gcov and c8, so that it's not uploaded:
7777
- name: Clean tmp
7878
run: rm -rf coverage/tmp && rm -rf out

.github/workflows/coverage-linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Environment Information
6161
run: npx envinfo
6262
- name: Install gcovr
63-
run: pip install gcovr==4.2
63+
run: pip install gcovr==7.2
6464
- name: Build
6565
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
6666
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
@@ -72,7 +72,7 @@ jobs:
7272
env:
7373
NODE_OPTIONS: --max-old-space-size=8192
7474
- name: Report C++
75-
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
75+
run: gcovr --object-directory=out -v --filter src --xml -o ./coverage/coverage-cxx.xml --root=./ --gcov-executable="llvm-cov-18 gcov"
7676
# Clean temporary output from gcov and c8, so that it's not uploaded:
7777
- name: Clean tmp
7878
run: rm -rf coverage/tmp && rm -rf out

Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ coverage: coverage-test ## Run the tests and generate a coverage report.
253253
.PHONY: coverage-build
254254
coverage-build: all
255255
-$(MAKE) coverage-build-js
256-
if [ ! -d gcovr ]; then $(PYTHON) -m pip install -t gcovr gcovr==4.2; fi
256+
if [ ! -d gcovr ]; then $(PYTHON) -m pip install -t gcovr gcovr==7.2; fi
257257
$(MAKE)
258258

259259
.PHONY: coverage-build-js
@@ -269,9 +269,10 @@ coverage-test: coverage-build
269269
-NODE_V8_COVERAGE=coverage/tmp \
270270
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
271271
$(MAKE) coverage-report-js
272-
-(cd out && PYTHONPATH=../gcovr $(PYTHON) -m gcovr \
273-
--gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \
274-
-r ../src/ --object-directory Release/obj.target \
272+
-(PYTHONPATH=./gcovr $(PYTHON) -m gcovr \
273+
--object-directory=out \
274+
--filter src -v \
275+
--root ./ \
275276
--html --html-details -o ../coverage/cxxcoverage.html \
276277
--gcov-executable="$(GCOV)")
277278
@printf "Javascript coverage %%: "

codecov.yml

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
# TODO(bcoe): re-enable coverage report comments, once we can figure out
2-
# how to make them more accurate for the Node.js project,
3-
# See: https://github.com/nodejs/node/issues/35759
4-
comment: false
5-
# # Only show diff and files changed:
6-
# layout: "diff, files"
7-
# # Don't post if no changes in coverage:
8-
# require_changes: true
1+
comment:
2+
# Only show diff and files changed:
3+
layout: diff, files
4+
# Don't post if no changes in coverage:
5+
require_changes: true
96

107
codecov:
11-
branch: main
128
notify:
139
# Wait for all coverage builds:
1410
# - coverage-linux.yml
15-
# - coverage-windows.yml
11+
# - coverage-windows.yml [manually disabled see #50489]
1612
# - coverage-linux-without-intl.yml
17-
after_n_builds: 3
13+
after_n_builds: 2
1814

1915
coverage:
2016
# Useful for blocking Pull Requests that don't meet a particular coverage threshold.

0 commit comments

Comments
 (0)