Skip to content

Commit

Permalink
build: update gcovr to v7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Jul 18, 2024
1 parent 589b67a commit c09e8fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Install gcovr
run: pip install gcovr==4.2
run: pip install gcovr==7.2
- name: Build
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
run: make build-ci -j4 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
Expand All @@ -70,7 +70,7 @@ jobs:
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Report C++
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)
run: gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r out/Release/obj.target --xml -o ./coverage/coverage-cxx.xml
# Clean temporary output from gcov and c8, so that it's not uploaded:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
Expand All @@ -79,3 +79,5 @@ jobs:
with:
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
8 changes: 5 additions & 3 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Install gcovr
run: pip install gcovr==4.2
run: pip install gcovr==7.2
- name: Build
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
run: make build-ci -j4 CONFIG_FLAGS="--error-on-warn --coverage"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
# The cause is most likely coverage's use of the inspector.
- name: Test
Expand All @@ -70,7 +70,7 @@ jobs:
env:
NODE_OPTIONS: --max-old-space-size=8192
- name: Report C++
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)
run: gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r out/Release/obj.target --xml -o ./coverage/coverage-cxx.xml
# Clean temporary output from gcov and c8, so that it's not uploaded:
- name: Clean tmp
run: rm -rf coverage/tmp && rm -rf out
Expand All @@ -79,3 +79,5 @@ jobs:
with:
directory: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ coverage: coverage-test ## Run the tests and generate a coverage report.
.PHONY: coverage-build
coverage-build: all
-$(MAKE) coverage-build-js
if [ ! -d gcovr ]; then $(PYTHON) -m pip install -t gcovr gcovr==4.2; fi
if [ ! -d gcovr ]; then $(PYTHON) -m pip install -t gcovr gcovr==7.2; fi
$(MAKE)

.PHONY: coverage-build-js
Expand All @@ -270,6 +270,7 @@ coverage-test: coverage-build
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
$(MAKE) coverage-report-js
-(cd out && PYTHONPATH=../gcovr $(PYTHON) -m gcovr \
--gcov-ignore-errors=no_working_dir_found \
--gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \
-r ../src/ --object-directory Release/obj.target \
--html --html-details -o ../coverage/cxxcoverage.html \
Expand Down

0 comments on commit c09e8fb

Please sign in to comment.