Commit 0bbe30a0 authored by PRUVOST Florent's avatar PRUVOST Florent

add sonar-scanner analysis

parent b81349b6
......@@ -34,10 +34,52 @@ quark:
- ctest -V -R test_shm_s
doc:
artifacts:
name: chameleon_doc
expire_in: 1 week
paths:
- build/doc/doxygen
- build/doc/orgmode
script:
- source .gitlab-ci-env.sh
- git submodule update --init --recursive
- mkdir -p build
- cd build
- cmake .. -DCHAMELEON_ENABLE_DOC=ON -DCHAMELEON_ENABLE_EXAMPLES=OFF -DCHAMELEON_ENABLE_TESTING=OFF -DCHAMELEON_ENABLE_TIMING=OFF
- make
- cmake .. -DCHAMELEON_ENABLE_DOC=ON -DCHAMELEON_ENABLE_EXAMPLE=OFF -DCHAMELEON_ENABLE_TESTING=OFF -DCHAMELEON_ENABLE_TIMING=OFF
- make doc
analysis:
artifacts:
name: chameleon_analysis
expire_in: 1 week
paths:
- chameleon-build.log
- coverage/
- chameleon-coverage.xml
- chameleon-cppcheck.xml
- chameleon-rats.xml
- sonar.log
script:
- source .gitlab-ci-env.sh
- git submodule update --init --recursive
- mkdir -p build
- cd build
- export CFLAGS="-O0 -g -fPIC -fdiagnostics-show-option --coverage -fno-inline -Wall"
- export LDFLAGS="--coverage"
- cmake .. -DCHAMELEON_USE_MPI=ON -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" -DCMAKE_VERBOSE_MAKEFILE=ON
- make -j5 | tee ../chameleon-build.log
- STARPU_SILENT=1 ctest --no-compress-output || /usr/bin/true
- lcov --directory . --capture --output-file ../chameleon.lcov
- cd ..
- genhtml -o coverage chameleon.lcov
- lcov_cobertura.py chameleon.lcov --output chameleon-coverage.xml
- rm coreblas/include/cblas.h coreblas/include/lapacke.h coreblas/include/lapacke_config.h coreblas/include/lapacke_mangling.h
- export SOURCES_TO_ANALYZE=`bash -c 'find ./build/coreblas ./build/example ./build/include ./build/runtime ./build/compute ./build/control ./build/hqr ./build/testing ./build/timing -regex ".*\.c\|.*\.h" |xargs && \
find . -path ./build -prune -o -regex "^[^z]*\.c" -print && \
find . -path ./build -prune -o -regex "^[^z]*\.h" -print'`
- export UNDEFINITIONS="-UCHAMELEON_USE_CUBLAS_V2 -UCHAMELEON_USE_OPENCL"
- cppcheck -v -f --language=c --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingIncludeSystem ${UNDEFINITIONS} ${SOURCES_TO_ANALYZE} ${SOURCES_TO_EXCLUDE} 2> chameleon-cppcheck.xml
- rats -w 3 --xml ${SOURCES_TO_ANALYZE} > chameleon-rats.xml
- sonar-scanner -X -Dsonar.login=077ef775a8b4fe9ba722497ef0511ca6dcfb3fcd > sonar.log
only:
- master
\ No newline at end of file
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