]> xenbits.xensource.com Git - xen.git/commitdiff
automation: add clang and lld 8 tests to gitlab
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 10 Jun 2019 16:32:46 +0000 (18:32 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 11 Jun 2019 10:06:52 +0000 (11:06 +0100)
Using clang and lld 8 requires installing the packages from the
official llvm apt repositories, so modify the Debian Docker files for
stretch and unstable to add the llvm repo and install clang and lld
from it.

Also add some jobs to test building Xen with clang 8 and lld.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
automation/build/debian/stretch-llvm-8.list [new file with mode: 0644]
automation/build/debian/stretch.dockerfile
automation/build/debian/unstable-llvm-8.list [new file with mode: 0644]
automation/build/debian/unstable.dockerfile
automation/gitlab-ci/build.yaml
automation/scripts/build

diff --git a/automation/build/debian/stretch-llvm-8.list b/automation/build/debian/stretch-llvm-8.list
new file mode 100644 (file)
index 0000000..09fe843
--- /dev/null
@@ -0,0 +1,3 @@
+# Strech LLVM 8 repos
+deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-8 main
+deb-src http://apt.llvm.org/stretch/ llvm-toolchain-stretch-8 main
index daf8c9d38431efe5009294f40e1f31d546eb332b..44e6eee07f5c523575469ece6817972945b9e23d 100644 (file)
@@ -42,6 +42,19 @@ RUN apt-get update && \
         wget \
         git \
         nasm \
+        gnupg \
+        && \
+        apt-get autoremove -y && \
+        apt-get clean && \
+        rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
+
+RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
+COPY stretch-llvm-8.list /etc/apt/sources.list.d/
+
+RUN apt-get update && \
+    apt-get --quiet --yes install \
+        clang-8 \
+        lld-8 \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
diff --git a/automation/build/debian/unstable-llvm-8.list b/automation/build/debian/unstable-llvm-8.list
new file mode 100644 (file)
index 0000000..dc119fa
--- /dev/null
@@ -0,0 +1,3 @@
+# Unstable LLVM 8 repos
+deb http://apt.llvm.org/unstable/ llvm-toolchain-8 main
+deb-src http://apt.llvm.org/unstable/ llvm-toolchain-8 main
index 7762cf97ab1e4f60a2af98697a8039dcd9b75edb..a1428a3df045b4f3f520ff054ac697f3cc90475b 100644 (file)
@@ -42,6 +42,19 @@ RUN apt-get update && \
         wget \
         git \
         nasm \
+        gnupg \
+        && \
+        apt-get autoremove -y && \
+        apt-get clean && \
+        rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
+
+RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
+COPY unstable-llvm-8.list /etc/apt/sources.list.d/
+
+RUN apt-get update && \
+    apt-get --quiet --yes install \
+        clang-8 \
+        lld-8 \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
index dd5722a5bbdb6fc7ff2518caf80dd612948f4f5d..17de3b18487e9b97ff6ca83d180c088c9fd9df31 100644 (file)
     CXX: clang++
     clang: y
 
+.clang-8-tmpl:
+  variables: &clang-8
+    CC: clang-8
+    CXX: clang++-8
+    LD: ld.lld-8
+    clang: y
+
 .x86-64-build-tmpl:
   <<: *build
   variables:
   variables:
     <<: *clang
 
+.clang-8-x86-64-build:
+  extends: .x86-64-build
+  variables:
+    <<: *clang-8
+
+.clang-8-x86-64-build-debug:
+  extends: .x86-64-build-debug
+  variables:
+    <<: *clang-8
+
 .clang-x86-32-build:
   extends: .x86-32-build
   variables:
@@ -219,6 +236,16 @@ debian-stretch-clang-debug:
   variables:
     CONTAINER: debian:stretch
 
+debian-stretch-clang-8:
+  extends: .clang-8-x86-64-build
+  variables:
+    CONTAINER: debian:stretch
+
+debian-stretch-clang-8-debug:
+  extends: .clang-8-x86-64-build-debug
+  variables:
+    CONTAINER: debian:stretch
+
 debian-stretch-gcc:
   extends: .gcc-x86-64-build
   variables:
@@ -259,6 +286,16 @@ debian-unstable-clang-debug:
   variables:
     CONTAINER: debian:unstable
 
+debian-unstable-clang-8:
+  extends: .clang-8-x86-64-build
+  variables:
+    CONTAINER: debian:unstable
+
+debian-unstable-clang-8-debug:
+  extends: .clang-8-x86-64-build-debug
+  variables:
+    CONTAINER: debian:unstable
+
 debian-unstable-gcc:
   extends: .gcc-x86-64-build
   variables:
index 8a57e097a99c9701f2643a6c8946614b4ca2366f..83c44e6ce758dd991eefa23c946be6c258a822de 100755 (executable)
@@ -19,7 +19,7 @@ fi
 cfgargs=()
 cfgargs+=("--enable-docs")
 
-if [[ "${CC}" == "clang" ]]; then
+if [[ "${CC}" == "clang"* ]]; then
     # SeaBIOS cannot be built with clang
     cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
     # iPXE cannot be built with clang