Skip to content

Commit

Permalink
Adding travis and sonarcloud config. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex952 authored Mar 28, 2019
1 parent 61e04dc commit 141a72c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
language: cpp
compiler: gcc
os:
- linux
sudo: required

branches:
only:
- master

addons:
sonarcloud:
organization: "neueda-blu-corner"

before_install:
- sudo apt-get update
- sudo apt-get install -y vera++ cppcheck valgrind gcovr unzip

before_script:
- wget https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
- unzip build-wrapper-linux-x86.zip
- export PATH=$PATH:`pwd`/build-wrapper-linux-x86
- mkdir build
- cd build
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/install/lib

script:
- cmake -DCOVERAGE=ON -DTESTS=ON ../
- build-wrapper-linux-x86-64 --out-dir ./Linux-output make install
- ./install/bin/unittest
- gcov `find ./src/ ./test -regextype posix-egrep -regex ".*\\.(o)"`
- cd ../
- sonar-scanner
8 changes: 8 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sonar.organization=neueda-blu-corner
sonar.projectKey=blu-corner_logger
sonar.projectName=logger
sonar.sources=./src

sonar.cfamily.build-wrapper-output=./build/Linux-output
sonar.cfamily.gcov.reportsPath=./build
sonar.sourceEncoding=UTF-8

0 comments on commit 141a72c

Please sign in to comment.