@@ -1,15 +1,23 @@
language: c
# We need at least cmake 2.12, this means we need to use trusty.
# Precise's glibc, etc predates what we are willing to support.
-# No reason for sudo.
+# sudo is required to get the trusty image, and at present to enable llvm 3.9
sudo: required
dist: trusty
addons:
+ # We run our builds sequentially in one VM rather than try and use the
+ # matrix feature. This is because Travis is unreasonably inefficient
+ # doing this APT setup pass.
apt:
sources:
+ # sourceline because travis won't white list trusty builds, and hasn't
+ # whitelisted 3.9
+ - sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main"
+ key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key"
- ubuntu-toolchain-r-test
packages:
- build-essential
+ - clang-3.9
- cmake
- debhelper
- gcc
@@ -25,16 +33,22 @@ addons:
# 32 bit support packages
- gcc-multilib
- lib32gcc-6-dev
+
script:
- - mkdir build build32
+ - mkdir build build-clang build32
- cd build
# The goal is warning free compile on latest gcc.
- CC=gcc-6 CFLAGS=-Werror cmake -GNinja ..
- ninja
+ # .. and latest clang
+ - cd ../build-clang
+ - CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
+ - ninja
+
# 32 bit build
- cd ../build32
- # travis's trusty is not configured in a way that enables all32 bit
+ # travis's trusty is not configured in a way that enables all 32 bit
# packages. We could fix this with some sudo stuff.. For now turn off libnl
- CC=gcc-6 CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0
- ninja
Now that the build runs warning free on clang 3.9 as well. clang has a different set of static checker type warnings. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> --- .travis.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)