Commit a922b0aa authored by PRUVOST Florent's avatar PRUVOST Florent

adapt to add a complete cppcheck report, use new docker image hpclib/scalfmm

parent 1fd36eab
image: hpclib/hiepacs
image: hpclib/scalfmm
stages:
- build
......@@ -14,6 +14,7 @@ build:
-DSCALFMM_USE_BLAS=ON
-DSCALFMM_USE_FFT=ON
-DSCALFMM_USE_MPI=ON
-DSCALFMM_USE_STARPU=ON
-DSCALFMM_BUILD_EXAMPLES=ON
-DSCALFMM_BUILD_TESTS=OFF
-DSCALFMM_BUILD_UTESTS=OFF
......
......@@ -4,7 +4,7 @@
# We consider to be in ScalFMM's source code root
# 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
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_USE_STARPU=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
# make with clang analyzer (failure ...)
#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
......@@ -12,18 +12,20 @@ OMP_NUM_THREADS=4 ctest --no-compress-output -V -j 5 -D ExperimentalBuild -D Exp
cd ..
# capture coverage
lcov --directory . --capture --output-file scalfmm.lcov
lcov --directory Build --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:
#export SOURCES_TO_ANALYZE="Build/Src/ScalFmmConfig.h Examples Src Tests UTests"
export SOURCES_TO_ANALYZE="Src Examples"
export SOURCES_TO_ANALYZE="Src Examples Tests UTests"
# run cppcheck analysis
# commented for now because too long
#cppcheck -v -f --language=c++ --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingIncludeSystem -ISrc -IBuild/Src ${SOURCES_TO_ANALYZE} 2> scalfmm-cppcheck.xml
export CPPCHECK_INCLUDES="-IBuild/Src -ISrc -IContribs"
export SOURCES_TO_ANALYZE="Src Examples Tests UTests"
export CPPCHECK_UNDEF="-USCALFMM_USE_AVX -USCALFMM_USE_AVX2 -USCALFMM_USE_SSE -USCALFMM_USE_EZTRACE -U__AVXPE_INTEL_COMPILER -U__INTEL_COMPILER -U__MIC__ -U__SSEPE_INTEL_COMPILER -U__SSSE3__ -U__SSSE4_1__ -U_WIN32 -Umin"
cppcheck -v -f --language=c++ --std=c++14 --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingIncludeSystem ${CPPCHECK_UNDEF} ${CPPCHECK_INCLUDES} ${SOURCES_TO_ANALYZE} 2> scalfmm-cppcheck.xml
# run rats analysis
rats -w 3 --xml ${SOURCES_TO_ANALYZE} > scalfmm-rats.xml
......@@ -31,7 +33,7 @@ rats -w 3 --xml ${SOURCES_TO_ANALYZE} > scalfmm-rats.xml
# create the sonarqube config file
cat > sonar-project.properties << EOF
sonar.host.url=https://sonarqube.bordeaux.inria.fr/
sonar.login=9bdc3ada672c00725b1921657234b25c24be7bdc
sonar.login=`cat ~/.sonarqubetoken`
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
......@@ -39,11 +41,12 @@ sonar.projectKey=hiepacs:scalfmm:gitlab:develop
sonar.projectDescription=C++ library that implements a kernel independent Fast Multipole Method (LGPL+CeCILL-C)
sonar.projectVersion=2.0
sonar.language=c++
sonar.sources=Build/Src/ScalFmmConfig.h, Examples, Src, Tests, UTests
sonar.exclusions=Src/Kernels/FKernelConcepts.hpp, Tests/noDist/PerfTest/TestDriver.hpp
sonar.sourceEncoding=UTF-8
sonar.sources=Examples, Src, Tests, UTests
sonar.exclusions=Src/Kernels/FKernelConcepts.hpp, Tests/noDist/PerfTest/TestDriver.hpp
sonar.cxx.includeDirectories=$(echo | gcc -E -Wp,-v - 2>&1 | grep "^ " | tr '\n' ',')Build/Src,Src,Contribs
sonar.cxx.compiler.charset=UTF-8
sonar.cxx.compiler.regex=^(.*):(\\d+):\\d+: warning: (.*)\\[(.*)\\]$
sonar.cxx.compiler.regex=^(.*):(\\\d+):\\\d+: warning: (.*)\\\[(.*)\\\]$
sonar.cxx.compiler.reportPath=scalfmm-build.log
sonar.cxx.coverage.reportPath=scalfmm-coverage.xml
sonar.cxx.rats.reportPath=scalfmm-rats.xml
......
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