Mesa (master): ci: use separate docker images for baremetal builds
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 9 06:49:04 UTC 2020
Module: Mesa
Branch: master
Commit: 839bc2daa93f88becb0494c8b1564bf40350a162
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=839bc2daa93f88becb0494c8b1564bf40350a162
Author: Christian Gmeiner <christian.gmeiner at gmail.com>
Date: Sun Jun 7 23:19:50 2020 +0200
ci: use separate docker images for baremetal builds
Using arm_test-base as a separate base layer as well for storage &
network bandwidth efficiency.
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 | 20 +++----
.gitlab-ci/container/arm64_test.sh | 5 ++
.gitlab-ci/container/arm_test-base.sh | 33 ------------
.gitlab-ci/container/arm_test.sh | 40 --------------
.gitlab-ci/container/arm_test_base.sh | 95 ---------------------------------
.gitlab-ci/container/baremetal_build.sh | 39 ++++++++++++++
6 files changed, 54 insertions(+), 178 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5a57ddfe80a..00f5516d2ad 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -274,7 +274,7 @@ arm_test-base:
- .fdo.container-build at debian
- .container
variables:
- FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-07"
+ FDO_DISTRIBUTION_TAG: &arm_test-base "2020-06-08"
.use-arm_test-base:
extends:
@@ -287,19 +287,19 @@ arm_test-base:
needs:
- arm_test-base
-# x86 image with ARM rootfses for baremetal testing.
-arm_test:
+# x86 image with ARM64 rootfs for baremetal testing.
+arm64_test:
extends:
- .use-arm_test-base
variables:
- FDO_DISTRIBUTION_TAG: &arm_test "2020-06-07"
+ FDO_DISTRIBUTION_TAG: &arm64_test "2020-06-08"
-.use-arm_test:
+.use-arm64_test:
variables:
- TAG: *arm_test
- image: "$CI_REGISTRY_IMAGE/debian/arm_test:$TAG"
+ TAG: *arm64_test
+ image: "$CI_REGISTRY_IMAGE/debian/arm64_test:$TAG"
needs:
- - arm_test
+ - arm64_test
# Native Windows docker builds
#
@@ -945,7 +945,7 @@ arm64_a630_gmem:
arm64_a306_gles2:
extends:
- .baremetal-test
- - .use-arm_test
+ - .use-arm64_test
- .freedreno-rules
variables:
BM_KERNEL: /lava-files/Image.gz
@@ -964,7 +964,7 @@ arm64_a306_gles2:
script:
- .gitlab-ci/bare-metal/fastboot.sh
needs:
- - arm_test
+ - arm64_test
- arm_build
- meson-arm64
tags:
diff --git a/.gitlab-ci/container/arm64_test.sh b/.gitlab-ci/container/arm64_test.sh
new file mode 100644
index 00000000000..98e3b4ab0b0
--- /dev/null
+++ b/.gitlab-ci/container/arm64_test.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+arch=arm64
+
+. .gitlab-ci/container/baremetal_build.sh
diff --git a/.gitlab-ci/container/arm_test-base.sh b/.gitlab-ci/container/arm_test-base.sh
index b59f6daa6ed..1454d51996d 100644
--- a/.gitlab-ci/container/arm_test-base.sh
+++ b/.gitlab-ci/container/arm_test-base.sh
@@ -3,13 +3,6 @@
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
@@ -43,30 +36,4 @@ apt-get install -y --no-remove \
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
deleted file mode 100644
index 3bdcd2e6b0a..00000000000
--- a/.gitlab-ci/container/arm_test.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-set -e
-set -o xtrace
-
-# etnaviv will eventually need armhf too.
-CROSS_ARCHITECTURES="arm64"
-
-. .gitlab-ci/container/container_pre_build.sh
-
-############### Create rootfs
-
-for arch in $CROSS_ARCHITECTURES; do
- DEBIAN_ARCH=$arch . .gitlab-ci/container/lava_arm.sh
-done
-
-############### Uninstall the build software
-
-ccache --show-stats
-
-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
diff --git a/.gitlab-ci/container/arm_test_base.sh b/.gitlab-ci/container/arm_test_base.sh
deleted file mode 100644
index 49b71ce27dc..00000000000
--- a/.gitlab-ci/container/arm_test_base.sh
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/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
diff --git a/.gitlab-ci/container/baremetal_build.sh b/.gitlab-ci/container/baremetal_build.sh
new file mode 100644
index 00000000000..09527410182
--- /dev/null
+++ b/.gitlab-ci/container/baremetal_build.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+set -e
+set -o xtrace
+
+dpkg --add-architecture $arch
+apt-get update
+
+# Cross-build test deps
+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
+
+############### Create cross-files
+
+. .gitlab-ci/create-cross-file.sh $arch
+
+. .gitlab-ci/container/container_pre_build.sh
+
+############### Create rootfs
+
+DEBIAN_ARCH=$arch . .gitlab-ci/container/lava_arm.sh
+
+ccache --show-stats
+
+. .gitlab-ci/container/container_post_build.sh
More information about the mesa-commit
mailing list