From: tbaudier Date: Fri, 9 Feb 2018 15:18:59 +0000 (+0100) Subject: Update Travis file to manage cache failure X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=03a3dde77c4de04ce6f0af2f8d6eda4cf0fb6e41;p=clitk.git Update Travis file to manage cache failure Add sonarcloud project --- diff --git a/.travis.yml b/.travis.yml index 028ccb8..1705663 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,6 +47,12 @@ notifications: on_success: never on_failure: never +addons: + sonarcloud: + organization: "open-vv-github" + token: + secure: "cvFKxhrmarSAieav+qev+QdQiyx17jMyQggTBWigSiSeeYPWEUloyF5VnC+sL7o6Kh21ooXKhgvN+J1wB1FEwV8tqoOGoQRaqWpFwRbjqo1qn1r2J6+XMcmaAq6KOeUYzYdk+j8/ZnpkjhxVZIejXtVQpNg02QuqIO8ZmToWPgcKU6VCK33jbN1zZc2TXXbV7KyC6wdX0dZ3Y9lbaBtBGUr7C8QXmT4MUqtuwjQMymTDEBTuhyNn1sp+kEOOV7C6sji58q9h1C+r61+vpcQ5wmJDLr8Gy/uQhm3vCjqNNenHLRLnW5ITRgjL1pqhd499ppSFuGI76wAo5XMMkwTbYJRqUU56z09ZdwyVebsDgMJID/jgtQtclPPkiDOFs40+/gSNQzcOsO8tBNVOC9i/AFIDjbkRFAf6Uq+w34C3lf+7eVVlwGqaifSTTEm/Q/FyVWdGoFDANmbMhodfODT6gm16CQT0WkmQ67bKEu0sqKz6HrEXQ2R8xG8smNzpSRR1KbPv13Xd6Xb7xkOklBc9x2ccSyR6wXqPO9vJrJWNqyGMFKFlpZ2d8zTDtyuAvFxBBYykAmVW55g1VuNeRrIeynMBzib0HSRZhxUBDW8znVeKoeZLQxNihMZnXj9W996lreInheN9ySTwANfx20+b3AMBsRRhuIi5EPmeYTM/kR4=" + branches: only: - master @@ -72,11 +78,7 @@ before_install: - if test $TRAVIS_OS_NAME == linux; then if [[ "$QT_VERSION" == "5.5.1" ]] ; then QTDIR="/opt/qt55" && PATH="$PATH:$QTDIR/bin" && qt55-env.sh ; fi; fi - if test $TRAVIS_OS_NAME == osx ; then export HOMEBREW_QT_VERSION=$(brew list --versions qt | rev | cut -d' ' -f1 | rev); fi - if test $TRAVIS_OS_NAME == osx ; then brew install ccache; fi -- if test $TRAVIS_OS_NAME == osx ; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi -- if test $TRAVIS_OS_NAME == osx ; then if [[ "$QT_VERSION" == "5.5.1" ]] ; then ln -s /usr/local/Cellar/qt@5.5/5.5.1_1/mkspecs /usr/local/mkspecs; fi; fi -- if test $TRAVIS_OS_NAME == osx ; then if [[ "$QT_VERSION" == "5.5.1" ]] ; then ln -s /usr/local/Cellar/qt@5.5/5.5.1_1/plugins /usr/local/plugins; fi; fi -- if test $TRAVIS_OS_NAME == osx ; then if [[ "$QT_VERSION" == "4.8.7" ]] ; then ln -s /usr/local/Cellar/qt@4/4.8.7_1/mkspecs /usr/local/mkspecs; fi; fi -- if test $TRAVIS_OS_NAME == osx ; then if [[ "$QT_VERSION" == "4.8.7" ]] ; then ln -s /usr/local/Cellar/qt@4/4.8.7_1/plugins /usr/local/plugins; fi; fi +- if test $TRAVIS_OS_NAME == osx ; then export PATH="/usr/local/opt/qt/bin:/usr/local/opt/ccache/libexec:$PATH"; fi - if test $TRAVIS_OS_NAME == osx ; then qmake -v; fi cache: ccache @@ -93,14 +95,19 @@ directories: - $HOME/itk-4.5-build - $HOME/itk-4.9.1 - $HOME/itk-4.9.1-build + - '$HOME/.sorar/cache' before_script: +- export DO_BUILD_VTK=false +- export DO_BUILD_ITK=false - if test $TRAVIS_OS_NAME == linux ; then sudo ln -s /usr/bin/x86_64-linux-gnu/libpq.so /usr/bin/libpq.so; fi -- echo $PATH -- $SCRIPTS/travis_build_vtk.sh -- $SCRIPTS/travis_build_itk.sh +- if ! test -e ${VTK_SOURCE_DIR}/CMakeLists.txt; then rm -fr $VTK_SOURCE_DIR; DO_BUILD_VTK=true; fi +- if ! test -e ${ITK_SOURCE_DIR}/CMakeLists.txt; then rm -fr $ITK_SOURCE_DIR; DO_BUILD_ITK=true; fi #Install vtk and itk (different version) script: -- echo "coucou"; -- $SCRIPTS/travis_build_vv.sh +- 'if [ $DO_BUILD_VTK == true ]; then $SCRIPTS/travis_build_vtk.sh || travis_terminate 1; + elif [ $DO_BUILD_ITK == true ]; then $SCRIPTS/travis_build_itk.sh || travis_terminate 1; + else $SCRIPTS/travis_build_vv.sh || travis_terminate 1; fi' +- if [test $TRAVIS_OS_NAME == linux] && [ $DO_BUILD_VTK == false ] && [ $DO_BUILD_ITK == false ]; then build-wrapper-linux-x86-64 --out-dir bw-output make clean all; fi +- if [test $TRAVIS_OS_NAME == linux] && [ $DO_BUILD_VTK == false ] && [ $DO_BUILD_ITK == false ]; then sonar-scanner; fi diff --git a/README.md b/README.md index a657222..424183f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ VV, a 4D image viewer, see : [creatis](http://vv.creatis.insa-lyon.fr) ### Status -[![Build Status](https://travis-ci.org/open-vv/vv.svg?branch=master)](https://travis-ci.org/open-vv/vv) +[![Build Status](https://travis-ci.org/open-vv/vv.svg?branch=master)](https://travis-ci.org/open-vv/vv) [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=open-vv&metric=alert_status)](https://sonarcloud.io/dashboard/index/open-vv) ### Download You can download the binaries here: diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..8292092 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,24 @@ +sonar.projectKey=open-vv +sonar.projectName=VV +sonar.projectVersion=1.4 + +# ===================================================== +# Meta-data for the project +# ===================================================== + +sonar.links.homepage=https://github.com/open-vv/vv +sonar.links.ci=https://travis-ci.org/open-vv/vv +sonar.links.scm=https://github.com/open-vv/vv +sonar.links.issue=https://github.com/open-vv/vv/issues + + +# ===================================================== +# Properties that will be shared amongst all modules +# ===================================================== + +# SQ standard properties +sonar.sources=. + +# Properties specific to the C/C++ analyzer: +sonar.cfamily.build-wrapper-output=bw-output +sonar.cfamily.gcov.reportsPath=. \ No newline at end of file diff --git a/travis/travis_build_qt.sh b/travis/travis_build_qt.sh index 7b3ef0b..38bb5a2 100755 --- a/travis/travis_build_qt.sh +++ b/travis/travis_build_qt.sh @@ -14,10 +14,9 @@ elif [ "$QT_VERSION" == "5.5.1" ]; then if test $TRAVIS_OS_NAME == linux ; then sudo add-apt-repository --yes ppa:beineri/opt-qt551-trusty; fi if test $TRAVIS_OS_NAME == linux ; then sudo apt-get update -qq; fi if test $TRAVIS_OS_NAME == linux ; then sudo apt-get -y --force-yes install qt55tools; fi - - if test $TRAVIS_OS_NAME == osx ; then brew install qt@5.5; fi - if test $TRAVIS_OS_NAME == osx ; then brew link qt@5.5 --force; fi - if test $TRAVIS_OS_NAME == osx ; then brew linkapps qt@5.5; fi fi +if test $TRAVIS_OS_NAME == osx ; then brew install qt5; fi +if test $TRAVIS_OS_NAME == osx ; then brew link qt5 --force; fi +if test $TRAVIS_OS_NAME == osx ; then brew linkapps qt5; fi