Mesa (master): ci: add arm_test-base docker image

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 9 06:49:04 UTC 2020


Module: Mesa
Branch: master
Commit: 408b36a11dfe0bf3cbfda114c058ce7682b90483
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=408b36a11dfe0bf3cbfda114c058ce7682b90483

Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date:   Sun Jun  7 22:03:34 2020 +0200

ci: add arm_test-base docker image

Similar to x86_build-base.

Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5381>

---

 .gitlab-ci.yml                        | 24 ++++++++-
 .gitlab-ci/container/arm_test-base.sh | 72 ++++++++++++++++++++++++++
 .gitlab-ci/container/arm_test.sh      | 59 ----------------------
 .gitlab-ci/container/arm_test_base.sh | 95 +++++++++++++++++++++++++++++++++++
 4 files changed, 189 insertions(+), 61 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f8c6c9ff32d..5a57ddfe80a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -268,11 +268,31 @@ arm_build:
   needs:
     - arm_build
 
+# Debian 10 based x86 baremetal image base
+arm_test-base:
+  extends:
+    - .fdo.container-build at debian
+    - .container
+  variables:
+    FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-07"
+
+.use-arm_test-base:
+  extends:
+    - arm_test-base
+    - .ci-run-policy
+  stage: container-2
+  variables:
+    BASE_TAG: *arm_test-base
+    FDO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/debian/arm_test-base:$BASE_TAG"
+  needs:
+    - arm_test-base
+
 # x86 image with ARM rootfses for baremetal testing.
 arm_test:
-  extends: x86_build-base
+  extends:
+    - .use-arm_test-base
   variables:
-    FDO_DISTRIBUTION_TAG: &arm_test "2020-06-01"
+    FDO_DISTRIBUTION_TAG: &arm_test "2020-06-07"
 
 .use-arm_test:
   variables:
diff --git a/.gitlab-ci/container/arm_test-base.sh b/.gitlab-ci/container/arm_test-base.sh
new file mode 100644
index 00000000000..b59f6daa6ed
--- /dev/null
+++ b/.gitlab-ci/container/arm_test-base.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+set -e
+set -o xtrace
+
+# etnaviv will eventually need armhf too.
+CROSS_ARCHITECTURES="arm64"
+
+for arch in $CROSS_ARCHITECTURES; do
+    dpkg --add-architecture $arch
+done
+
+############### Install packages for building
+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
+
+apt-get install -y --no-remove \
+        abootimg \
+        android-sdk-ext4-utils \
+        bc \
+        bison \
+        bzip2 \
+        ccache \
+        cmake \
+        cpio \
+        g++ \
+        debootstrap \
+        fastboot \
+        flex \
+        git \
+        netcat \
+        python3-distutils \
+        python3-minimal \
+        python3-serial \
+        python3.7 \
+        pkg-config \
+        procps \
+        u-boot-tools \
+        unzip
+
+apt install -t buster-backports -y --no-remove \
+    meson
+
+# Cross-build test deps
+for arch in $CROSS_ARCHITECTURES; do
+    apt-get install -y --no-remove \
+        crossbuild-essential-${arch} \
+        libdrm-dev:${arch} \
+        libegl1-mesa-dev:${arch} \
+        libelf-dev:${arch} \
+        libexpat1-dev:${arch} \
+        libffi-dev:${arch} \
+        libgbm-dev:${arch} \
+        libgles2-mesa-dev:${arch} \
+        libpng-dev:${arch} \
+        libstdc++6:${arch} \
+        libtinfo-dev:${arch} \
+        libegl1-mesa-dev:${arch} \
+        libvulkan-dev:${arch}
+
+    mkdir /var/cache/apt/archives/${arch}
+done
+
+############### Create cross-files
+
+for arch in $CROSS_ARCHITECTURES; do
+  . .gitlab-ci/create-cross-file.sh $arch
+done
+
+. .gitlab-ci/container/container_post_build.sh
diff --git a/.gitlab-ci/container/arm_test.sh b/.gitlab-ci/container/arm_test.sh
index bebdd2350b0..3bdcd2e6b0a 100644
--- a/.gitlab-ci/container/arm_test.sh
+++ b/.gitlab-ci/container/arm_test.sh
@@ -6,70 +6,11 @@ set -o xtrace
 # etnaviv will eventually need armhf too.
 CROSS_ARCHITECTURES="arm64"
 
