travis: improve build process and expand build matrix

Make a build heriarchy to reduce images size.
Add Android Things builds to build matrix.
Drop gcc-4 builds, use gcc-5 and gcc-6 instead.
Add SonarQube static analysis scans.

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
This commit is contained in:
Nicolas Oliver
2017-07-10 07:28:18 -07:00
parent 98811b0fb7
commit ab4eeea61e
14 changed files with 722 additions and 168 deletions

View File

@ -1,12 +1,11 @@
dist: trusty
sudo: required
language: cpp
compiler:
- clang
- gcc-4.8
- gcc
- gcc-6
env:
- TARGET=doc
@ -15,6 +14,33 @@ env:
- TARGET=node4
- TARGET=node5
- TARGET=node6
- TARGET=android
- TARGET=sonar-scan
matrix:
exclude:
- compiler: clang
env: TARGET=java
- compiler: gcc
env: TARGET=android
- compiler: clang
env: TARGET=sonar-scan
include:
- compiler: gcc
env: GCC_VERSION=6 TARGET=doc
- compiler: gcc
env: GCC_VERSION=6 TARGET=python
- compiler: gcc
env: GCC_VERSION=6 TARGET=java
- compiler: gcc
env: GCC_VERSION=6 TARGET=node4
- compiler: gcc
env: GCC_VERSION=6 TARGET=node5
- compiler: gcc
env: GCC_VERSION=6 TARGET=node6
allow_failures:
- compiler: gcc
env: TARGET=sonar-scan
services:
- docker
@ -26,12 +52,12 @@ before_install:
- sudo mv docker-compose /usr/local/bin
before_script:
- if [ "$CC" == "gcc-4.8" ]; then export CC=gcc-4.8; fi
- if [ "$CXX" == "g++-4.8" ]; then export CXX=g++-4.8; fi
- if [ "$CC" == "gcc-6" ]; then export CC=gcc-6; fi
- if [ "$CXX" == "g++-6" ]; then export CXX=g++-6; fi
- if [ "$CC" == "gcc" ]; then export CC=gcc-${GCC_VERSION:-5}; fi
- if [ "$CXX" == "g++" ]; then export CXX=g++-${GCC_VERSION:-5}; fi
- if [ "$CC" == "clang" ]; then export CC=clang-3.8; fi
- if [ "$CXX" == "clang++" ]; then export CXX=clang++-3.8; fi
- docker-compose build base
- if [ "$TARGET" == "android" ]; then docker-compose build java; fi
- docker-compose build ${TARGET}
script: