From 652146a93aa964af511b42a278d683a5dd6046b2 Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Wed, 21 Nov 2018 00:52:03 +0100 Subject: [PATCH] testing cloudsonar with travis --- .gitignore | 4 ++++ .travis.yml | 30 +++++++----------------------- Makefile | 3 +++ 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 5511908..91fc789 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ gmon\.out *.lzw + +\.scannerwork/ + +bw-output/ diff --git a/.travis.yml b/.travis.yml index 7e784ec..e9c6dc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ compiler: clang os: linux dist: trusty addons: + sonarcloud: + organization: "phundrak-github" + token: + secure: ${SONAR_TOKEN} apt: config: retries: true @@ -13,7 +17,6 @@ addons: packages: - g++-7 - clang-5.0 - matrix: include: # Linux Clang C++17 @@ -40,26 +43,7 @@ matrix: before_install: - eval "${MATRIX_EVAL}" - # OSX Clang - # - os: osx - # osx_image: xcode9.3 - # env: - # BUILD_TYPE=Release - # BIN_DIR=bin - # before_install: - # - brew update - # install: - # brew upgrade cmake - # - os: osx - # osx_image: xcode9.3 - # env: - # BUILD_TYPE=Debug - # BIN_DIR=debug - # before_install: - # brew update - # install: - # brew upgrade cmake script: - - cd build - - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. - - make -j + - make $BUILD_TYPE + - sonar-scanner -Dsonar.projectKey=Phundrak_lzw-assignment -Dsonar.sources=./src/ -Dsonar.cfamily.build-wrapper-output=bw-output + -Dsonar.host.url=https://sonarcloud.io diff --git a/Makefile b/Makefile index a3063ad..470bf34 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +all: + @mkdir -p build + @cd build && pwd && cmake -DCMAKE_BUILD_TYPE=Release .. && make release: @mkdir -p build @cd build && pwd && cmake -DCMAKE_BUILD_TYPE=Release .. && make