Skip to content

Commit fce923b

Browse files
bcoerichardlau
authored andcommitted
build: update gcovr to 7.2 and codecov config
PR-URL: #54019 Backport-PR-URL: #57565 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 69d661d commit fce923b

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Environment Information
4848
run: npx envinfo
4949
- name: Install gcovr
50-
run: pip install gcovr==4.2
50+
run: pip install gcovr==7.2
5151
- name: Build
5252
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
5353
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
@@ -59,7 +59,7 @@ jobs:
5959
env:
6060
NODE_OPTIONS: --max-old-space-size=8192
6161
- name: Report C++
62-
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)
62+
run: gcovr --object-directory=out -v --filter src --xml -o ./coverage/coverage-cxx.xml --root=./ --gcov-executable="llvm-cov-18 gcov"
6363
# Clean temporary output from gcov and c8, so that it's not uploaded:
6464
- name: Clean tmp
6565
run: rm -rf coverage/tmp && rm -rf out

.github/workflows/coverage-linux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Environment Information
4848
run: npx envinfo
4949
- name: Install gcovr
50-
run: pip install gcovr==4.2
50+
run: pip install gcovr==7.2
5151
- name: Build
5252
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
5353
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
@@ -59,7 +59,7 @@ jobs:
5959
env:
6060
NODE_OPTIONS: --max-old-space-size=8192
6161
- name: Report C++
62-
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)
62+
run: gcovr --object-directory=out -v --filter src --xml -o ./coverage/coverage-cxx.xml --root=./ --gcov-executable="llvm-cov-18 gcov"
6363
# Clean temporary output from gcov and c8, so that it's not uploaded:
6464
- name: Clean tmp
6565
run: rm -rf coverage/tmp && rm -rf out

Makefile

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

256256
.PHONY: coverage-build-js
@@ -266,9 +266,10 @@ coverage-test: coverage-build
266266
-NODE_V8_COVERAGE=coverage/tmp \
267267
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
268268
$(MAKE) coverage-report-js
269-
-(cd out && PYTHONPATH=../gcovr $(PYTHON) -m gcovr \
270-
--gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \
271-
-r ../src/ --object-directory Release/obj.target \
269+
-(PYTHONPATH=./gcovr $(PYTHON) -m gcovr \
270+
--object-directory=out \
271+
--filter src -v \
272+
--root ./ \
272273
--html --html-details -o ../coverage/cxxcoverage.html \
273274
--gcov-executable="$(GCOV)")
274275
@printf "Javascript coverage %%: "

codecov.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
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:
10+
# - coverage-linux.yml
11+
# - coverage-windows.yml [manually disabled see #50489]
12+
# - coverage-linux-without-intl.yml
1413
after_n_builds: 2
1514

1615
coverage:

0 commit comments

Comments
 (0)