Commit 2444c9e5 authored by PRUVOST Florent's avatar PRUVOST Florent

add gitlab ci files

parent ae791859
Pipeline #23187 failed with stages
in 14 seconds
image: hpclib/hiepacs
stages:
- build
- test
- analysis
before_script:
- . /etc/profile.d/spack.sh
build_pampa:
stage: build
artifacts:
untracked: true
script:
- cd build
- scan-build -plist --intercept-first --analyze-headers -o ../analyzer_reports
cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_C_FLAGS="-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option" -DCMAKE_EXE_LINKER_FLAGS="--coverage"
- scan-build -plist --intercept-first --analyze-headers -o ../analyzer_reports make -j5 | tee ../pampa-build.log
test_pampa:
stage: test
dependencies:
- build_pampa
artifacts:
paths:
- pampa-coverage.xml
script:
- cd build
- make test
- lcov --directory . --capture --output-file pampa.lcov
- lcov_cobertura.py pampa.lcov --output ../pampa-coverage.xml
sonar:
stage: analysis
dependencies:
- build_pampa
- test_pampa
artifacts:
paths:
- pampa-cppcheck.xml
- pampa-rats.xml
- sonar-project.properties
- sonar.log
script:
- ./ext/analysis.sh
only:
- master@PaMPA/PaMPA-p
#!/bin/sh
export CPPCHECK_INCLUDES="-Ibuild/src/libpampa -Isrc/libpampa -Isrc/pampa-remesh -Isrc/samples/C/include -Isrc/remeshers/gmsh -Isrc/remeshers/tetgen -Isrc/remeshers/common -Isrc/remeshers/mmg3d/libpampa-mmg3d4 -Isrc/remeshers/mmg3d/libpampa-mmg3d"
export SOURCES_TO_ANALYZE="src"
cppcheck -j4 -v --force --language=c --platform=unix64 --enable=all --xml --xml-version=2 --suppress=missingIncludeSystem ${CPPCHECK_INCLUDES} ${SOURCES_TO_ANALYZE} 2> scotch-cppcheck.xml
rats -w 3 --xml ${SOURCES_TO_ANALYZE} > scotch-rats.xml
cat > sonar-project.properties << EOF
sonar.host.url=https://sonarqube.bordeaux.inria.fr/sonarqube
sonar.login=$SONARQUBE_LOGIN
sonar.links.homepage=https://gitlab.inria.fr/PaMPA/PaMPA-p
sonar.links.scm=https://gitlab.inria.fr/PaMPA/PaMPA-p.git
sonar.links.ci=https://gitlab.inria.fr/PaMPA/PaMPA-p/pipelines
sonar.links.issue=https://gitlab.inria.fr/PaMPA/PaMPA-p/issues
sonar.projectKey=tadaam:pampa:gitlab:master
sonar.projectDescription=a parallel library for handling, redistributing and remeshing unstructured meshes on distributed-memory architectures, using any sequential remesher
sonar.projectVersion=1.1
sonar.language=c
sonar.sourceEncoding=UTF-8
sonar.sources=src
sonar.c.includeDirectories=$(echo | gcc -E -Wp,-v - 2>&1 | grep "^ " | tr '\n' ',')build/src/libpampa,src/libpampa,src/pampa-remesh,src/samples/C/include,src/remeshers/gmsh,src/remeshers/tetgen,src/remeshers/common,src/remeshers/mmg3d/libpampa-mmg3d4,src/remeshers/mmg3d/libpampa-mmg3d
sonar.c.errorRecoveryEnabled=true
sonar.c.compiler.charset=UTF-8
sonar.c.compiler.parser=GCC
sonar.c.compiler.regex=^(.*):(\\\d+):\\\d+: warning: (.*)\\\[(.*)\\\]$
sonar.c.compiler.reportPath=pampa-build.log
sonar.c.coverage.reportPath=pampa-coverage.xml
#sonar.c.cppcheck.reportPath=pampa-cppcheck.xml
sonar.c.rats.reportPath=pampa-rats.xml
sonar.c.clangsa.reportPath=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