Skip to content
Closed
Prev Previous commit
Next Next commit
build: ensure gcovr tool exists
  • Loading branch information
bcoe
bcoe committed Oct 18, 2020
commit 9eac50be90c16e4a41df44bde9cc8494b682625f
6 changes: 6 additions & 0 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Clone gcovr
run: git clone -b 3.4 --depth=1 --single-branch https://github.com/gcovr/gcovr.git
- name: Clone patch for gcovr

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhdawson do you remember why we're running gcovr from a branch and floating a patch? It would be nice to simplify this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It been long enough that I don't remember the specifics. I assume it failed to run properly with out that patch. It's possible a later version of gcovr may have fixed it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhdawson I've managed to get gcovr@4.2 working, installed directly from pip.

The trick was to continue running from the out/ folder, but to specify a --root pointing to the root project directory.

run: git clone --depth=1 --single-branch https://github.com/nodejs/build.git
- name: Patch gcovr
run: cd gcovr && patch -N -p1 < ../build/jenkins/scripts/coverage/gcovr-patches-3.4.diff
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
Expand Down