.gitlab-ci.yml 2.26 KB
Newer Older
Mohcine Chraibi's avatar
Mohcine Chraibi committed
1
variables:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
2 3 4
  nproc: "1"


Mohcine Chraibi's avatar
Mohcine Chraibi committed
5
before_script:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
6
  - nproc=`grep -c '^processor' /proc/cpuinfo`
7
  - echo "nproc = $nproc"
Mohcine Chraibi's avatar
Mohcine Chraibi committed
8
  - export LD_LIBRARY_PATH=$HOME/boost_1_61_0/stage/lib/:$LD_LIBRARY_PATH
Mohcine Chraibi's avatar
Mohcine Chraibi committed
9 10


Mohcine Chraibi's avatar
Mohcine Chraibi committed
11
#========== Pipeline ==================
Mohcine Chraibi's avatar
Mohcine Chraibi committed
12
stages:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
13
  - configure
14
  - compile
Mohcine Chraibi's avatar
Mohcine Chraibi committed
15
  - unit_test
Mohcine Chraibi's avatar
Mohcine Chraibi committed
16
  - dev_test
17
  # - juelich_tests
Mohcine Chraibi's avatar
Mohcine Chraibi committed
18
  # - rimea_tests
Mohcine Chraibi's avatar
Mohcine Chraibi committed
19
#=====================================
Mohcine Chraibi's avatar
Mohcine Chraibi committed
20

Mohcine Chraibi's avatar
Mohcine Chraibi committed
21
#============== configure ============
Mohcine Chraibi's avatar
Mohcine Chraibi committed
22 23
configure-linux:
  artifacts:
24
    name: "${CI_BUILD_NAME}_${CI_BUILD_ID}"
Mohcine Chraibi's avatar
Mohcine Chraibi committed
25 26
    expire_in: 1 hour
    paths:
27
      - build
28 29
      - lib
      - lib/Debug
30
      - bin
Mohcine Chraibi's avatar
Mohcine Chraibi committed
31
  script:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
32 33
    - mkdir -p build
    - cd build
34
    - cmake -DBUILD_TESTING=ON  ..
35
    - echo "configure | ${CI_PROJECT_DIR}"
Mohcine Chraibi's avatar
Mohcine Chraibi committed
36 37 38
  stage: configure
  tags:
    - linux
Mohcine Chraibi's avatar
Mohcine Chraibi committed
39
#============== compile ============
Mohcine Chraibi's avatar
Mohcine Chraibi committed
40 41 42
make-linux:
  dependencies:
    - configure-linux
43
  artifacts:
44
    name: "${CI_BUILD_NAME}_${CI_BUILD_ID}"
Mohcine Chraibi's avatar
Mohcine Chraibi committed
45
    expire_in: 1 hour # optional expiry
46
    paths:
47
      - build
48 49 50
      - lib
      - lib/Debug
      - bin
Mohcine Chraibi's avatar
Mohcine Chraibi committed
51

Mohcine Chraibi's avatar
Mohcine Chraibi committed
52
  stage: compile
53 54
  tags:
    - linux
Mohcine Chraibi's avatar
Mohcine Chraibi committed
55
  script:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
56
    - cd build
Mohcine Chraibi's avatar
Mohcine Chraibi committed
57
    - make -j$nproc
58
    - echo "compile | ${CI_PROJECT_DIR}"
Mohcine Chraibi's avatar
Mohcine Chraibi committed
59 60
  tags:
    - linux
Mohcine Chraibi's avatar
Mohcine Chraibi committed
61
#============== unit_test ============
Mohcine Chraibi's avatar
Mohcine Chraibi committed
62
test:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
63 64
  dependencies:
    - make-linux
Mohcine Chraibi's avatar
Mohcine Chraibi committed
65

Mohcine Chraibi's avatar
Mohcine Chraibi committed
66
  stage: unit_test
Mohcine Chraibi's avatar
Mohcine Chraibi committed
67
  script:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
68
    - cd build
Mohcine Chraibi's avatar
Mohcine Chraibi committed
69
    - ctest -R Boost
70
    - ctest -R clean
Mohcine Chraibi's avatar
Mohcine Chraibi committed
71 72
  tags:
    - linux
73
#============== dev_test ============
Mohcine Chraibi's avatar
Mohcine Chraibi committed
74
dev:
75 76 77 78 79 80 81 82 83
  dependencies:
    - make-linux

  stage: dev_test
  script:
    - cd build
    - ctest -R dev
  tags:
    - linux
Mohcine Chraibi's avatar
Mohcine Chraibi committed
84
#============== juelich ============
85 86 87
# verification:
#   dependencies:
#     - make-linux
Mohcine Chraibi's avatar
Mohcine Chraibi committed
88

89 90 91 92 93 94 95 96
#   stage: juelich_tests
#   script:
#     - cd build
#     - ctest -R juelich
#   only:
#     - develop
#   tags:
#     - linux
Mohcine Chraibi's avatar
Mohcine Chraibi committed
97
#=================================
Mohcine Chraibi's avatar
Mohcine Chraibi committed
98

Mohcine Chraibi's avatar
Mohcine Chraibi committed
99 100 101 102 103 104 105 106 107
#============== rimea ============
# verification:
#   dependencies:
#     - make-linux

#   stage: rimea
#   script:
#     - cd build
#     - ctest -R rimea
Mohcine Chraibi's avatar
Mohcine Chraibi committed
108
#   only:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
109 110 111 112 113 114 115 116 117 118 119 120 121 122
#     - develop
#   tags:
#     - linux
#=================================

#============== validation =======
# validation:
#   dependencies:
#     - make-linux

#   stage: validation
#   script:
#     - cd build
#     - ctest -R validation
Mohcine Chraibi's avatar
Mohcine Chraibi committed
123
#   only:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
124 125 126 127 128
#     - develop
#   tags:
#     - linux
#=================================

Mohcine Chraibi's avatar
Mohcine Chraibi committed
129
after_script:
130
  - echo "End CI" # todo: run report script and upload resulting pdf somewhere