gitlab-ci: Use Debian stretch instead of Ubuntu bionic
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 2 Apr 2019 14:56:54 +0000 (16:56 +0200)
committerMichel Dänzer <michel@daenzer.net>
Tue, 16 Apr 2019 08:14:21 +0000 (10:14 +0200)
The APT archive used by the Ubuntu docker image can be slow, even timing
out sometimes, causing spurious failures of the containers-build job.
The Debian docker image uses deb.debian.org, which is backed by a
content distribution network.

One downside is that stretch only has GCC 6, whereas bionic had 7.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
.gitlab-ci.yml
.gitlab-ci/debian-install.sh [moved from .gitlab-ci/ubuntu-install.sh with 95% similarity]

index e3aa2a4..a77c403 100644 (file)
 # at "01" unless you have multiple updates on the same day :)
 variables:
   UPSTREAM_REPO: mesa/mesa
-  UBUNTU_TAG: "2019-04-02"
-  UBUNTU_VERSION: bionic
-  UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG"
+  DEBIAN_TAG: "2019-04-16"
+  DEBIAN_VERSION: stretch-slim
+  DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
 
 include:
   - project: 'wayland/ci-templates'
     ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd
-    file: '/templates/ubuntu.yml'
+    file: '/templates/debian.yml'
 
 stages:
   - containers-build
@@ -45,20 +45,20 @@ stages:
 
 # CONTAINERS
 
-ubuntu:
-  extends: .ubuntu@container-ifnot-exists
+debian:
+  extends: .debian@container-ifnot-exists
   stage: containers-build
   <<: *ci-run-policy
   variables:
     GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
-    UBUNTU_EXEC: 'bash .gitlab-ci/ubuntu-install.sh'
+    DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
 
 
 # BUILD
 
 .build:
   <<: *ci-run-policy
-  image: $UBUNTU_IMAGE
+  image: $DEBIAN_IMAGE
   stage: build+test
   cache:
     paths:
similarity index 95%
rename from .gitlab-ci/ubuntu-install.sh
rename to .gitlab-ci/debian-install.sh
index 7d83e6b..229a58f 100644 (file)
@@ -12,10 +12,14 @@ apt-get install -y \
       software-properties-common
 
 curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main"
+add-apt-repository "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-7 main"
+
+echo 'deb http://deb.debian.org/debian stretch-backports main' >/etc/apt/sources.list.d/backports.list
 
 apt-get update
-apt-get install -y \
+apt-get install -y -t stretch-backports \
+      bzip2 \
+      zlib1g-dev \
       pkg-config \
       libdrm-dev \
       libpciaccess-dev \