ci: Add an ASan build on x86.
authorEric Anholt <eric@anholt.net>
Mon, 30 Nov 2020 20:01:23 +0000 (12:01 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 15 Dec 2020 19:39:29 +0000 (19:39 +0000)
I want to enable ASan runs on freedreno.  It turns out it's a long road to
get there, starting with making sure we can run our unit tests with the
sanitizer enabled.

While I'm revving this container, add in valgrind too to make sure that
our build paths with valgrind enabled work.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936>

.gitlab-ci.yml
.gitlab-ci/container/x86_build-base.sh
.gitlab-ci/container/x86_build.sh

index fbff9d20497d6e7528267c7f48832ff454e343da..9f076af9475f767e3919c725d7c5599ccd7f783e 100644 (file)
@@ -259,7 +259,7 @@ x86_build-base:
     - .fdo.container-build@debian
     - .container
   variables:
-    MESA_IMAGE_TAG: &x86_build-base "2020-12-02"
+    MESA_IMAGE_TAG: &x86_build-base "2020-12-09-sanitizers"
 
 .use-x86_build-base:
   extends:
@@ -276,7 +276,7 @@ x86_build:
   extends:
     - .use-x86_build-base
   variables:
-    MESA_IMAGE_TAG: &x86_build "2020-12-09"
+    MESA_IMAGE_TAG: &x86_build "2020-12-11-sanitizers"
 
 .use-x86_build:
   variables:
@@ -290,7 +290,7 @@ i386_build:
   extends:
     - .use-x86_build-base
   variables:
-    MESA_IMAGE_TAG: &i386_build "2020-12-02"
+    MESA_IMAGE_TAG: &i386_build "2020-12-09-sanitizers"
 
 .use-i386_build:
   variables:
@@ -304,7 +304,7 @@ ppc64el_build:
   extends:
     - .use-x86_build-base
   variables:
-    MESA_IMAGE_TAG: &ppc64el_build "2020-12-02"
+    MESA_IMAGE_TAG: &ppc64el_build "2020-12-09-sanitizers"
 
 .use-ppc64el_build:
   variables:
@@ -318,7 +318,7 @@ s390x_build:
   extends:
     - .use-x86_build-base
   variables:
-    MESA_IMAGE_TAG: &s390x_build "2020-12-02"
+    MESA_IMAGE_TAG: &s390x_build "2020-12-09-sanitizers"
 
 .use-s390x_build:
   variables:
@@ -332,7 +332,7 @@ android_build:
   extends:
     - .use-x86_build-base
   variables:
-    MESA_IMAGE_TAG: &android_build "2020-12-02"
+    MESA_IMAGE_TAG: &android_build "2020-12-09-sanitizers"
 
 .use-android_build:
   variables:
@@ -345,7 +345,7 @@ android_build:
 x86_test-base:
   extends: x86_build-base
   variables:
-    MESA_IMAGE_TAG: &x86_test-base "2020-12-02"
+    MESA_IMAGE_TAG: &x86_test-base "2020-12-09-sanitizers"
 
 .use-x86_test-base:
   extends:
@@ -599,6 +599,14 @@ meson-testing:
     - .gitlab-ci/meson-build.sh
     - .gitlab-ci/prepare-artifacts.sh
 
+meson-testing-asan:
+  extends:
+    - meson-testing
+  variables:
+    EXTRA_OPTION: >
+      -D b_sanitize=address
+    UPLOAD_FOR_LAVA: ""
+
 meson-clover-testing:
   extends:
     - .meson-build
index 4faf7bd8b22fc7ad70bb3af8884a15d9472aa7ac..ceb06373169d1f3f57c97e86f5772dddb0b88437 100644 (file)
@@ -69,6 +69,7 @@ apt-get install -y --no-remove \
         python3-setuptools \
         qemu-user \
         scons \
+        valgrind \
         wine64-development \
         x11proto-dri2-dev \
         x11proto-gl-dev \
index d921e4bb33bae119fedb5ae3c5a5138b32ee8673..6444290c11d76bc61acd8a31d77eacec16995421 100644 (file)
@@ -26,6 +26,7 @@ apt-get update
 
 apt-get install -y --no-remove \
       $STABLE_EPHEMERAL \
+      libasan5 \
       libarchive-dev \
       libclang-cpp10-dev \
       liblua5.3-dev \