Merge branch 'wip/3v1n0/ci-really-use-fedora-39' into 'main'

Draft: ci: Ignore lcov errors on source missing, handle atomic writes and actually use Fedora 39 image

Closes #3381

See merge request GNOME/glib!4096
This commit is contained in:
Marco Trevisan 2024-07-15 21:23:53 +00:00
commit 167bb5a719
4 changed files with 11 additions and 10 deletions

View File

@ -11,7 +11,7 @@ cache:
- _ccache/
variables:
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v27"
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v39.1"
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7"
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v19"
ALPINE_IMAGE: "registry.gitlab.gnome.org/gnome/glib/alpine:v3"
@ -174,7 +174,7 @@ fedora-x86_64:
stage: build
needs: []
variables:
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs -fprofile-update=atomic"
before_script:
- !reference [".build-linux", "before_script"]
- !reference [".with-git", "before_script"]
@ -194,9 +194,9 @@ fedora-x86_64:
_build
- meson compile -C _build
- mkdir -p _coverage
- lcov --config-file .lcovrc --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
- lcov --config-file .lcovrc --directory _build --capture --initial --ignore-errors source --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
- .gitlab-ci/run-tests.sh
- lcov --config-file .lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
- lcov --config-file .lcovrc --directory _build --capture --ignore-errors source --output-file "_coverage/${CI_JOB_NAME}.lcov"
# Copy the built documentation to an artifact directory. The build for docs.gtk.org
# can then pull it from there — see https://gitlab.gnome.org/GNOME/gtk/-/blob/docs-gtk-org/README.md
- mkdir -p _reference/

View File

@ -7,14 +7,14 @@ python3 ./.gitlab-ci/fixup-cov-paths.py _coverage/*.lcov
for path in _coverage/*.lcov; do
# Remove coverage from generated code in the build directory
lcov --config-file .lcovrc -r "${path}" '*/_build/*' -o "$(pwd)/${path}"
lcov --config-file .lcovrc --ignore-errors unused -r "${path}" '*/_build/*' -o "$(pwd)/${path}"
# Remove any coverage from system files
lcov --config-file .lcovrc -e "${path}" "$(pwd)/*" -o "$(pwd)/${path}"
lcov --config-file .lcovrc --ignore-errors unused -e "${path}" "$(pwd)/*" -o "$(pwd)/${path}"
# Remove coverage from the fuzz tests, since they are run on a separate CI system
lcov --config-file .lcovrc -r "${path}" "*/fuzzing/*" -o "$(pwd)/${path}"
lcov --config-file .lcovrc --ignore-errors unused -r "${path}" "*/fuzzing/*" -o "$(pwd)/${path}"
# Remove coverage from copylibs and subprojects
for lib in xdgmime libcharset gnulib; do
lcov --config-file .lcovrc -r "${path}" "*/${lib}/*" -o "$(pwd)/${path}"
lcov --config-file .lcovrc --ignore-errors unused -r "${path}" "*/${lib}/*" -o "$(pwd)/${path}"
done
# Convert to cobertura format for gitlab integration

View File

@ -161,6 +161,7 @@ test_closefrom (void)
}
}
g_free (fds);
_exit (0);
}

View File

@ -821,7 +821,7 @@
{
g_set_user_dirs_str
Memcheck:Leak
match-leak-kinds:definite,reachable
match-leak-kinds:definite,reachable,possible
fun:malloc
...
fun:set_str_if_different
@ -833,7 +833,7 @@
{
g_set_user_dirs_strv
Memcheck:Leak
match-leak-kinds:definite,reachable
match-leak-kinds:definite,reachable,possible
fun:malloc
...
fun:set_strv_if_different