[gtk/asan-ci: 9/9] ci: Add a build with asan



commit e3e8b514e018783b745b55d72420bffa55fb9c27
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jul 8 22:22:31 2020 -0400

    ci: Add a build with asan
    
    Run our testsuite under asan. We do this in a
    separate build, since we need to turn off
    introspection to make the build succeed.
    
    As Michael Catanzaro pointed out, this requires a
    privileged runner in order to use kernel apis.

 .gitlab-ci.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 469c68405e..4597f0afe4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -72,6 +72,7 @@ fedora-x86_64:
     EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
   script:
     - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
+            -Db_sanitize=address
             -Dprofiler=true
             _build
     - ninja -C _build
@@ -180,6 +181,20 @@ static-scan:
       - _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:
+  extends: $FEDORA_IMAGE
+  tags: [ privileged ]
+  stage: analysis
+  variables:
+    EXTRA_MESON_FLAGS: "--buildtype=debugoptimized -Db_sanitize=address -Dintrospection=false"
+  script:
+    - CC=clang meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
+            _build
+    - ninja -C _build
+    - .gitlab-ci/run-tests.sh _build wayland
+
 reference:
   image: $DOCS_IMAGE
   stage: docs


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]