Skip to content

Commit bb896f2

Browse files
committed
Shorten the Coverity workflow comments to one line each
The reasoning lives in this PR's description.
1 parent 5733c44 commit bb896f2

1 file changed

Lines changed: 5 additions & 29 deletions

File tree

‎.github/workflows/coverity.yml‎

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,8 @@ jobs:
8181
- name: Configure Coverity for the DPC++ compiler
8282
run: |
8383
source "${ONEAPI_ROOT}/setvars.sh"
84-
# Cython-generated sources and the pybind11 extensions go through
85-
# icpx, the sysroot/driver probing bits still use gcc
8684
cov-configure --gcc
87-
# Register icx/icpx with Coverity's native Intel oneAPI compiler type.
88-
# The generic clangcc/clangcxx templates parse <sycl/sycl.hpp> without
89-
# SYCL mode and fail on device-only builtins (__ocl_sampler_t,
90-
# __ocl_image2d_ro_t, ...), which left 21 of 30 sources uncaptured.
91-
# The native type emits each SYCL source twice, as a host pass and a
92-
# spir64 device pass; see the capture check below for the latter.
93-
# intel_oneapi_icx is current; intel_icx:linux is the older spelling
94-
# the Scan build tool still ships (what mkl_umath's scan resolves to).
85+
# Generic clang templates can't parse SYCL headers, see https://github.com/IntelPython/dpctl/pull/2401
9586
comptypes="$(cov-configure --list-compiler-types | cut -d, -f1)"
9687
comptype=""
9788
for candidate in intel_oneapi_icx intel_oneapi_icx:linux intel_icx:linux; do
@@ -105,9 +96,6 @@ jobs:
10596
exit 1
10697
fi
10798
echo "Using Coverity compiler type: ${comptype}"
108-
# With --template, --compiler takes a bare executable name; capture
109-
# matches on the name of the spawned executable, so this also covers
110-
# the absolute icx/icpx paths CMake resolves.
11199
cov-configure --template --comptype "${comptype}" --compiler icx
112100
cov-configure --template --comptype "${comptype}" --compiler icpx
113101
@@ -116,8 +104,7 @@ jobs:
116104
run: |
117105
set -o pipefail
118106
source "${ONEAPI_ROOT}/setvars.sh"
119-
# --skip-editable: the in-place build_ext already compiled everything
120-
# Coverity needs to see, a pip install would only repeat it
107+
# --skip-editable: build_ext --inplace already compiled everything
121108
cov-build --dir cov-int \
122109
python scripts/build_locally.py --oneapi --skip-editable --verbose \
123110
2>&1 | tee cov-build.log
@@ -127,20 +114,10 @@ jobs:
127114
grep -E "Emitted .*compilation unit|are ready for analysis" cov-build.log || true
128115
echo '```'
129116
} >> "$GITHUB_STEP_SUMMARY"
130-
# A partial capture still uploads happily and uses up a scan, so
131-
# require every project source to be emitted. This is checked per
132-
# source rather than via the "Emitted N (P%)" total because that
133-
# total also counts the spir64 device passes, which the Scan build
134-
# tool's emitter cannot parse (it trips over and then crashes in the
135-
# SPIR-V builtin headers), capping P at 66% here. The host pass of
136-
# each source is what gets analyzed. CMake's own try-compile probes
137-
# under CMakeFiles/ are not project code and often fail.
138-
# `|| true` because a no-match grep would otherwise trip pipefail and
139-
# end the step before the errors below are printed.
117+
# Gate on per-source emits, not the P% total, see https://github.com/IntelPython/dpctl/pull/2401
140118
log=cov-int/build-log.txt
141119
compiled="$(grep -oP '\[STATUS\] Compiling \K\S+' "${log}" | grep -F "${GITHUB_WORKSPACE}/" | grep -vF /CMakeFiles/ | sort -u || true)"
142-
# Unanchored: parallel compiles can splice another unit's output onto
143-
# the same line of the log.
120+
# Unanchored: parallel compiles can splice output onto the same log line
144121
emitted="$(grep -oP "Emit for file '\K[^']+(?=' \(TU [0-9]+\) complete\.)" "${log}" | sort -u || true)"
145122
missing="$(comm -23 <(echo "${compiled}") <(echo "${emitted}"))"
146123
total="$(grep -c . <<< "${compiled}" || true)"
@@ -168,8 +145,7 @@ jobs:
168145
if-no-files-found: warn
169146

170147
- name: Submit results to Coverity Scan
171-
# Scan keeps only the latest build, so a run dispatched on a feature
172-
# branch would replace master's results; such runs stop after capture.
148+
# A branch submit would replace master's results on the Scan dashboard
173149
if: github.ref == 'refs/heads/master'
174150
timeout-minutes: 15
175151
env:

0 commit comments

Comments
 (0)