summaryrefslogtreecommitdiff
path: root/.gitlab-ci
diff options
context:
space:
mode:
authorEric Engestrom <eric.engestrom@intel.com>2019-10-20 23:06:56 +0100
committerEric Engestrom <eric.engestrom@intel.com>2019-11-15 03:05:53 +0000
commit55be53d65fcaffe44722f8d930ce6e6fb66d68e5 (patch)
treea6e05766bd9f970a334df649575d93464c7a9509 /.gitlab-ci
parent1128fa10d69c7ce90940fab28daad3aa102428e3 (diff)
downloadlibdrm-55be53d65fcaffe44722f8d930ce6e6fb66d68e5.tar.gz
libdrm-55be53d65fcaffe44722f8d930ce6e6fb66d68e5.tar.bz2
libdrm-55be53d65fcaffe44722f8d930ce6e6fb66d68e5.zip
gitlab-ci: set up cross build infra
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to '.gitlab-ci')
-rw-r--r--.gitlab-ci/debian-install.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh
index 05b63a15..6b779e64 100644
--- a/.gitlab-ci/debian-install.sh
+++ b/.gitlab-ci/debian-install.sh
@@ -4,6 +4,11 @@ set -o xtrace
export DEBIAN_FRONTEND=noninteractive
+CROSS_ARCHITECTURES=(i386 armhf arm64)
+for arch in ${CROSS_ARCHITECTURES[@]}; do
+ dpkg --add-architecture $arch
+done
+
apt-get install -y \
ca-certificates
@@ -29,6 +34,7 @@ apt-get install -y --no-remove \
libcunit1-dev \
libpciaccess-dev \
libxslt1-dev \
+ meson \
ninja-build \
pkg-config \
python3 \
@@ -38,6 +44,24 @@ apt-get install -y --no-remove \
valgrind \
xsltproc
+for arch in ${CROSS_ARCHITECTURES[@]}; do
+ cross_file=/cross_file-$arch.txt
+
+ # Cross-build libdrm deps
+ apt-get install -y --no-remove \
+ libcairo2-dev:$arch \
+ libpciaccess-dev:$arch \
+ crossbuild-essential-$arch
+
+ # Generate cross build files for Meson
+ /usr/share/meson/debcrossgen --arch $arch -o $cross_file
+
+ # Work around a bug in debcrossgen that should be fixed in the next release
+ if [ $arch = i386 ]; then
+ sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" $cross_file
+ fi
+done
+
# Test that the oldest Meson version we claim to support is still supported
pip3 install meson==0.43