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



commit caec5950b8b00c18eb1b034702ccee612f6e711c
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 b090f36236..7af6f25e91 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
@@ -90,6 +91,20 @@ release-build:
     - ninja -C _build
     - .gitlab-ci/run-tests.sh _build x11
 
+# Run tests with the address sanitizer. We need to turn off introspection,
+# since it is incompatible with asan
+asan-build:
+  extends: .build-fedora-default
+  tags: [ privileged ]
+  stage: build
+  variables:
+    EXTRA_MESON_FLAGS: "--buildtype=debugoptimized -Db_sanitize=address -Dintrospection=false"
+  script:
+    - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
+            _build
+    - ninja -C _build
+    - .gitlab-ci/run-tests.sh _build wayland
+
 .mingw-defaults:
   stage: build
   tags:


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