ci: Split building of libdrm to its own script

As we are doing that in several places already and we'll need to build
in others as well.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5903>
This commit is contained in:
Tomeu Vizoso 2020-07-27 14:42:42 +02:00 committed by Marge Bot
parent 8a8afcbe40
commit 5d0ba8b183
9 changed files with 38 additions and 38 deletions

View File

@ -203,7 +203,7 @@ x86_build-base:
- .fdo.container-build@debian
- .container
variables:
FDO_DISTRIBUTION_TAG: &x86_build-base "2020-07-21-tracie"
FDO_DISTRIBUTION_TAG: &x86_build-base "2020-07-28-libdrm"
.use-x86_build-base:
extends:
@ -221,7 +221,7 @@ x86_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_build "2020-07-27-fdtools"
FDO_DISTRIBUTION_TAG: &x86_build "2020-07-28-libdrm-2"
.use-x86_build:
variables:
@ -235,7 +235,7 @@ i386_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &i386_build "2020-07-21-tracie"
FDO_DISTRIBUTION_TAG: &i386_build "2020-07-28-libdrm"
.use-i386_build:
variables:
@ -249,7 +249,7 @@ ppc64el_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-07-21-tracie"
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-07-28-libdrm"
.use-ppc64el_build:
variables:
@ -263,7 +263,7 @@ s390x_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &s390x_build "2020-07-21-tracie"
FDO_DISTRIBUTION_TAG: &s390x_build "2020-07-28-libdrm"
.use-s390x_build:
variables:
@ -276,7 +276,7 @@ s390x_build:
x86_test-base:
extends: x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-base "2020-07-21-tracie"
FDO_DISTRIBUTION_TAG: &x86_test-base "2020-07-28-libdrm"
.use-x86_test-base:
extends:
@ -293,19 +293,19 @@ x86_test-base:
x86_test-gl:
extends: .use-x86_test-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-07-21-tracie"
FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-07-28-libdrm"
# Debian 10 based x86 test image for VK
x86_test-vk:
extends: .use-x86_test-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-07-21-gfxreconstruct-dev"
FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-07-28-libdrm"
# Debian 9 based x86 build image (old LLVM)
x86_build_old:
extends: x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_build_old "2020-07-21-tracie"
FDO_DISTRIBUTION_TAG: &x86_build_old "2020-07-28-libdrm"
FDO_DISTRIBUTION_VERSION: stretch-slim
.use-x86_build_old:
@ -321,7 +321,7 @@ arm_build:
- .fdo.container-build@debian@arm64v8
- .container
variables:
FDO_DISTRIBUTION_TAG: &arm_build "2020-07-21-tracie"
FDO_DISTRIBUTION_TAG: &arm_build "2020-07-28-libdrm"
.use-arm_build:
variables:
@ -336,7 +336,7 @@ arm_test-base:
- .fdo.container-build@debian
- .container
variables:
FDO_DISTRIBUTION_TAG: &arm_test-base "2020-07-18-nginx"
FDO_DISTRIBUTION_TAG: &arm_test-base "2020-07-28-libdrm"
.use-arm_test-base:
extends:
@ -354,7 +354,7 @@ arm64_test:
extends:
- .use-arm_test-base
variables:
FDO_DISTRIBUTION_TAG: &arm64_test "2020-07-18-nginx"
FDO_DISTRIBUTION_TAG: &arm64_test "2020-07-28-libdrm"
.use-arm64_test:
variables:

View File

@ -0,0 +1,14 @@
#!/bin/bash
set -ex
export LIBDRM_VERSION=libdrm-2.4.102
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
tar -xvf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
cd $LIBDRM_VERSION
meson build -D vc4=true -D freedreno=true -D etnaviv=true $EXTRA_MESON_ARGS
ninja -C build install
cd ..
rm -rf $LIBDRM_VERSION

View File

@ -50,11 +50,7 @@ arch=armhf
. .gitlab-ci/container/container_pre_build.sh
# dependencies where we want a specific version
export LIBDRM_VERSION=libdrm-2.4.102
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
tar -xvf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
cd $LIBDRM_VERSION; meson build -D vc4=true -D freedreno=true -D etnaviv=true; ninja -C build install; cd ..
rm -rf $LIBDRM_VERSION
EXTRA_MESON_ARGS=
. .gitlab-ci/build-libdrm.sh
. .gitlab-ci/container/container_post_build.sh

View File

@ -22,6 +22,7 @@ BAREMETAL_EPHEMERAL=" \
libffi-dev:$arch \
libgbm-dev:$arch \
libgles2-mesa-dev:$arch \
libpciaccess-dev:$arch \
libpcre3-dev:$arch \
libpng-dev:$arch \
libpython3-dev:$arch \

View File

@ -39,16 +39,8 @@ apt-get install -y --no-remove -t buster-backports \
# dependencies where we want a specific version
export LIBDRM_VERSION=libdrm-2.4.102
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
tar -xvf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
cd $LIBDRM_VERSION
meson --cross-file=/cross_file-${arch}.txt build -D libdir=lib/$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)
ninja -C build install
cd ..
rm -rf $LIBDRM_VERSION
EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)"
. .gitlab-ci/build-libdrm.sh
apt-get purge -y \
$STABLE_EPHEMERAL

View File

@ -56,7 +56,6 @@ export XCB_RELEASES=https://xcb.freedesktop.org/dist
export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
export XORGMACROS_VERSION=util-macros-1.19.0
export LIBDRM_VERSION=libdrm-2.4.102
export XCBPROTO_VERSION=xcb-proto-1.13
export LIBXCB_VERSION=libxcb-1.13
export LIBWAYLAND_VERSION=wayland-1.15.0
@ -77,12 +76,7 @@ tar -xvf $LIBXCB_VERSION.tar.bz2 && rm $LIBXCB_VERSION.tar.bz2
cd $LIBXCB_VERSION; ./configure; make install; cd ..
rm -rf $LIBXCB_VERSION
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
tar -xvf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
cd $LIBDRM_VERSION
meson build -D vc4=true -D freedreno=true -D etnaviv=true -D libdir=lib/x86_64-linux-gnu; ninja -C build install
cd ..
rm -rf $LIBDRM_VERSION
. .gitlab-ci/build-libdrm.sh
wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
tar -xvf $LIBWAYLAND_VERSION.tar.xz && rm $LIBWAYLAND_VERSION.tar.xz

View File

@ -15,6 +15,7 @@ STABLE_EPHEMERAL=" \
libgbm-dev \
libgles2-mesa-dev \
libpcre3-dev \
libpciaccess-dev \
libpng-dev \
libvulkan-dev \
libwaffle-dev \
@ -61,6 +62,10 @@ apt-get install -y --no-remove \
. .gitlab-ci/build-renderdoc.sh
############### Build libdrm
. .gitlab-ci/build-libdrm.sh
############### Uninstall the build software
ccache --show-stats

View File

@ -10,8 +10,6 @@ apt-get -y install --no-install-recommends \
strace \
libsensors5 \
libexpat1 \
libdrm2 \
libdrm-nouveau2 \
libx11-6 \
libx11-xcb1 \
firmware-qcom-media \

View File

@ -1,5 +1,5 @@
variables:
DISTRIBUTION_TAG: "2020-07-18"
DISTRIBUTION_TAG: "2020-07-28"
.kernel+rootfs:
stage: container-2