- only trigger sonarqube on linux
- regenerate a new token, and put it in the travis config on website
(Otherwise the token is exposed in our git, which is not a good idea)
- use the right make target
- Commit the sonar config file, stupid me
- if [ ${TRAVIS_OS_NAME} = 'linux' ] ; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 50 ; fi
script:
- cmake -Denable_documentation=OFF -Denable_coverage=OFF -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=OFF -Denable_compile_optimizations=OFF -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=ON . && make VERBOSE=1 && ctest --output-on-failure --timeout 100
- if [ ${TRAVIS_OS_NAME} = 'linux' ] ; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 50 ; fi
script:
- cmake -Denable_documentation=OFF -Denable_coverage=OFF -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=OFF -Denable_compile_optimizations=OFF -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=ON . && make VERBOSE=1 && ctest --output-on-failure --timeout 100
- - ./tools/internal/travis-sonarqube.sh
+ - if [ ${TRAVIS_OS_NAME} = 'linux' ] ; then ./tools/internal/travis-sonarqube.sh ; fi
# branches:
# only:
# - master
# branches:
# only:
# - master
--- /dev/null
+sonar.projectKey=simgrid
+sonar.projectName=Scanner for the SimGrid project. http://simgrid.org
+sonar.projectVersion=3.13.90
+
+# Comma-separated paths to directories with sources (required)
+sonar.sources=src
+
+# Language, needed for SonarQube < 4.2
+sonar.language=cpp
+
+# The build-wrapper output dir
+sonar.cfamily.build-wrapper-output=bw-outputs
+
+# Encoding of the source files
+sonar.sourceEncoding=UTF-8
-# Run SonarQube on travis.
+# Run SonarQube on travis. First version was given per email by one of the SonarQube engineer.
# Install required software
installSonarQubeScanner() {
# Install required software
installSonarQubeScanner() {
# triggers the compilation through the build wrapper to gather compilation database
./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-outputs
# triggers the compilation through the build wrapper to gather compilation database
./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-outputs
-# and finally execute the actual SonarQube analysis
-sonar-scanner -Dsonar.host.url=https://nemo.sonarqube.org -Dsonar.login=7f3a6edf2fc5fcfa22c3fb95ce13597dc4b1fb15
+# and finally execute the actual SonarQube analysis (the SONAR_TOKEN is set from the travis web interface, to not expose it)
+sonar-scanner -Dsonar.host.url=https://nemo.sonarqube.org -Dsonar.login=$SONAR_TOKEN