90
90
pygobject-ver : ' <3.52.0'
91
91
92
92
steps :
93
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
93
+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
94
94
with :
95
95
fetch-depth : 0
96
96
persist-credentials : false
@@ -198,31 +198,31 @@ jobs:
198
198
esac
199
199
200
200
- name : Cache pip
201
- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
201
+ uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
202
202
if : startsWith(runner.os, 'Linux')
203
203
with :
204
204
path : ~/.cache/pip
205
205
key : ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
206
206
restore-keys : |
207
207
${{ matrix.os }}-py${{ matrix.python-version }}-pip-
208
208
- name : Cache pip
209
- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
209
+ uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
210
210
if : startsWith(runner.os, 'macOS')
211
211
with :
212
212
path : ~/Library/Caches/pip
213
213
key : ${{ matrix.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('requirements/*/*.txt') }}
214
214
restore-keys : |
215
215
${{ matrix.os }}-py${{ matrix.python-version }}-pip-
216
216
- name : Cache ccache
217
- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
217
+ uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
218
218
with :
219
219
path : |
220
220
~/.ccache
221
221
key : ${{ matrix.os }}-py${{ matrix.python-version }}-ccache-${{ hashFiles('src/*') }}
222
222
restore-keys : |
223
223
${{ matrix.os }}-py${{ matrix.python-version }}-ccache-
224
224
- name : Cache Matplotlib
225
- uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
225
+ uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
226
226
with :
227
227
path : |
228
228
~/.cache/matplotlib
@@ -363,34 +363,29 @@ jobs:
363
363
- name : Cleanup non-failed image files
364
364
if : failure()
365
365
run : |
366
- function remove_files() {
367
- local extension=$1
368
- find ./result_images -name "*-expected*.$extension" | while read file; do
369
- if [[ $file == *"-expected_pdf"* ]]; then
370
- base=${file%-expected_pdf.$extension}_pdf
371
- elif [[ $file == *"-expected_eps"* ]]; then
372
- base=${file%-expected_eps.$extension}_eps
373
- elif [[ $file == *"-expected_svg"* ]]; then
374
- base=${file%-expected_svg.$extension}_svg
375
- elif [[ $file == *"-expected_gif"* ]]; then
376
- base=${file%-expected_gif.$extension}_gif
377
- else
378
- base=${file%-expected.$extension}
379
- fi
380
- if [[ ! -e "${base}-failed-diff.$extension" ]]; then
381
- if [[ -e "$file" ]]; then
382
- rm "$file"
383
- echo "Removed $file"
384
- fi
385
- if [[ -e "${base}.$extension" ]]; then
386
- rm "${base}.$extension"
387
- echo " Removed ${base}.$extension"
388
- fi
389
- fi
366
+ find ./result_images -name "*-expected*.png" | while read file; do
367
+ if [[ $file == *-expected_???.png ]]; then
368
+ extension=${file: -7:3}
369
+ base=${file%*-expected_$extension.png}_$extension
370
+ else
371
+ extension="png"
372
+ base=${file%-expected.png}
373
+ fi
374
+ if [[ ! -e ${base}-failed-diff.png ]]; then
375
+ indent=""
376
+ list=($file $base.png)
377
+ if [[ $extension != "png" ]]; then
378
+ list+=(${base%_$extension}-expected.$extension ${base%_$extension}.$extension)
379
+ fi
380
+ for to_remove in "${list[@]}"; do
381
+ if [[ -e $to_remove ]]; then
382
+ rm $to_remove
383
+ echo "${indent}Removed $to_remove"
384
+ fi
385
+ indent+=" "
390
386
done
391
- }
392
-
393
- remove_files "png"; remove_files "svg"; remove_files "pdf"; remove_files "eps"; remove_files "gif";
387
+ fi
388
+ done
394
389
395
390
if [ "$(find ./result_images -mindepth 1 -type d)" ]; then
396
391
find ./result_images/* -type d -empty -delete
@@ -402,13 +397,14 @@ jobs:
402
397
if [[ "${{ runner.os }}" != 'macOS' ]]; then
403
398
LCOV_IGNORE_ERRORS=',' # do not ignore any lcov errors by default
404
399
if [[ "${{ matrix.os }}" = ubuntu-24.04 ]]; then
405
- # filter mismatch and unused-entity errors detected by lcov 2.x
406
- LCOV_IGNORE_ERRORS='mismatch,unused '
400
+ # filter mismatch errors detected by lcov 2.x
401
+ LCOV_IGNORE_ERRORS='mismatch'
407
402
fi
408
403
lcov --rc lcov_branch_coverage=1 --ignore-errors $LCOV_IGNORE_ERRORS \
409
- --capture --directory . --output-file coverage.info
404
+ --capture --directory . --exclude $PWD/subprojects --exclude $PWD/build \
405
+ --output-file coverage.info
410
406
lcov --rc lcov_branch_coverage=1 --ignore-errors $LCOV_IGNORE_ERRORS \
411
- --output-file coverage.info --extract coverage.info $PWD/src/'*' $PWD/lib/'*'
407
+ --output-file coverage.info --extract coverage.info $PWD/src/'*'
412
408
lcov --rc lcov_branch_coverage=1 --ignore-errors $LCOV_IGNORE_ERRORS \
413
409
--list coverage.info
414
410
find . -name '*.gc*' -delete
0 commit comments