diff options
author | Michel Dänzer <[email protected]> | 2019-09-06 17:04:47 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2019-09-18 10:36:48 +0000 |
commit | 8a199928696c64f5edd89b63aa2db4d9e346ad93 (patch) | |
tree | 071133ad10b3c7c9b60dc83d92ce858c3d469faf | |
parent | 26fcc8baba161c177e7c1b31d5895e6ceb7420ed (diff) |
gitlab-ci: Create separate docker images for Debian stretch & buster
Pros:
* Less fragile due to not mixing packages from stretch and buster
* No longer need to use third-party LLVM packages
* The buster image now uses GCC 8 for C++ as well (previously 6 for C++,
8 for C), allowing to drop some hacks
Con:
* The stretch image now only uses GCC 6 for C as well as C++
* Need separate jobs for testing old LLVM versions
Reviewed-by: Eric Engestrom <[email protected]>
-rw-r--r-- | .gitlab-ci.yml | 52 | ||||
-rw-r--r-- | .gitlab-ci/debian-install.sh | 32 | ||||
-rw-r--r-- | .gitlab-ci/debian-stretch-install.sh | 50 |
3 files changed, 94 insertions, 40 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00a09e46f12..bada20dc89c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,12 +14,14 @@ # repository's registry will be used there as well. variables: UPSTREAM_REPO: mesa/mesa - DEBIAN_TAG: "2019-09-11" + DEBIAN_TAG: "2019-09-18" DEBIAN_ARM64_TAG: "arm64v8-2019-08-09" - DEBIAN_VERSION: stretch-slim - DEBIAN_ARM64_VERSION: buster-slim + STRETCH_TAG: "2019-09-18" + DEBIAN_VERSION: buster-slim + STRETCH_VERSION: stretch-slim DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG" - DEBIAN_ARM64_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_ARM64_VERSION:$DEBIAN_ARM64_TAG" + DEBIAN_ARM64_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_ARM64_TAG" + STRETCH_IMAGE: "$CI_REGISTRY_IMAGE/debian/$STRETCH_VERSION:$STRETCH_TAG" include: - project: 'wayland/ci-templates' @@ -52,8 +54,9 @@ stages: # https://gitlab.com/gitlab-org/gitlab-ce/commit/8788fb925706cad594adf6917a6c5f6587dd1521 - artifacts -# Builds the normal CI native and cross-build docker image. -debian: +# Build the normal CI native and cross-build docker images. + +debian-10: extends: - .debian@container-ifnot-exists - .ci-run-policy @@ -62,6 +65,14 @@ debian: GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh' +debian-9: + extends: debian-10 + variables: + DEBIAN_TAG: $STRETCH_TAG + DEBIAN_VERSION: $STRETCH_VERSION + DEBIAN_IMAGE: $STRETCH_IMAGE + DEBIAN_EXEC: 'bash .gitlab-ci/debian-stretch-install.sh' + # Builds a Docker image with the native environment and VK-GL-CTS for testing. test-container:arm64: extends: @@ -70,7 +81,6 @@ test-container:arm64: stage: containers variables: DEBIAN_TAG: "$DEBIAN_ARM64_TAG" - DEBIAN_VERSION: "$DEBIAN_ARM64_VERSION" GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image DEBIAN_EXEC: 'bash .gitlab-ci/debian-test-install.sh' @@ -231,11 +241,6 @@ meson-clang: VULKAN_DRIVERS: intel,amd,freedreno CC: "ccache clang-8" CXX: "ccache clang++-8" - before_script: - - export CCACHE_BASEDIR="$PWD" CCACHE_DIR="$PWD/ccache" - - ccache --zero-stats --show-stats || true - # clang++ breaks if it picks up the GCC 8 directory without libstdc++.so - - apt-get remove -y libgcc-8-dev scons-swr: extends: .scons-build @@ -272,11 +277,24 @@ meson-clover: - .gitlab-ci/meson-build.sh - LLVM_VERSION=8 .gitlab-ci/meson-build.sh - export GALLIUM_DRIVERS="i915,r600" + - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh + - LLVM_VERSION=7 .gitlab-ci/meson-build.sh + +meson-clover-old-llvm: + extends: meson-clover + image: $STRETCH_IMAGE + variables: + UNWIND: "false" + DRI_LOADERS: > + -D glx=disabled + -D egl=false + -D gbm=false + -D platforms=drm,surfaceless + GALLIUM_DRIVERS: "i915,r600" + script: - LLVM_VERSION=3.9 .gitlab-ci/meson-build.sh - LLVM_VERSION=4.0 .gitlab-ci/meson-build.sh - LLVM_VERSION=5.0 .gitlab-ci/meson-build.sh - - LLVM_VERSION=6.0 .gitlab-ci/meson-build.sh - - LLVM_VERSION=7 .gitlab-ci/meson-build.sh meson-vulkan: extends: .meson-build @@ -328,6 +346,12 @@ scons-llvm: variables: SCONS_TARGET: "llvm=1" SCONS_CHECK_COMMAND: "scons llvm=1 check" + LLVM_VERSION: "6.0" + +scons-old-llvm: + extends: scons-llvm + image: $STRETCH_IMAGE + variables: LLVM_VERSION: "3.9" .deqp-test: diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh index 8e7f3e830b9..e77ae132772 100644 --- a/.gitlab-ci/debian-install.sh +++ b/.gitlab-ci/debian-install.sh @@ -11,28 +11,16 @@ for arch in $CROSS_ARCHITECTURES; do done apt-get install -y \ - apt-transport-https \ ca-certificates \ - curl \ wget \ - unzip \ - gnupg - -curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - -echo "deb [trusted=yes] https://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main" >/etc/apt/sources.list.d/llvm7.list -echo "deb [trusted=yes] https://apt.llvm.org/stretch/ llvm-toolchain-stretch-8 main" >/etc/apt/sources.list.d/llvm8.list + unzip sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list -echo 'deb https://deb.debian.org/debian stretch-backports main' >/etc/apt/sources.list.d/backports.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 -t stretch-backports \ - llvm-3.9-dev \ - libclang-3.9-dev \ - llvm-4.0-dev \ - libclang-4.0-dev \ - llvm-5.0-dev \ - libclang-5.0-dev \ + +apt-get install -y --no-remove \ llvm-6.0-dev \ libclang-6.0-dev \ llvm-7-dev \ @@ -40,13 +28,7 @@ apt-get install -y --no-remove -t stretch-backports \ llvm-8-dev \ libclang-8-dev \ g++ \ - clang-8 - -# Install remaining packages from Debian buster to get newer versions -echo "deb https://deb.debian.org/debian/ buster main" >/etc/apt/sources.list.d/buster.list -echo "deb https://deb.debian.org/debian/ buster-updates main" >/etc/apt/sources.list.d/buster-updates.list -apt-get update -apt-get install -y --no-remove \ + clang-8 \ git \ bzip2 \ zlib1g-dev \ @@ -273,10 +255,8 @@ rm -rf /VK-GL-CTS ############### Uninstall the build software apt-get purge -y \ - git \ - curl \ + wget \ unzip \ - gnupg \ cmake \ git \ libgles2-mesa-dev \ diff --git a/.gitlab-ci/debian-stretch-install.sh b/.gitlab-ci/debian-stretch-install.sh new file mode 100644 index 00000000000..b9cfa4000b6 --- /dev/null +++ b/.gitlab-ci/debian-stretch-install.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +set -e +set -o xtrace + +export DEBIAN_FRONTEND=noninteractive + +apt-get install -y \ + apt-transport-https \ + ca-certificates + +sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list +echo 'deb https://deb.debian.org/debian stretch-backports main' >/etc/apt/sources.list.d/backports.list + +apt-get update + +apt-get install -y --no-remove \ + llvm-3.9-dev \ + libclang-3.9-dev \ + llvm-4.0-dev \ + libclang-4.0-dev \ + llvm-5.0-dev \ + libclang-5.0-dev \ + g++ \ + bzip2 \ + ccache \ + zlib1g-dev \ + pkg-config \ + gcc \ + git \ + libepoxy-dev \ + libclc-dev \ + xz-utils \ + libdrm-dev \ + libexpat1-dev \ + libelf-dev \ + libunwind-dev \ + libpng-dev \ + python-mako \ + python3-mako \ + bison \ + flex \ + gettext \ + scons \ + meson + + +############### Uninstall unused packages + +apt-get autoremove -y --purge |