From 5d0ba8b183427e14399a5792a6fd7d515595af94 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 27 Jul 2020 14:42:42 +0200 Subject: [PATCH] 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 Reviewed-by: Rohan Garg Part-of: --- .gitlab-ci.yml | 24 ++++++++++++------------ .gitlab-ci/build-libdrm.sh | 14 ++++++++++++++ .gitlab-ci/container/arm_build.sh | 8 ++------ .gitlab-ci/container/baremetal_build.sh | 1 + .gitlab-ci/container/cross_build.sh | 12 ++---------- .gitlab-ci/container/x86_build.sh | 8 +------- .gitlab-ci/container/x86_test-gl.sh | 5 +++++ .gitlab-ci/create-rootfs.sh | 2 -- .gitlab-ci/lava-gitlab-ci.yml | 2 +- 9 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 .gitlab-ci/build-libdrm.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 738ca9c02ff..0943b5dfb89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/.gitlab-ci/build-libdrm.sh b/.gitlab-ci/build-libdrm.sh new file mode 100644 index 00000000000..1a57041f6fe --- /dev/null +++ b/.gitlab-ci/build-libdrm.sh @@ -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 + diff --git a/.gitlab-ci/container/arm_build.sh b/.gitlab-ci/container/arm_build.sh index 56ad78d1775..38270575400 100644 --- a/.gitlab-ci/container/arm_build.sh +++ b/.gitlab-ci/container/arm_build.sh @@ -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 diff --git a/.gitlab-ci/container/baremetal_build.sh b/.gitlab-ci/container/baremetal_build.sh index d6d8c6726de..e7e92ba2e2e 100644 --- a/.gitlab-ci/container/baremetal_build.sh +++ b/.gitlab-ci/container/baremetal_build.sh @@ -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 \ diff --git a/.gitlab-ci/container/cross_build.sh b/.gitlab-ci/container/cross_build.sh index c3e43937410..1154a490eb4 100644 --- a/.gitlab-ci/container/cross_build.sh +++ b/.gitlab-ci/container/cross_build.sh @@ -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 diff --git a/.gitlab-ci/container/x86_build.sh b/.gitlab-ci/container/x86_build.sh index 1c6fd1ba641..51f0da7dd13 100644 --- a/.gitlab-ci/container/x86_build.sh +++ b/.gitlab-ci/container/x86_build.sh @@ -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 diff --git a/.gitlab-ci/container/x86_test-gl.sh b/.gitlab-ci/container/x86_test-gl.sh index daed59c6d33..d7672d9de87 100644 --- a/.gitlab-ci/container/x86_test-gl.sh +++ b/.gitlab-ci/container/x86_test-gl.sh @@ -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 diff --git a/.gitlab-ci/create-rootfs.sh b/.gitlab-ci/create-rootfs.sh index 21c2844f73f..8422bab11b4 100644 --- a/.gitlab-ci/create-rootfs.sh +++ b/.gitlab-ci/create-rootfs.sh @@ -10,8 +10,6 @@ apt-get -y install --no-install-recommends \ strace \ libsensors5 \ libexpat1 \ - libdrm2 \ - libdrm-nouveau2 \ libx11-6 \ libx11-xcb1 \ firmware-qcom-media \ diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml index 7ce27622bc1..1be28ef6e13 100644 --- a/.gitlab-ci/lava-gitlab-ci.yml +++ b/.gitlab-ci/lava-gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - DISTRIBUTION_TAG: "2020-07-18" + DISTRIBUTION_TAG: "2020-07-28" .kernel+rootfs: stage: container-2 -- 2.30.2