aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/container/x86_build.sh
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2020-01-30 18:21:15 +0100
committerMarge Bot <[email protected]>2020-02-05 10:52:31 +0000
commit65610ec774ae095cfee3602b3f06d51d0a199791 (patch)
tree99f3c837a7c5aec558cbb95bec1d96e1e0a60089 /.gitlab-ci/container/x86_build.sh
parenta443f81f2631efa0881f72472c476d9d368b5d05 (diff)
gitlab-ci: Add ppc64el and s390x cross-build jobs
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3643>
Diffstat (limited to '.gitlab-ci/container/x86_build.sh')
-rw-r--r--.gitlab-ci/container/x86_build.sh34
1 files changed, 29 insertions, 5 deletions
diff --git a/.gitlab-ci/container/x86_build.sh b/.gitlab-ci/container/x86_build.sh
index a66b1dd4a09..141c198eac8 100644
--- a/.gitlab-ci/container/x86_build.sh
+++ b/.gitlab-ci/container/x86_build.sh
@@ -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