ci: Split building of libdrm to its own script
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Mon, 27 Jul 2020 12:42:42 +0000 (14:42 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jul 2020 12:41:45 +0000 (12:41 +0000)
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>

.gitlab-ci.yml
.gitlab-ci/build-libdrm.sh [new file with mode: 0644]
.gitlab-ci/container/arm_build.sh
.gitlab-ci/container/baremetal_build.sh
.gitlab-ci/container/cross_build.sh
.gitlab-ci/container/x86_build.sh
.gitlab-ci/container/x86_test-gl.sh
.gitlab-ci/create-rootfs.sh
.gitlab-ci/lava-gitlab-ci.yml

index 738ca9c02ff352c7e596e652c483f68bd4ae68e7..0943b5dfb89e7fa1a3847664e18d74da45b701d0 100644 (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:
diff --git a/.gitlab-ci/build-libdrm.sh b/.gitlab-ci/build-libdrm.sh
new file mode 100644 (file)
index 0000000..1a57041
--- /dev/null
@@ -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
+
index 56ad78d1775eddf6f85c5e2fe239c263a1041674..38270575400877aec5b750408331d65dd82b648d 100644 (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
index d6d8c6726de15fe84a798cadc0cf6088a8ef3729..e7e92ba2e2ea35f1f849294643be89506b780825 100644 (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 \
index c3e439374108a781bc2cee6f26529c1561376c0d..1154a490eb4a97f4cb78e1c91ce341ec812fb667 100644 (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
index 1c6fd1ba64196bd66b46eb5cdde5a4800b2653ac..51f0da7dd1314e8401b1fc02b11522da40ff7864 100644 (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
index daed59c6d334d618860e3888aa02ddcc15db1fc4..d7672d9de877bad1d35f4d477287264e4524580d 100644 (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
index 21c2844f73f8e8b9acc88bd3454f96f775232bcf..8422bab11b4bb11358c5232d7e5fa1ec54ecea34 100644 (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 \
index 7ce27622bc13a77ab57f373473d76c6239174e61..1be28ef6e130c357cb9aeb9007c20cb944462fa5 100644 (file)
@@ -1,5 +1,5 @@
 variables:
-  DISTRIBUTION_TAG: "2020-07-18"
+  DISTRIBUTION_TAG: "2020-07-28"
 
 .kernel+rootfs:
   stage: container-2