Skip to content

Commit 94dd5a5

Browse files
committed
Skip coverage reports for Ubuntu 22.04 w/ clang
Since Ubuntu 22.04's llvm-lcov version does not support the `--sources` option.
1 parent 695b9d9 commit 94dd5a5

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/build.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ jobs:
110110
run: |
111111
[[ '${{ matrix.qt }}' =~ ^[56]$ ]] ||
112112
qtInstallDocs="$RUNNER_WORKSPACE/Qt/Docs/Qt-${QT_VERSION:-${{ matrix.qt }}}"
113-
# With coverage instrumentation.
113+
# With coverage instrumentation (except Ubuntu 22.04's llvm-lcov version does not support the --sources option)
114+
[[ '${{ matrix.os }}' == '22.04' && '${{ matrix.cc }}' == 'clang' ]] ||
114115
cmake -D CMAKE_BUILD_TYPE=Release \
115116
-D ENABLE_COVERAGE=true \
116117
${qtInstallDocs:+-D "QT_INSTALL_DOCS=$qtInstallDocs"} \
@@ -121,9 +122,11 @@ jobs:
121122
${qtInstallDocs:+-D "QT_INSTALL_DOCS=$qtInstallDocs"} \
122123
-S "$GITHUB_WORKSPACE" -B "$RUNNER_TEMP/release"
123124
tee -a "$GITHUB_OUTPUT" <<< "dokitVersion=$(cat "$RUNNER_TEMP/release/version.txt")"
124-
cmake --build "$RUNNER_TEMP/coverage"
125+
[[ '${{ matrix.os }}' == '22.04' && '${{ matrix.cc }}' == 'clang' ]] ||
126+
cmake --build "$RUNNER_TEMP/coverage"
125127
cmake --build "$RUNNER_TEMP/release"
126-
"$RUNNER_TEMP/coverage/src/cli/dokit" --version
128+
[[ '${{ matrix.os }}' == '22.04' && '${{ matrix.cc }}' == 'clang' ]] ||
129+
"$RUNNER_TEMP/coverage/src/cli/dokit" --version
127130
"$RUNNER_TEMP/release/src/cli/dokit" --version
128131
- name: Test
129132
run: |
@@ -163,14 +166,18 @@ jobs:
163166
${{ runner.temp }}/release/test/**/*.tap
164167
if-no-files-found: error
165168
- name: Report parallel coverage to Codacy
166-
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
169+
if: >-
170+
( matrix.os != '22.04' || matrix.cc == 'gcc' )
171+
&& github.event_name == 'push' && github.actor != 'dependabot[bot]'
167172
env:
168173
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
169174
run: >
170175
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial \
171176
-l CPP -r "${{ runner.temp }}/coverage/coverage.info"
172177
- name: Report parallel coverage to Coveralls
173-
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
178+
if: >-
179+
( matrix.os != '22.04' || matrix.cc == 'gcc' )
180+
&& github.event_name == 'push' && github.actor != 'dependabot[bot]'
174181
uses: coverallsapp/github-action@v2
175182
with:
176183
# Note, the coverage-reporter-platform option is currently undocumented. See

0 commit comments

Comments
 (0)