diff mbox series

[15/15] travis: Add clang specific build job

Message ID 20200612022452.371685-16-oohall@gmail.com
State Accepted
Headers show
Series [01/15] test/qemu: Update command line arguments | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (fe70fbb78d33abea788a3221bc409a7c50c019c3)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Oliver O'Halloran June 12, 2020, 2:24 a.m. UTC
Right now clang doesn't support the -ffixed-r<number> compiler options
that we rely on for the skiboot cpu_thread pointer so it can't build
skiboot.

Remove the clang builds from the debian-unstable and ubuntu-latest and
builds in favour of a clang specific job. This allows those jobs to pass
normally and gives us as specific job to monitor to see when support
for those options lands in clang.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
Right now even make check fails, but we might as well have it in the
matrix.
---
 .travis.yml                        |  3 +++
 opal-ci/Dockerfile-clang           |  6 ++++++
 opal-ci/Dockerfile-debian-unstable |  2 +-
 opal-ci/Dockerfile-ubuntu-18.04    |  2 +-
 opal-ci/Dockerfile-ubuntu-20.04    |  2 +-
 opal-ci/Dockerfile-ubuntu-latest   |  2 +-
 opal-ci/build-clang.sh             | 10 ++++++++++
 opal-ci/build-ubuntu-latest.sh     |  5 -----
 8 files changed, 23 insertions(+), 9 deletions(-)
 create mode 100644 opal-ci/Dockerfile-clang
 create mode 100755 opal-ci/build-clang.sh
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 860d204d0465..6eaf0a92d7dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,11 +26,14 @@  jobs:
     - env: RUN_ON_CONTAINER=fedora-rawhide
     - env: RUN_ON_CONTAINER=debian-unstable
     - env: RUN_ON_CONTAINER=ubuntu-latest
+    - env: RUN_ON_CONTAINER=clang
   exclude:
     - os: linux-ppc64le
       env: RUN_ON_CONTAINER=centos7
     - os: linux-ppc64le
       env: RUN_ON_CONTAINER=docs
+    - os: linux-ppc64le
+      env: RUN_ON_CONTAINER=clang
 
 install:
     - docker build --pull -t ${RUN_ON_CONTAINER} -f opal-ci/Dockerfile-${RUN_ON_CONTAINER} .
diff --git a/opal-ci/Dockerfile-clang b/opal-ci/Dockerfile-clang
new file mode 100644
index 000000000000..02a0bf54e6df
--- /dev/null
+++ b/opal-ci/Dockerfile-clang
@@ -0,0 +1,6 @@ 
+FROM ubuntu:rolling
+ENV DEBIAN_FRONTEND    noninteractive
+RUN apt-get update -qq
+RUN apt-get install -y clang device-tree-compiler
+COPY . /build/
+WORKDIR /build
diff --git a/opal-ci/Dockerfile-debian-unstable b/opal-ci/Dockerfile-debian-unstable
index 04ff179b5e9d..13c157fe7c75 100644
--- a/opal-ci/Dockerfile-debian-unstable
+++ b/opal-ci/Dockerfile-debian-unstable
@@ -5,7 +5,7 @@  RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
 RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget \
 	    curl xterm device-tree-compiler build-essential gcc python g++ pkg-config \
 	    libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind \
-	    libtcl8.6 clang qemu-system-ppc opal-utils
+	    libtcl8.6 qemu-system-ppc opal-utils
 RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
diff --git a/opal-ci/Dockerfile-ubuntu-18.04 b/opal-ci/Dockerfile-ubuntu-18.04
index 1743df2f507e..3a031c3e9e76 100644
--- a/opal-ci/Dockerfile-ubuntu-18.04
+++ b/opal-ci/Dockerfile-ubuntu-18.04
@@ -2,7 +2,7 @@  FROM ubuntu:18.04
 ENV DEBIAN_FRONTEND    noninteractive
 RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
-RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6 clang qemu-system-ppc
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6 qemu-system-ppc
 RUN if [ `arch` = "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
 RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
diff --git a/opal-ci/Dockerfile-ubuntu-20.04 b/opal-ci/Dockerfile-ubuntu-20.04
index 2770951667f8..515ec5c9a3f3 100644
--- a/opal-ci/Dockerfile-ubuntu-20.04
+++ b/opal-ci/Dockerfile-ubuntu-20.04
@@ -3,7 +3,7 @@  ENV DEBIAN_FRONTEND    noninteractive
 RUN apt-get update -qq
 RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
-RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6 clang qemu-system-ppc
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6 qemu-system-ppc
 RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
diff --git a/opal-ci/Dockerfile-ubuntu-latest b/opal-ci/Dockerfile-ubuntu-latest
index ce9cbdda371c..577d7a48af2f 100644
--- a/opal-ci/Dockerfile-ubuntu-latest
+++ b/opal-ci/Dockerfile-ubuntu-latest
@@ -2,7 +2,7 @@  FROM ubuntu:rolling
 ENV DEBIAN_FRONTEND    noninteractive
 RUN apt-get update -qq
 RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
-RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6 clang qemu-system-ppc
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6 qemu-system-ppc
 RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
 RUN if [ `arch` = "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
diff --git a/opal-ci/build-clang.sh b/opal-ci/build-clang.sh
new file mode 100755
index 000000000000..09377c06d5f5
--- /dev/null
+++ b/opal-ci/build-clang.sh
@@ -0,0 +1,10 @@ 
+#!/bin/bash
+
+set -uo pipefail
+set -e
+set -vx
+
+MAKE_J=$(nproc)
+
+make -j${MAKE_J} CC=clang
+make -j${MAKE_J} CC=clang check
diff --git a/opal-ci/build-ubuntu-latest.sh b/opal-ci/build-ubuntu-latest.sh
index 16c33a9f39b7..ea27bba3288a 100755
--- a/opal-ci/build-ubuntu-latest.sh
+++ b/opal-ci/build-ubuntu-latest.sh
@@ -28,8 +28,3 @@  rm -rf builddir
 mkdir builddir
 make SRC=$(pwd) -f ../Makefile -C builddir -j${MAKE_J}
 make clean
-
-echo "Building with clang..."
-make clean
-make -j${MAKE_J} CC=clang
-make -j${MAKE_J} CC=clang check