ci: Add a sanitizer scheduled job

This will run the build and tests with `-Db_sanitizer` defined, on the
normal job schedule, so that we periodically get address and undefined
behaviour testing.

This is complementary to the `valgrind` job.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall
2022-04-07 13:43:29 +01:00
parent 0c753c1df6
commit 3ad669a9a0
2 changed files with 36 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ cache:
- _ccache/
variables:
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v13"
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v14"
COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v3"
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v9"
ANDROID_IMAGE: "registry.gitlab.gnome.org/gnome/glib/android-ndk:v6"
@@ -554,6 +554,39 @@ valgrind:
- "_build/glib/glibconfig.h"
- "_build/meson-logs"
sanitizer:
extends:
- .build-linux
- .only-schedules
image: $FEDORA_IMAGE
stage: analysis
needs: []
script:
- meson ${MESON_COMMON_OPTIONS}
--werror
--default-library=both
--prefix=$HOME/glib-installed
--localstatedir=/var
--libdir=lib
-Db_sanitize=address,undefined
-Dsystemtap=true
-Ddtrace=true
-Dinstalled_tests=true
_build
- ninja -C _build
- .gitlab-ci/run-tests.sh
artifacts:
reports:
junit: "_build/${CI_JOB_NAME}-report.xml"
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
expire_in: 1 week
paths:
- "_build/config.h"
- "_build/glib/glibconfig.h"
- "_build/meson-logs"
- "_build/${CI_JOB_NAME}-report.xml"
pages:
stage: deploy
only:

View File

@@ -35,10 +35,12 @@ RUN dnf -y update \
gtk-doc \
itstool \
lcov \
libasan \
libattr-devel \
libffi-devel \
libmount-devel \
libselinux-devel \
libubsan \
libxslt \
ncurses-compat-libs \
ninja-build \