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



commit 9efa847a5c02cb53d5c9e4b89b7b674842f770df
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 +++++++++++++++
 .gitlab-ci/.lock |  0
 2 files changed, 15 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 469c68405e..65d03c7550 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: .build-fedora-default
+  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
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]