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



commit 97fcd291f27ce92c3c8d0feed4d507051db4cd66
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   | 14 ++++++++++++++
 .gitlab-ci/.lock |  0
 2 files changed, 14 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 469c68405e..84f7d88fe6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -180,6 +180,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: .build-fedora-default
+  tags: [ privileged ]
+  stage: analysis
+  variables:
+    EXTRA_MESON_FLAGS: "--buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false 
-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
diff --git a/.gitlab-ci/.lock b/.gitlab-ci/.lock
new file mode 100644
index 0000000000..e69de29bb2


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