diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c140df3e840daced7c2af64e4ccb9c7bdebb73a7..8cfd388e807c1a5cfedcfc5e08859c78e0d3be5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -275,12 +275,6 @@ sonarqube: - sonar.log script: - cat *.log > chameleon_build.log - - lcov -a $PWD/chameleon_starpu.lcov - -a $PWD/chameleon_starpu_simgrid.lcov - -a $PWD/chameleon_quark.lcov - -a $PWD/chameleon_parsec.lcov - -o $PWD/chameleon.lcov - - lcov_cobertura.py chameleon.lcov --output chameleon_coverage.xml - ./tools/analysis.sh only: - master@solverstack/chameleon @@ -297,7 +291,7 @@ pages: - cd build - cmake .. -DCHAMELEON_ENABLE_DOC=ON - make doc -j5 - - mv docs/doxygen ../public/ - - mv docs/orgmode ../public/ + - mv doc/doxygen ../public/ + - mv doc/orgmode ../public/ only: - master@solverstack/chameleon diff --git a/cmake_modules/gitlab-ci-initial-cache.cmake b/cmake_modules/gitlab-ci-initial-cache.cmake index f472d6142feb70cf2e2058f5099f43451bcd9693..3f2d2bd71bdec0bfb64208e1d09f510713ca7b5c 100644 --- a/cmake_modules/gitlab-ci-initial-cache.cmake +++ b/cmake_modules/gitlab-ci-initial-cache.cmake @@ -2,5 +2,7 @@ set(BUILD_SHARED_LIBS "ON" CACHE BOOL "") set(CMAKE_INSTALL_PREFIX "$ENV{PWD}/install" CACHE PATH "") set(CMAKE_VERBOSE_MAKEFILE "ON" CACHE BOOL "") -option(MORSE_ENABLE_WARNING "Enable warning messages" ON) -option(MORSE_ENABLE_COVERAGE "Enable flags for coverage test" ON) +option(MORSE_ENABLE_WARNING "Enable warning messages" ON) +option(MORSE_ENABLE_COVERAGE "Enable flags for coverage test" ON) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "") diff --git a/tools/analysis.sh b/tools/analysis.sh index 87175281d7dcc344e9acd9132a5369980877e5a4..a68733b072a057cbcdd8502a5f6997d9b1383485 100755 --- a/tools/analysis.sh +++ b/tools/analysis.sh @@ -11,10 +11,20 @@ # - exclude cblas.h and lapacke-.h because not really part of chameleon and make cppcheck analysis too long ./tools/find_sources.sh +# Generate coverage xml output +lcov -a $PWD/chameleon_starpu.lcov + -a $PWD/chameleon_starpu_simgrid.lcov + -a $PWD/chameleon_quark.lcov + -a $PWD/chameleon_parsec.lcov + -o $PWD/chameleon.lcov +lcov_cobertura.py chameleon.lcov --output chameleon_coverage.xml + # Undefine this because not relevant in our configuration export UNDEFINITIONS="-UCHAMELEON_USE_OPENCL -UWIN32 -UWIN64 -U_MSC_EXTENSIONS -U_MSC_VER -U__SUNPRO_C -U__SUNPRO_CC -U__sun -Usun -U__cplusplus" + # run cppcheck analysis cppcheck -v -f --language=c --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingInclude ${UNDEFINITIONS} --file-list=./filelist.txt 2> chameleon_cppcheck.xml + # run rats analysis rats -w 3 --xml `cat filelist.txt` > chameleon_rats.xml @@ -46,6 +56,7 @@ sonar.c.coverage.reportPath=chameleon_coverage.xml sonar.c.cppcheck.reportPath=chameleon_cppcheck.xml sonar.c.rats.reportPath=chameleon_rats.xml sonar.c.clangsa.reportPath=build/analyzer_reports/*/*.plist +sonar.c.jsonCompilationDatabase=build/compile_commands.json EOF # run sonar analysis + publish on sonarqube-dev