Try to run sonarqube/sonarcloud in travis...

This commit is contained in:
Godzil 2018-02-01 14:39:21 +00:00
parent 223b0080c8
commit 8f51c4712c
2 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,4 @@
dist: trusty
language: c
os:
- linux
@ -13,6 +14,10 @@ addons:
- curl
- xorg-dev
- libglu1-mesa-dev
sonarcloud:
organisation: "godzil-github"
token:
secure: ${SONARCLOUD_TOKEN}
compiler:
- clang
@ -24,12 +29,23 @@ script:
- cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=OFF -DCOVERALLS=OFF -DCMAKE_BUILD_TYPE=Release ..
- cmake --build .
- cd ..
- mkdir sonar
- cd sonar
- cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=OFF -DCOVERALLS=OFF -DCMAKE_BUILD_TYPE=Release ..
- make clean
- build-wrapper-linux-x86-64 --out-dir bw-output cmake --build .
- cd ..
- sonar-scanner
- mkdir coverage
- cd coverage
- cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=OFF -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug ..
- cmake --build .
- cmake --build . --target coveralls
cache:
directories:
- '$HOME/.sonar/cache'
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install glew; fi

6
sonar-project.properties Normal file
View File

@ -0,0 +1,6 @@
sonar.projectKey=peTI-NESulator
sonar.projectName=peTI-NESulator
sonar.projectVersion=git-edition
sonar.sources=src
sonar.cfamily.build-wrapper-output=sonar/bw-output