]> Creatis software - clitk.git/commitdiff
Update Travis file to manage cache failure
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 9 Feb 2018 15:18:59 +0000 (16:18 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 9 Feb 2018 15:18:59 +0000 (16:18 +0100)
Add sonarcloud project

.travis.yml
README.md
sonar-project.properties [new file with mode: 0644]
travis/travis_build_qt.sh

index 028ccb8063448a9812256f031d75d54697a08f56..1705663215b4fb0e1e0fa52373555a14a768d240 100644 (file)
@@ -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
index a657222f662e501fe7ec01495852ea2aa85bfd02..424183f0b799e81df7b6902f9363935b4f8cbf18 100644 (file)
--- 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 (file)
index 0000000..8292092
--- /dev/null
@@ -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
index 7b3ef0bb54c84814040528014b82b19d05f79dc6..38bb5a24a254877dd3dcbc59cd1251ca161a53cc 100755 (executable)
@@ -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