From c2366f01fd194c9aef91153e3050af30c57bb95a Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Sat, 16 May 2020 17:17:23 +0200 Subject: gitlab-ci: x86_test-base image as common base for x86_test-gl/vk Making use of the relatively recent FDO_BASE_IMAGE feature of the templates, the x86_test-base image contents are shared as a separate layer by the x86_test-gl/vk images (meaning the former only needs to be downloaded once for either or both of the latter). This should be more efficient in terms of overall network bandwidth and storage, in particular if the base image changes less often than the -gl/vk ones. v2: * List x86_test-base in needs: along with x86_test-gl/vk (see parent commit) * Always put $STABLE/TESTING_EPHEMERAL on separate lines, will make it easier to add any non-ephemeral packages Reviewed-by: Eric Anholt # v1 Part-of: --- .gitlab-ci/container/x86_test-base.sh | 69 +++++++++++++++++++++++++++ .gitlab-ci/container/x86_test-gl.sh | 90 ++++++----------------------------- .gitlab-ci/container/x86_test-vk.sh | 84 +++++++------------------------- 3 files changed, 100 insertions(+), 143 deletions(-) create mode 100644 .gitlab-ci/container/x86_test-base.sh (limited to '.gitlab-ci') diff --git a/.gitlab-ci/container/x86_test-base.sh b/.gitlab-ci/container/x86_test-base.sh new file mode 100644 index 00000000000..e79384537ea --- /dev/null +++ b/.gitlab-ci/container/x86_test-base.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +set -e +set -o xtrace + +export DEBIAN_FRONTEND=noninteractive + +apt-get install -y \ + ca-certificates \ + gnupg + +# Upstream LLVM package repository +apt-key add .gitlab-ci/container/llvm-snapshot.gpg.key +echo "deb https://apt.llvm.org/buster/ llvm-toolchain-buster-9 main" >/etc/apt/sources.list.d/llvm9.list + +sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list +echo 'deb https://deb.debian.org/debian testing main' >/etc/apt/sources.list.d/testing.list + +apt-get update + +# Don't use newer packages from testing by default +cat >/etc/apt/preferences </etc/apt/sources.list.d/llvm9.list - -sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list -echo 'deb https://deb.debian.org/debian testing main' >/etc/apt/sources.list.d/testing.list - -apt-get update - -# Don't use newer packages from testing by default -cat >/etc/apt/preferences </etc/apt/sources.list.d/llvm9.list - -sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list -echo 'deb https://deb.debian.org/debian testing main' >/etc/apt/sources.list.d/testing.list - -apt-get update - -# Don't use newer packages from testing by default -cat >/etc/apt/preferences <