-for arch in $CROSS_ARCHITECTURES; do
-    dpkg --add-architecture $arch
-done
-
-############### Install packages for building
-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
-
-apt-get install -y --no-remove \
-        abootimg \
-        android-sdk-ext4-utils \
-        bc \
-        bison \
-        bzip2 \
-        ccache \
-        cmake \
-        cpio \
-        g++ \
-        debootstrap \
-        fastboot \
-        flex \
-        git \
-        netcat \
-        python3-distutils \
-        python3-minimal \
-        python3-serial \
-        python3.7 \
-        pkg-config \
-        procps \
-        u-boot-tools \
-        unzip
-
-apt install -t buster-backports -y --no-remove \
-    meson
-
-# Cross-build test deps
-for arch in $CROSS_ARCHITECTURES; do
-    apt-get install -y --no-remove \
-        crossbuild-essential-${arch} \
-        libdrm-dev:${arch} \
-        libegl1-mesa-dev:${arch} \
-        libelf-dev:${arch} \
-        libexpat1-dev:${arch} \
-        libffi-dev:${arch} \
-        libgbm-dev:${arch} \
-        libgles2-mesa-dev:${arch} \
-        libpng-dev:${arch} \
-        libstdc++6:${arch} \
-        libtinfo-dev:${arch} \
-        libegl1-mesa-dev:${arch} \
-        libvulkan-dev:${arch}
-
-    mkdir /var/cache/apt/archives/${arch}
-done
-
 . .gitlab-ci/container/container_pre_build.sh
 
 ############### Create rootfs
 
 for arch in $CROSS_ARCHITECTURES; do
-  . .gitlab-ci/create-cross-file.sh $arch
-
   DEBIAN_ARCH=$arch . .gitlab-ci/container/lava_arm.sh
 done
 
diff --git a/.gitlab-ci/container/arm_test_base.sh b/.gitlab-ci/container/arm_test_base.sh
new file mode 100644
index 00000000000..49b71ce27dc
--- /dev/null
+++ b/.gitlab-ci/container/arm_test_base.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+set -e
+set -o xtrace
+
+# etnaviv will eventually need armhf too.
+CROSS_ARCHITECTURES="arm64"
+
+for arch in $CROSS_ARCHITECTURES; do
+    dpkg --add-architecture $arch
+done
+
+############### Install packages for building
+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
+
+apt-get install -y --no-remove \
+        abootimg \
+        android-sdk-ext4-utils \
+        bc \
+        bison \
+        bzip2 \
+        ccache \
+        cmake \
+        cpio \
+        g++ \
+        debootstrap \
+        fastboot \
+        flex \
+        git \
+        netcat \
+        python3-distutils \
+        python3-minimal \
+        python3-serial \
+        python3.7 \
+        pkg-config \
+        procps \
+        u-boot-tools \
+        unzip
+
+apt install -t buster-backports -y --no-remove \
+    meson
+
+# Cross-build test deps
+for arch in $CROSS_ARCHITECTURES; do
+    apt-get install -y --no-remove \
+        crossbuild-essential-${arch} \
+        libdrm-dev:${arch} \
+        libegl1-mesa-dev:${arch} \
+        libelf-dev:${arch} \
+        libexpat1-dev:${arch} \
+        libffi-dev:${arch} \
+        libgbm-dev:${arch} \
+        libgles2-mesa-dev:${arch} \
+        libpng-dev:${arch} \
+        libstdc++6:${arch} \
+        libtinfo-dev:${arch} \
+        libegl1-mesa-dev:${arch} \
+        libvulkan-dev:${arch}
+
+    mkdir /var/cache/apt/archives/${arch}
+done
+
+############### Create cross-files
+
+for arch in $CROSS_ARCHITECTURES; do
+  . .gitlab-ci/create-cross-file.sh $arch
+done
+
+############### Uninstall the build software
+
+apt-get purge -y \
+        bc \
+        bison \
+        bzip2 \
+        ccache \
+        cmake \
+        g++ \
+        flex \
+        git \
+        meson \
+        pkg-config \
+        python3-distutils \
+        procps \
+        u-boot-tools
+
+for arch in $CROSS_ARCHITECTURES; do
+    apt-get purge -y ".*:${arch}"
+done
+
+apt-get autoremove -y --purge
+
+. .gitlab-ci/container/container_post_build.sh



More information about the mesa-commit mailing list