.gitlab-ci.yml 1.54 KB
Newer Older
PRUVOST Florent's avatar
PRUVOST Florent committed
1 2 3 4 5 6 7 8 9 10 11 12 13
image: hpclib/hiepacs

stages:
  - build
  - test
  - analysis

before_script:
  - . /etc/profile.d/spack.sh

build_pampa:
  stage: build
  artifacts:
14
    expire_in: 42 minutes
PRUVOST Florent's avatar
PRUVOST Florent committed
15 16 17 18 19
    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"
20
    - scan-build -plist --intercept-first --analyze-headers -o ../analyzer_reports make -j5 2>&1 | tee ../pampa-build.log
21 22 23
  only:
    - branches
    - master@PaMPA/PaMPA-p
PRUVOST Florent's avatar
PRUVOST Florent committed
24

PRUVOST Florent's avatar
PRUVOST Florent committed
25 26
build_pampa_doc:
  stage: build
27 28 29
  artifacts:
    expire_in: 42 minutes
    untracked: true
PRUVOST Florent's avatar
PRUVOST Florent committed
30 31 32
  script:
    - cd build
    - cmake .. -DPAMPA_BUILD_DOC=ON
PRUVOST Florent's avatar
PRUVOST Florent committed
33
    - make -j5 doc 2>&1 > pampa-build-doc.log
PRUVOST Florent's avatar
PRUVOST Florent committed
34 35 36 37
  only:
    - branches
    - master@PaMPA/PaMPA-p

PRUVOST Florent's avatar
PRUVOST Florent committed
38 39 40 41 42
test_pampa:
  stage: test
  dependencies:
    - build_pampa
  artifacts:
43
    expire_in: 42 minutes
PRUVOST Florent's avatar
PRUVOST Florent committed
44 45 46 47 48
    paths:
      - pampa-coverage.xml
  script:
    - cd build
    - make test
PRUVOST Florent's avatar
PRUVOST Florent committed
49 50 51
    - cd ..
    - lcov --directory build --capture --output-file pampa.lcov
    - lcov_cobertura.py pampa.lcov --output pampa-coverage.xml
52 53 54
  only:
    - branches
    - master@PaMPA/PaMPA-p
PRUVOST Florent's avatar
PRUVOST Florent committed
55 56 57 58 59 60 61

sonar:
  stage: analysis
  dependencies:
    - build_pampa
    - test_pampa
  artifacts:
62
    expire_in: 1 day
PRUVOST Florent's avatar
PRUVOST Florent committed
63 64 65 66 67 68 69
    paths:
      - pampa-cppcheck.xml
      - pampa-rats.xml
      - sonar-project.properties
      - sonar.log
  script:
    - ./ext/analysis.sh
70
    - sonar-scanner -X > sonar.log
71 72
  only:
    - master@PaMPA/PaMPA-p