image: hpclib/hiepacs stages: - build - test - analysis before_script: - . /etc/profile.d/spack.sh build_pampa: stage: build artifacts: expire_in: 42 minutes 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 2>&1 | tee ../pampa-build.log only: - branches - master@PaMPA/PaMPA build_pampa_doc: stage: build artifacts: expire_in: 42 minutes untracked: true script: - cd build - cmake .. -DPAMPA_BUILD_DOC=ON - make -j5 doc 2>&1 > pampa-build-doc.log only: - branches - master@PaMPA/PaMPA test_pampa: stage: test dependencies: - build_pampa artifacts: expire_in: 42 minutes paths: - pampa-coverage.xml script: - cd build - make test - cd .. - lcov --directory build --capture --output-file pampa.lcov - lcov_cobertura.py pampa.lcov --output pampa-coverage.xml only: - branches - master@PaMPA/PaMPA sonar: stage: analysis dependencies: - build_pampa - test_pampa artifacts: expire_in: 1 day paths: - pampa-cppcheck.xml - pampa-rats.xml - sonar-project.properties - sonar.log script: - ./ext/analysis.sh - sonar-scanner -X > sonar.log only: - master@PaMPA/PaMPA