gitlab-ci: Add ppc64el and s390x cross-build jobs
authorMichel Dänzer <mdaenzer@redhat.com>
Thu, 30 Jan 2020 17:21:15 +0000 (18:21 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 5 Feb 2020 10:52:31 +0000 (10:52 +0000)
Using LLVM 8 for ppc64el and 7 for s390x (which hits some coroutine
related issues with LLVM 8).

There are some test failures we need to ignore for now. Also, the
timeout needs to be bumped from the default 30s for some tests, because
they can take longer under emulation.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3643>

.gitlab-ci.yml
.gitlab-ci/container/x86_build.sh
.gitlab-ci/cross-xfail-ppc64el [new file with mode: 0644]
.gitlab-ci/cross-xfail-s390x [new file with mode: 0644]
src/compiler/glsl/glcpp/meson.build
src/compiler/glsl/tests/meson.build
src/compiler/nir/meson.build
src/gallium/drivers/llvmpipe/meson.build
src/util/meson.build
src/util/tests/fast_idiv_by_const/meson.build
src/util/tests/sparse_array/meson.build

index c7cf8eefe38febc69b9df7d8b0473262f2c0fb31..a194d6c0838a833ed80300b99162b7f4428b3892 100644 (file)
@@ -112,7 +112,7 @@ x86_build:
     - .debian@container-ifnot-exists
     - .container
   variables:
-    DEBIAN_TAG: &x86_build "2020-01-14"
+    DEBIAN_TAG: &x86_build "2020-02-05"
 
 .use-x86_build:
   variables:
@@ -312,6 +312,7 @@ meson-main:
       -D gallium-va=false
       -D gallium-xa=false
       -D gallium-nine=false
+    LLVM_VERSION: "8"
 
 .meson-arm:
   extends:
@@ -342,7 +343,6 @@ meson-arm64:
     - .meson-arm
     - .ci-deqp-artifacts
   variables:
-    LLVM_VERSION: "8"
     VULKAN_DRIVERS: "freedreno,amd"
   script:
     - .gitlab-ci/meson-build.sh
@@ -467,6 +467,25 @@ meson-i386:
       -D osmesa=classic
       -D werror=true
 
+meson-s390x:
+  extends:
+    - .meson-cross
+  variables:
+    CROSS: s390x
+    GALLIUM_DRIVERS: "swrast"
+    LLVM_VERSION: "7"
+  script:
+    - dpkg -i /var/cache/apt/archives/$CROSS/*.deb
+    - .gitlab-ci/meson-build.sh
+
+meson-ppc64el:
+  extends:
+    - meson-s390x
+  variables:
+    CROSS: ppc64el
+    GALLIUM_DRIVERS: "nouveau,swrast,virgl"
+    LLVM_VERSION: "8"
+
 meson-mingw32-x86_64:
   extends: .meson-build
   variables:
index a66b1dd4a09ba0f87479a169c5b2a0e45d4b9831..141c198eac8cf53d8431e4cc177f59eb2c84fc1d 100644 (file)
@@ -5,7 +5,7 @@ set -o xtrace
 
 export DEBIAN_FRONTEND=noninteractive
 
-CROSS_ARCHITECTURES="i386"
+CROSS_ARCHITECTURES="i386 ppc64el s390x"
 for arch in $CROSS_ARCHITECTURES; do
     dpkg --add-architecture $arch
 done
@@ -75,13 +75,12 @@ apt-get install -y --no-remove \
       libxvmc-dev \
       libxxf86vm-dev \
       llvm-6.0-dev \
-      llvm-7-dev \
-      llvm-8-dev \
       llvm-9-dev \
       meson \
       pkg-config \
       python-mako \
       python3-mako \
+      qemu-user \
       scons \
       x11proto-dri2-dev \
       x11proto-gl-dev \
@@ -96,8 +95,32 @@ for arch in $CROSS_ARCHITECTURES; do
             libdrm-dev:${arch} \
             libelf-dev:${arch} \
             libexpat1-dev:${arch}
+
+    if [ "$arch" = "s390x" ]; then
+        LLVM_VERSION=7
+    else
+        LLVM_VERSION=8
+    fi
+
+    if [ "$arch" != "i386" ]; then
+        mkdir /var/cache/apt/archives/${arch}
+        apt-get install -y --no-remove \
+                libffi-dev:${arch} \
+                libllvm${LLVM_VERSION}:${arch} \
+                libstdc++6:${arch} \
+                libtinfo-dev:${arch} \
+
+        # Download llvm-* packages, but don't install them yet, since they can
+        # only be installed for one architecture at a time
+        apt-get install -o Dir::Cache::archives=/var/cache/apt/archives/$arch --download-only -y --no-remove \
+            llvm-${LLVM_VERSION}-dev:${arch}
+    fi
 done
 
+apt-get install -y --no-remove \
+      llvm-7-dev \
+      llvm-8-dev \
+
 # for 64bit windows cross-builds
 apt-get install -y --no-remove \
     libz-mingw-w64-dev \
@@ -193,9 +216,10 @@ for arch in $CROSS_ARCHITECTURES; do
   if [ "$arch" = "i386" ]; then
     # Work around a bug in debcrossgen that should be fixed in the next release
     sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" "$cross_file"
-    # Don't need wrapper for i386 executables
-    sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
   fi
+
+  # Rely on qemu-user being configured in binfmt_misc on the host
+  sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file"
 done
 
 
diff --git a/.gitlab-ci/cross-xfail-ppc64el b/.gitlab-ci/cross-xfail-ppc64el
new file mode 100644 (file)
index 0000000..aa120d0
--- /dev/null
@@ -0,0 +1,4 @@
+lp_test_arit
+roundeven
+u_format_test
+u_half_test
\ No newline at end of file
diff --git a/.gitlab-ci/cross-xfail-s390x b/.gitlab-ci/cross-xfail-s390x
new file mode 100644 (file)
index 0000000..d8f0365
--- /dev/null
@@ -0,0 +1,5 @@
+load_store_vectorizer
+lp_test_arit
+lp_test_format
+lp_test_printf
+u_format_test
index 9fc8d9d02869e5439c2a797a7fd8cc5d9894b286..5f3d85735af623473688908fc4b41c99f5218190 100644 (file)
@@ -83,6 +83,7 @@ if with_any_opengl and with_tests and host_machine.system() != 'windows'
         '--@0@'.format(m),
       ],
       suite : ['compiler', 'glcpp'],
+      timeout: 60,
     )
   endforeach
 endif
index e9272fe5fbea74873a494d59c4cbdd4e308bbd3f..5914627e194db3bde83b7bb2c70bd128c9cabecb 100644 (file)
@@ -88,6 +88,7 @@ test(
     ),
   ],
   suite : ['compiler', 'glsl'],
+  timeout: 60,
 )
 
 test(
index b35eb855282d661a60df39bb3ce2152a8fa65abf..315112759e920891836ebf99035f655cf5a88e83 100644 (file)
@@ -349,6 +349,7 @@ if with_tests
       dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
     ),
     suite : ['compiler', 'nir'],
+    should_fail : meson.get_cross_property('xfail', '').contains('load_store_vectorizer'),
   )
 
   test(
index d3542fa156d7e0ea01cbb0f134d8e4e3437ff16a..570d1b221d8d3f20dec589032da2df3978ca6fc9 100644 (file)
@@ -125,6 +125,8 @@ if with_tests and with_gallium_softpipe and with_llvm
         link_with : [libllvmpipe, libgallium],
       ),
       suite : ['llvmpipe'],
+      should_fail : meson.get_cross_property('xfail', '').contains(t),
+      timeout: 120,
     )
   endforeach
 endif
index 7791be73cde6b59cb9503968bcd532053fb6b893..3b2ac083a145960c8fc8979f97912f7522e85842 100644 (file)
@@ -248,6 +248,7 @@ if with_tests
       dependencies : [dep_m],
     ),
     suite : ['util'],
+    should_fail : meson.get_cross_property('xfail', '').contains('roundeven'),
   )
 
   # FIXME: this test crashes on windows
index 2a341d181783035ea5d513cdb3acaa4841103a4d..00b24678b753799cc2484e640d5d7a9a2edc8127 100644 (file)
@@ -27,4 +27,5 @@ test(
     include_directories : inc_common,
   ),
   suite : ['util'],
+  timeout: 60,
 )
index 036591e3baed272ec838dfd321891a8c3bd5b66e..7c86efea29dddf81401788e5d1387dc0ccb2bb03 100644 (file)
@@ -27,4 +27,5 @@ test(
     include_directories : inc_common,
   ),
   suite : ['util'],
+  timeout: 60,
 )