From 739b6e6f76b9a51e8859d8ee63cd8896a022bcde Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 9 Nov 2020 14:57:47 +0000 Subject: ci: Add analysis stage to the pipeline Run a static analysis and an ASan jobs on the gdk-pixbuf code base. --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 847d2d512..feb322082 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,6 @@ stages: - build + - analysis - docs - deploy @@ -75,6 +76,37 @@ reference: paths: - _reference +static-scan: + image: $FEDORA_IMAGE + stage: analysis + needs: [] + variables: + BUILD_OPTS: "--buildtype=debug" + script: + - meson ${COMMON_MESON_FLAGS} ${LOADERS_FLAGS} ${BUILD_OPTS} _scan_build + - ninja -C _scan_build scan-build + artifacts: + paths: + - _scan_build/meson-logs + allow_failure: true + +# Run tests with the address sanitizer. We need to turn off introspection, +# since it is incompatible with asan +asan-build: + image: $FEDORA_IMAGE + tags: [ asan ] + stage: analysis + needs: [] + variables: + script: + - CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled _build + - ninja -C _build + - .gitlab/scripts/run-tests.sh _build + artifacts: + paths: + - _build/meson-logs + allow_failure: true + release-dist: stage: build image: ${FEDORA_IMAGE} -- cgit v1.2.1