Skip to content

Commit b982220

Browse files
authored
Fix Coverity builds (#5672)
As of three months ago, Git for Windows' [Coverity builds fail](https://github.com/git-for-windows/git/actions/workflows/coverity.yml?query=branch%3Amain). The reason is most likely the most recent release, 2025.3. Its [release notes](https://documentation.blackduck.com/bundle/coverity-docs/page/webhelp-files/relnotes_latest.html) do not shed any light into the issue (and does not mention that they bundle JDK20 and JDK22 in addition to JRE, because what's better than a single Java installation: three, right?). My investigation turned up `.dll` files that are located in Coverity's `bin/` directory which have the same name as `.dll` files in Git for Windows' SDK. As a consequence, the former override the latter and throw off MSYS2's logic to find the MSYS2 root directory given the location of certain `.dll` files. This PR fixes this issue, and while at it, enhances the Coverity workflow to print out the build log in case of failure.
2 parents 3dedf8c + 5ce9ac2 commit b982220

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/coverity.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,13 @@ jobs:
147147
key: cov-build-${{ env.COVERITY_LANGUAGE }}-${{ env.COVERITY_PLATFORM }}-${{ steps.lookup.outputs.hash }}
148148
- name: build with cov-build
149149
run: |
150-
export PATH="$RUNNER_TEMP/cov-analysis/bin:$PATH" &&
150+
export PATH="$PATH:$(cygpath -au "$RUNNER_TEMP")/cov-analysis/bin" &&
151151
cov-configure --gcc &&
152-
cov-build --dir cov-int make
152+
if ! cov-build --dir cov-int make
153+
then
154+
cat cov-int/build-log.txt
155+
exit 1
156+
fi
153157
- name: package the build
154158
run: tar -czvf cov-int.tgz cov-int
155159
- name: submit the build to Coverity Scan

0 commit comments

Comments
 (0)