gitlab-ci: Use separate docker images for x86 build/test jobs
authorMichel Dänzer <mdaenzer@redhat.com>
Tue, 5 Nov 2019 17:52:24 +0000 (18:52 +0100)
committerMichel Dänzer <michel@daenzer.net>
Tue, 12 Nov 2019 09:17:21 +0000 (10:17 +0100)
Same as was done for the ARM images before.

This should make it less painful to update to newer dEQP / piglit as
well as to make changes to the build/test environment.

Reviewed-by: Eric Anholt <eric@anholt.net>
.gitlab-ci.yml
.gitlab-ci/debian-install.sh
.gitlab-ci/debian-test-install.sh [new file with mode: 0644]

index f4715b923f095e0806ad425614ca125b8c457c5f..f3421a8358d19313944bfc5400724a2bb1a3b8f3 100644 (file)
 # repository's registry will be used there as well.
 variables:
   UPSTREAM_REPO: mesa/mesa
-  DEBIAN_TAG: "2019-11-12"
+  DEBIAN_TAG: "amd64-2019-11-12"
+  DEBIAN_TEST_TAG: "amd64-test-2019-11-12"
   DEBIAN_ARM64_TAG: "arm64v8-2019-11-06"
   DEBIAN_ARM64_TEST_TAG: "arm64v8-test-2019-11-12"
   STRETCH_TAG: "2019-09-18"
   DEBIAN_VERSION: buster-slim
   STRETCH_VERSION: stretch-slim
   DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
+  DEBIAN_TEST_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TEST_TAG"
   DEBIAN_ARM64_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_ARM64_TAG"
   DEBIAN_ARM64_TEST_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_ARM64_TEST_TAG"
   STRETCH_IMAGE: "$CI_REGISTRY_IMAGE/debian/$STRETCH_VERSION:$STRETCH_TAG"
@@ -99,6 +101,12 @@ debian-10:amd64:
   needs:
     - debian-10:amd64
 
+debian-10-test:amd64:
+  extends: debian-10:amd64
+  variables:
+    DEBIAN_TAG: "$DEBIAN_TEST_TAG"
+    DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh'
+
 debian-9:amd64:
   extends: debian-10:amd64
   variables:
@@ -447,7 +455,7 @@ scons-old-llvm:
 .test:
   extends:
     - .ci-run-policy
-    - .use-debian-10:amd64
+  image: $DEBIAN_TEST_IMAGE
   stage: test
   variables:
     GIT_STRATEGY: none # testing doesn't build anything from source
@@ -465,7 +473,7 @@ scons-old-llvm:
     - meson-main
   needs:
     - meson-main
-    - debian-10:amd64
+    - debian-10-test:amd64
 
 .piglit-test:
   extends: .test
index 210f6ba78b13030909c0c2a65dba8a9c87adc7d4..80a36508c8ce372e27cf1977c4086988b7999290 100644 (file)
@@ -34,7 +34,6 @@ apt-get install -y --no-remove \
       automake \
       autotools-dev \
       bison \
-      bzip2 \
       clang-8 \
       cmake \
       flex \
@@ -46,19 +45,15 @@ apt-get install -y --no-remove \
       libclang-7-dev \
       libclang-8-dev \
       libclc-dev \
-      libegl1-mesa-dev \
       libelf-dev \
       libepoxy-dev \
       libexpat1-dev \
       libgbm-dev \
-      libgles2-mesa-dev \
       libgtk-3-dev \
       libomxil-bellagio-dev \
-      libpng-dev \
       libtool \
       libunwind-dev \
       libvulkan-dev \
-      libwaffle-dev \
       libx11-dev \
       libx11-xcb-dev \
       libxdamage-dev \
@@ -73,13 +68,8 @@ apt-get install -y --no-remove \
       pkg-config \
       python-mako \
       python3-mako \
-      python3-numpy \
-      python3-six \
       scons \
-      waffle-utils \
       x11proto-gl-dev \
-      xauth \
-      xvfb \
       xz-utils \
       zlib1g-dev
 
@@ -246,20 +236,6 @@ for arch in $CROSS_ARCHITECTURES; do
   fi
 done
 
-############### Build piglit
-
-git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
-cd /piglit
-git checkout 7a92b02210dabbba31ae5fd71272ea742346a9c8
-patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
-cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
-ninja -j4
-rm -rf .git .ninja* *.ninja **/CMake* **/cmake* ninja.* **/*.[chao] target_api
-
-############### Build dEQP
-
-. .gitlab-ci/build-deqp.sh
-
 
 ############### Uninstall the build software
 
@@ -270,9 +246,7 @@ apt-get purge -y \
       cmake \
       git \
       libgbm-dev \
-      libgles2-mesa-dev \
       libtool \
-      libwaffle-dev \
       unzip \
       wget \
       x11proto-gl-dev
diff --git a/.gitlab-ci/debian-test-install.sh b/.gitlab-ci/debian-test-install.sh
new file mode 100644 (file)
index 0000000..4af7399
--- /dev/null
@@ -0,0 +1,92 @@
+#!/bin/bash
+
+set -e
+set -o xtrace
+
+export DEBIAN_FRONTEND=noninteractive
+
+apt-get install -y ca-certificates
+
+sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list
+echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list
+
+apt-get update
+
+# Use newer packages from backports by default
+cat >/etc/apt/preferences <<EOF
+Package: *
+Pin: release a=buster-backports
+Pin-Priority: 500
+EOF
+
+apt-get dist-upgrade -y
+
+apt-get install -y --no-remove \
+      cmake \
+      g++ \
+      git \
+      gcc \
+      libexpat1 \
+      libgbm-dev \
+      libgles2-mesa-dev \
+      libpng16-16 \
+      libpng-dev \
+      libvulkan1 \
+      libwaffle-dev \
+      libwayland-server0 \
+      libxcb-xfixes0 \
+      libxkbcommon0 \
+      libxkbcommon-dev \
+      libxrender1 \
+      libxrender-dev \
+      meson \
+      patch \
+      pkg-config \
+      python3-mako \
+      python3-numpy \
+      python3-six \
+      python \
+      waffle-utils \
+      xauth \
+      xvfb \
+      zlib1g
+
+
+############### Build piglit
+
+git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
+pushd /piglit
+git checkout 7a92b02210dabbba31ae5fd71272ea742346a9c8
+patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
+cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
+ninja -j4
+find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | xargs rm -rf
+rm -rf target_api
+popd
+
+
+############### Build dEQP
+
+. .gitlab-ci/build-deqp.sh
+
+
+############### Uninstall the build software
+
+apt-get purge -y \
+      cmake \
+      g++ \
+      gcc \
+      git \
+      libc6-dev \
+      libgbm-dev \
+      libgles2-mesa-dev \
+      libpng-dev \
+      libwaffle-dev \
+      libxkbcommon-dev \
+      libxrender-dev \
+      meson \
+      patch \
+      pkg-config \
+      python
+
+apt-get autoremove -y --purge