diff options
author | Daniel Neus <[email protected]> | 2016-08-04 19:25:28 +0200 |
---|---|---|
committer | Daniel Neus <[email protected]> | 2016-08-18 13:21:37 +0200 |
commit | 5f3a96204a4888367af45828bfe05cc05dd6ef95 (patch) | |
tree | c3bd9d507fc8910bd723df4b03b63f94d6f4b142 /.travis.yml | |
parent | fedaf80bad502a2f0c85b7acd0e2ead37c6c8ced (diff) |
SonarQube integration / Travis CI changes
Travis CI changes:
- Run SonarQube analysis for commits on master and in pull requests
- Upgrade Travis CI build image to Ubuntu 14.04 and use standard system toolchain
- Update lcov to 1.12 for coverage
- Set git clone depth to 5 commits
- Use 'builtin' ccache Travis CI addon
- Add SonarQube badge to readme
- No longer necessary to overwrite CXX variable in build.sh when using gcc
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml index 352d736e4..e71e76d2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +dist: trusty + +sudo: required + language: cpp # BEGIN BUILD MATRIX @@ -24,12 +28,22 @@ compiler: - clang - gcc +git: + depth: 5 + env: + global: + # SONAR_TOKEN for accessing the SonarQube server + - secure: "VezRbHFg6kllV5WG06M3tG3aHJaC3xrMylJ6RCVbL+uz2JeralVCqV7eIk4fVb9cu83Li+weEa0AJj0wkxpIUJ+vUh5F65L6gSWSbgHP7muOSVsmnEc6KvX4n3av/ZGe4geSmsxqh2pd/2xI1h7KioGRhKeqaZIdjVgWgGJW2iQ=" + # GITHUB_TOKEN for posting found issues as comments in the PR that's beeing analyzed by SonarQube + - secure: "Th0mBSkUCDqu+EA6F7zA6DCSDZBNunfndANyq06BwaFlj71daWWjthwYFsfg3T5N2ZmI+PsULQQpOirCnJt1lbNHhMVJwZPkW0JnjoxbSNpSI2+nHv7+GO9X9WjK0LRFawiQu8WxmLMQDA+0oR0BERSFKc3gmbuav9fDfla0dXg=" + matrix: - TARGETOS="native" MODULES="all" BOOST="n" BUILD_MODE="shared" - TARGETOS="native" MODULES="all" BOOST="n" BUILD_MODE="static" - TARGETOS="native" MODULES="all" BOOST="n" BUILD_MODE="coverage" - TARGETOS="native" MODULES="all" BOOST="n" BUILD_MODE="sanitizer" + - TARGETOS="native" MODULES="all" BOOST="n" BUILD_MODE="sonarqube" - TARGETOS="native" MODULES="all" BOOST="y" BUILD_MODE="shared" - TARGETOS="native" MODULES="all" BOOST="y" BUILD_MODE="static" - TARGETOS="native" MODULES="all" BOOST="y" BUILD_MODE="coverage" @@ -62,12 +76,14 @@ matrix: - os: linux env: TARGETOS="native" MODULES="min" BOOST="y" BUILD_MODE="static" - # No coverage and sanitizer on clang + # No coverage, sanitizer and sonarqube on clang - compiler: clang env: TARGETOS="native" MODULES="all" BOOST="n" BUILD_MODE="coverage" - compiler: clang env: TARGETOS="native" MODULES="all" BOOST="n" BUILD_MODE="sanitizer" - compiler: clang + env: TARGETOS="native" MODULES="all" BOOST="n" BUILD_MODE="sonarqube" + - compiler: clang env: TARGETOS="native" MODULES="all" BOOST="y" BUILD_MODE="coverage" - compiler: clang env: TARGETOS="native" MODULES="all" BOOST="y" BUILD_MODE="sanitizer" @@ -89,8 +105,9 @@ matrix: # END BUILD MATRIX cache: + ccache: true directories: - - $HOME/.ccache + - $HOME/.sonar/cache install: - ./src/scripts/ci/travis/install.sh @@ -105,19 +122,7 @@ notifications: email: [email protected] addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - ccache - - g++-4.8 - - libssl-dev - - libsqlite3-dev - - zlib1g-dev - - libbz2-dev - - liblzma-dev - - python2 - - python3 + sonarqube: true coverity_scan: project: |