.gitlab-ci.yml 1.71 KB
Newer Older
1 2 3 4 5 6
image: hpclib/hiepacs

stages:
  - build
  - test
  - sonar
Mathieu Faverge's avatar
Mathieu Faverge committed
7
#  - deploy
8 9 10 11 12

before_script:
  - git submodule update --init --recursive
  - mkdir -p build

Mathieu Faverge's avatar
Mathieu Faverge committed
13
hqr_build:
14 15 16 17 18 19 20
  stage: build
  artifacts:
    name: hqr_build
    expire_in: 42 minutes
    untracked: true
  script:
    - cd build
Mathieu Faverge's avatar
Mathieu Faverge committed
21
    - cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/../install -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_C_FLAGS="-O0 -g -fPIC --coverage -Wall -fdiagnostics-show-option -fno-inline" -DCMAKE_EXE_LINKER_FLAGS="--coverage" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | tee ../hqr-build.log
22
    - ctest --no-compress-output -V -j 5
Mathieu Faverge's avatar
Mathieu Faverge committed
23 24
            -D ExperimentalBuild
            -D ExperimentalSubmit | tee -a hqr_build.log
25
    - make install | tee -a ../hqr-build.log
Mathieu Faverge's avatar
Mathieu Faverge committed
26 27 28
  only:
    - branches
    - master@solverstack/hqr
29

Mathieu Faverge's avatar
Mathieu Faverge committed
30
hqr_test:
31 32
  stage: test
  dependencies:
Mathieu Faverge's avatar
Mathieu Faverge committed
33
    - hqr_build
34
  artifacts:
Mathieu Faverge's avatar
Mathieu Faverge committed
35
    name: hqr_test
36
    expire_in: 42 minutes
37
    untracked: true
38 39
  script:
    - source install/bin/hqr_env.sh
40 41
    - (cd build &&
       eval "ctest -D ExperimentalTest
Mathieu Faverge's avatar
Mathieu Faverge committed
42
            -D ExperimentalCoverage
43 44 45
            -D ExperimentalSubmit | tee ../hqr-tests.log")
    - lcov --directory . --capture --output-file hqr.lcov
    - lcov --summary hqr.lcov | tee -a hqr-gcov.log
46

Mathieu Faverge's avatar
Mathieu Faverge committed
47
hqr_sonar:
48 49
  stage: sonar
  dependencies:
Mathieu Faverge's avatar
Mathieu Faverge committed
50 51
  - hqr_build
  - hqr_test
52 53 54 55 56 57 58 59 60 61
  artifacts:
    name: hqr_sonar
    expire_in: 1 week
    paths:
      - hqr-coverage.xml
      - hqr-cppcheck.xml
      - hqr-rats.xml
      - sonar.log
  script:
    - ./analysis.sh
62 63
#  only:
#    - master@solverstack/hqr
64 65

# pages:
Mathieu Faverge's avatar
Mathieu Faverge committed
66
#   stage: deploy
67 68 69 70 71 72 73 74
#   script:
#     - cmake . -DBUILD_DOCUMENTATION=ON
#     - make
#     - mv docs/out/html ../public/
#   artifacts:
#     paths:
#       - public
#   only:
Mathieu Faverge's avatar
Mathieu Faverge committed
75
#     - master@solverstack/hqr