ci: greatly expand Travis-CI build matrix

Change-Id: I2455e2751db9cd4f660c38ad4696925b1fda5cd8
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index eb4e968..6448fbe 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -24,12 +24,12 @@
 
 if has Ubuntu $NODE_LABELS; then
     sudo apt-get -qq update
-    sudo apt-get -qq install build-essential pkg-config libboost-all-dev \
+    sudo apt-get -qy install build-essential pkg-config libboost-all-dev \
                              libcrypto++-dev libsqlite3-dev libssl-dev \
                              libpcap-dev
 
     if [[ $JOB_NAME == *"code-coverage" ]]; then
-        sudo apt-get -qq install lcov libgd-perl python-setuptools
+        sudo apt-get -qy install lcov libgd-perl python-setuptools
         sudo easy_install --upgrade gcovr
     fi
 fi
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index f0df3eb..6e42480 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -28,7 +28,7 @@
 # Configure/build in debug mode with tests
 if [[ $JOB_NAME == *"code-coverage" ]]; then
     COVERAGE="--with-coverage"
-elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then
+elif [[ -n $BUILD_WITH_ASAN || -z $TRAVIS ]]; then
     ASAN="--with-sanitizer=address"
 fi
 ./waf -j1 --color=yes configure --debug --with-tests $COVERAGE $ASAN
diff --git a/.travis.yml b/.travis.yml
index 508b081..abd85fe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,26 +3,138 @@
 env:
   global:
     - JOB_NAME=limited-build
+
 matrix:
   include:
+    # Linux/gcc
     - os: linux
       dist: trusty
       env:
-        - CXX=g++
+        - CXX=g++-4.8
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: ubuntu-toolchain-r-test
+          packages: g++-4.9
+      env:
+        - CXX=g++-4.9
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: ubuntu-toolchain-r-test
+          packages: g++-5
+      env:
+        - CXX=g++-5
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: ubuntu-toolchain-r-test
+          packages: g++-6
+      env:
+        - CXX=g++-6
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: ubuntu-toolchain-r-test
+          packages: g++-7
+      env:
+        - CXX=g++-7
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+
+    # Linux/clang
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          packages: clang-3.5
+      env:
+        - CXX=clang++-3.5
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          packages: clang-3.6
+      env:
+        - CXX=clang++-3.6
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources:
+            - llvm-toolchain-precise-3.7
+            - ubuntu-toolchain-r-test
+          packages: clang-3.7
+      env:
+        - CXX=clang++-3.7
         - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
     - os: linux
       dist: trusty
+      addons:
+        apt:
+          sources:
+            - llvm-toolchain-precise-3.8
+            - ubuntu-toolchain-r-test
+          packages: clang-3.8
       env:
-        - CXX=clang++
+        - CXX=clang++-3.8
         - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: llvm-toolchain-trusty-3.9
+          packages: clang-3.9
+      env:
+        - CXX=clang++-3.9
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+    - os: linux
+      dist: trusty
+      addons:
+        apt:
+          sources: llvm-toolchain-trusty-4.0
+          packages: clang-4.0
+      env:
+        - CXX=clang++-4.0
+        - NODE_LABELS="Linux Ubuntu Ubuntu-14.04"
+        - BUILD_WITH_ASAN=yes
+
+    # macOS/clang
+    # https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
     - os: osx
-      osx_image: xcode8.2
+      osx_image: xcode6.4
       env:
-        - CXX=clang++
+        - NODE_LABELS="OSX OSX-10.10"
+    - os: osx
+      osx_image: xcode7.3
+      env:
+        - NODE_LABELS="OSX OSX-10.11"
+        - BUILD_WITH_ASAN=yes
+    - os: osx
+      osx_image: xcode8.3
+      env:
         - NODE_LABELS="OSX OSX-10.12"
-notifications:
-  email:
-    on_success: always
-    on_failure: always
+        - BUILD_WITH_ASAN=yes
+
+before_script:
+  - ${CXX:-c++} --version
+
 script:
   - ./.jenkins