diff --git a/.travis.yml b/.travis.yml index 22b15b9..8abb914 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..330a2f9 --- /dev/null +++ b/sonar-project.properties @@ -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 \ No newline at end of file