gitlab-ci: set up cross build infra
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>main
parent
1128fa10d6
commit
55be53d65f
|
@ -14,7 +14,7 @@
|
||||||
# repository's registry will be used there as well.
|
# repository's registry will be used there as well.
|
||||||
variables:
|
variables:
|
||||||
UPSTREAM_REPO: mesa/drm
|
UPSTREAM_REPO: mesa/drm
|
||||||
DEBIAN_TAG: "2019-10-20"
|
DEBIAN_TAG: "2019-11-12"
|
||||||
DEBIAN_VERSION: buster-slim
|
DEBIAN_VERSION: buster-slim
|
||||||
DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
|
DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
|
||||||
|
|
||||||
|
@ -71,9 +71,10 @@ debian:
|
||||||
-D radeon=true
|
-D radeon=true
|
||||||
-D tegra=true
|
-D tegra=true
|
||||||
-D udev=true
|
-D udev=true
|
||||||
-D valgrind=true
|
-D valgrind=auto
|
||||||
-D vc4=true
|
-D vc4=true
|
||||||
-D vmwgfx=true
|
-D vmwgfx=true
|
||||||
|
${CROSS+--cross /cross_file-$CROSS.txt}
|
||||||
- ninja -C _build
|
- ninja -C _build
|
||||||
- ninja -C _build test
|
- ninja -C _build test
|
||||||
- DESTDIR=$PWD/install ninja -C _build install
|
- DESTDIR=$PWD/install ninja -C _build install
|
||||||
|
|
|
@ -4,6 +4,11 @@ set -o xtrace
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
CROSS_ARCHITECTURES=(i386 armhf arm64)
|
||||||
|
for arch in ${CROSS_ARCHITECTURES[@]}; do
|
||||||
|
dpkg --add-architecture $arch
|
||||||
|
done
|
||||||
|
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
|
|
||||||
|
@ -29,6 +34,7 @@ apt-get install -y --no-remove \
|
||||||
libcunit1-dev \
|
libcunit1-dev \
|
||||||
libpciaccess-dev \
|
libpciaccess-dev \
|
||||||
libxslt1-dev \
|
libxslt1-dev \
|
||||||
|
meson \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
python3 \
|
python3 \
|
||||||
|
@ -38,6 +44,24 @@ apt-get install -y --no-remove \
|
||||||
valgrind \
|
valgrind \
|
||||||
xsltproc
|
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
|
# Test that the oldest Meson version we claim to support is still supported
|
||||||
pip3 install meson==0.43
|
pip3 install meson==0.43
|
||||||
|
|
Loading…
Reference in New Issue