Commit 70770636 authored by PRUVOST Florent's avatar PRUVOST Florent

adapt ci to use new sonarqube

parent baf36974
......@@ -47,6 +47,6 @@ sonar:
paths:
- sonar.log
script:
- sonar-scanner -X -Dsonar.login=c1416c617418f890576a747223ac9f6cd86353d6 > sonar.log
- sonar-scanner -X > sonar.log
only:
- develop@solverstack/ScalFMM
......@@ -5,15 +5,19 @@
# build with proper options
cd Build && cmake .. -DSCALFMM_USE_LOG=ON -DSCALFMM_USE_ASSERT=ON -DSCALFMM_USE_SSE=OFF -DSCALFMM_USE_BLAS=ON -DSCALFMM_USE_FFT=ON -DSCALFMM_USE_MPI=ON -DSCALFMM_BUILD_EXAMPLES=ON -DSCALFMM_BUILD_TESTS=ON -DSCALFMM_BUILD_UTESTS=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_CXX_FLAGS="-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option -fno-inline" -DCMAKE_EXE_LINKER_FLAGS="--coverage" -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6
# build and run tests + coverage + submit to cdash
OMP_NUM_THREADS=4 ctest --no-compress-output -V -j 5 -D ExperimentalBuild -D ExperimentalTest -D ExperimentalCoverage -D ExperimentalSubmit 2>&1 | tee ../scalfmm-build.log
# make with clang analyzer
scan-build -plist --intercept-first --analyze-headers -o analyzer_reports make 2>&1 | tee scalfmm-build.log
# ctest : build and run tests + coverage + submit to cdash
OMP_NUM_THREADS=4 ctest --no-compress-output -V -j 5 -D ExperimentalBuild -D ExperimentalTest -D ExperimentalCoverage -D ExperimentalSubmit 2>&1 | tee -a ../scalfmm-build.log
cd ..
# capture coverage
lcov --directory . --capture --output-file scalfmm.lcov
lcov_cobertura.py scalfmm.lcov --output scalfmm-coverage.xml
# to get it displayed and captured by gitlab to expose the badge on the main page
gcovr -r $PWD
# filter sources:
## filter sources:
export SOURCES_TO_ANALYZE="Build/Src/ScalFmmConfig.h Examples Src Tests UTests"
# run cppcheck analysis
......@@ -25,14 +29,14 @@ rats -w 3 --xml ${SOURCES_TO_ANALYZE} > scalfmm-rats.xml
# create the sonarqube config file
cat > sonar-project.properties << EOF
sonar.host.url=https://hpclib-sed.bordeaux.inria.fr/sonarqube-dev
sonar.host.url=https://sonarqube.bordeaux.inria.fr
sonar.links.homepage=https://gitlab.inria.fr/solverstack/ScalFMM
sonar.links.scm=https://fpruvost@gitlab.inria.fr/solverstack/ScalFMM.git
sonar.links.issue=https://gitlab.inria.fr/solverstack/ScalFMM/issues
sonar.projectKey=scalfmm
sonar.projectName=Scalfmm
sonar.projectDescription=C++ library that implements a kernel independent Fast Multipole Method (LGPL+CeCILL-C)
sonar.projectVersion=devel
sonar.branch.name=develop
sonar.language=c++
sonar.sources=Build/Src/ScalFmmConfig.h, Examples, Src, Tests, UTests
sonar.exclusions=Src/Kernels/FKernelConcepts.hpp, Tests/noDist/PerfTest/TestDriver.hpp
......@@ -43,4 +47,5 @@ sonar.cxx.compiler.reportPath=scalfmm-build.log
sonar.cxx.coverage.reportPath=scalfmm-coverage.xml
#sonar.cxx.cppcheck.reportPath=scalfmm-cppcheck.xml
sonar.cxx.rats.reportPath=scalfmm-rats.xml
sonar.c.clangsa.reportPath=build/analyzer_reports/*/*.plist
EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment