.gitlab-ci.yml 8.9 KB
Newer Older
1 2
image: hpclib/hiepacs

3
stages:
4 5
  - build
  - test
6 7
  - analyse
  - deploy
8

9 10
before_script:
  - git submodule update --init --recursive
11
  - source .gitlab-ci-env.sh $SIMU
PRUVOST Florent's avatar
PRUVOST Florent committed
12
  - mkdir -p build-$VERSION
13

14
.build_script_template: &build_script
15
  stage: build
16
  tags: ["large"]
17
  script:
18 19
    - echo BUILD_OPTIONS $BUILD_OPTIONS
    - echo VERSION $VERSION
PRUVOST Florent's avatar
PRUVOST Florent committed
20 21
    - (cd build-$VERSION &&
       scan-build -plist --intercept-first --exclude CMakeFiles --analyze-headers -o analyzer_reports
PRUVOST Florent's avatar
PRUVOST Florent committed
22
       cmake -C ../cmake_modules/gitlab-ci-initial-cache.cmake .. $BUILD_OPTIONS &&
PRUVOST Florent's avatar
PRUVOST Florent committed
23
       scan-build -plist --intercept-first --exclude CMakeFiles --analyze-headers -o analyzer_reports
24 25 26 27
       ctest --no-compress-output -V -j 5
             -D ExperimentalBuild
             -D ExperimentalSubmit
             | tee ../chameleon_${VERSION}.log)
PRUVOST Florent's avatar
PRUVOST Florent committed
28
    - (cd build-$VERSION &&
29
       make install | tee -a ../chameleon_${VERSION}.log &&
30
       rm install/ -r)
31

32
.test_script_template: &test_script
33
  stage: test
34
  tags: ["large"]
35
  script:
36 37
    - echo TESTS_RESTRICTION $TESTS_RESTRICTION
    - echo VERSION $VERSION
PRUVOST Florent's avatar
PRUVOST Florent committed
38
    - (cd build-$VERSION &&
39 40
       eval "ctest --no-compress-output -V
             $TESTS_RESTRICTION
41 42 43
             -D ExperimentalTest
             -D ExperimentalCoverage
             -D ExperimentalSubmit
44
             | tee -a ../chameleon_${VERSION}.log")
PRUVOST Florent's avatar
PRUVOST Florent committed
45
    - lcov --directory build-$VERSION --capture --output-file ./chameleon_${VERSION}.lcov
46

PRUVOST Florent's avatar
PRUVOST Florent committed
47
build_openmp:
48 49
  <<: *build_script
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
50
    name: build_openmp
51 52
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
53 54
      - build-$VERSION
      - chameleon_openmp.log
55
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
56 57
    BUILD_OPTIONS: "-DCHAMELEON_SCHED=OPENMP"
    VERSION: openmp
58

PRUVOST Florent's avatar
PRUVOST Florent committed
59
build_parsec:
60 61
  <<: *build_script
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
62
    name: build_parsec
63 64
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
65 66
      - build-$VERSION
      - chameleon_parsec.log
67
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
68 69
    BUILD_OPTIONS: "-DCHAMELEON_SCHED=PARSEC"
    VERSION: parsec
70 71 72 73 74 75 76

build_quark:
  <<: *build_script
  artifacts:
    name: build_quark
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
77
      - build-$VERSION
78 79
      - chameleon_quark.log
  variables:
80
    BUILD_OPTIONS: "-DCHAMELEON_SCHED=QUARK"
81 82
    VERSION: quark

PRUVOST Florent's avatar
PRUVOST Florent committed
83
build_starpu:
84 85
  <<: *build_script
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
86
    name: build_starpu
87 88
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
89 90
      - build-$VERSION
      - chameleon_starpu.log
91
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
92 93
    BUILD_OPTIONS: "-DCHAMELEON_USE_CUDA=ON -DCHAMELEON_USE_MPI=ON"
    VERSION: starpu
94

PRUVOST Florent's avatar
PRUVOST Florent committed
95
build_starpu_simgrid:
96 97
  <<: *build_script
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
98
    name: build_starpu_simgrid
99 100
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
101 102
      - build-$VERSION
      - chameleon_starpu_simgrid.log
103
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
104 105 106
    SIMU: simu
    BUILD_OPTIONS: "-DCHAMELEON_SIMULATION=ON -DCHAMELEON_USE_CUDA=ON -DCHAMELEON_USE_MPI=OFF"
    VERSION: starpu_simgrid
107

PRUVOST Florent's avatar
PRUVOST Florent committed
108
test_openmp_branches:
109 110
  <<: *test_script
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
111 112
    TESTS_RESTRICTION: "-R \"test_shm_s|test_mpi_s\""
    VERSION: openmp
113
  dependencies:
PRUVOST Florent's avatar
PRUVOST Florent committed
114
    - build_openmp
115
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
116
    name: test_openmp
117 118
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
119 120 121
      - build-$VERSION
      - chameleon_openmp.log
      - chameleon_openmp.lcov
122 123 124 125
  only:
    - branches
  except:
    - master
PRUVOST Florent's avatar
PRUVOST Florent committed
126
    - /^ci-.*$/
127

PRUVOST Florent's avatar
PRUVOST Florent committed
128
test_openmp_master:
129 130
  <<: *test_script
  variables:
Mathieu Faverge's avatar
Mathieu Faverge committed
131
    TESTS_RESTRICTION: "-R \"_shm_|_mpi_\""
PRUVOST Florent's avatar
PRUVOST Florent committed
132
    VERSION: openmp
133
  dependencies:
PRUVOST Florent's avatar
PRUVOST Florent committed
134
    - build_openmp
135
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
136
    name: test_openmp
137 138
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
139 140 141
      - build-$VERSION
      - chameleon_openmp.log
      - chameleon_openmp.lcov
142 143
  only:
    - master@solverstack/chameleon
PRUVOST Florent's avatar
PRUVOST Florent committed
144
    - /^ci-.*$/
145

PRUVOST Florent's avatar
PRUVOST Florent committed
146
test_parsec_branches:
147 148
  <<: *test_script
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
149 150
    TESTS_RESTRICTION: "-R \"test_shm_s|test_mpi_s\""
    VERSION: parsec
151
  dependencies:
PRUVOST Florent's avatar
PRUVOST Florent committed
152
    - build_parsec
153
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
154
    name: test_parsec
155 156
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
157 158 159
      - build-$VERSION
      - chameleon_parsec.log
      - chameleon_parsec.lcov
160 161 162 163
  only:
    - branches
  except:
    - master
PRUVOST Florent's avatar
PRUVOST Florent committed
164
    - /^ci-.*$/
165

PRUVOST Florent's avatar
PRUVOST Florent committed
166
test_parsec_master:
167 168
  <<: *test_script
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
169 170
    TESTS_RESTRICTION: "-R \"_shm_|_mpi_\""
    VERSION: parsec
171
  dependencies:
PRUVOST Florent's avatar
PRUVOST Florent committed
172
    - build_parsec
173
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
174
    name: test_parsec
175 176
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
177 178 179
      - build-$VERSION
      - chameleon_parsec.log
      - chameleon_parsec.lcov
180 181
  only:
    - master@solverstack/chameleon
PRUVOST Florent's avatar
PRUVOST Florent committed
182
    - /^ci-.*$/
183 184 185 186 187 188 189 190 191 192 193 194

test_quark_branches:
  <<: *test_script
  variables:
    TESTS_RESTRICTION: "-R \"test_shm_s|test_mpi_s\""
    VERSION: quark
  dependencies:
    - build_quark
  artifacts:
    name: test_quark
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
195
      - build-$VERSION
196 197 198 199 200 201
      - chameleon_quark.log
      - chameleon_quark.lcov
  only:
    - branches
  except:
    - master
PRUVOST Florent's avatar
PRUVOST Florent committed
202
    - /^ci-.*$/
203 204 205 206

test_quark_master:
  <<: *test_script
  variables:
Mathieu Faverge's avatar
Mathieu Faverge committed
207
    TESTS_RESTRICTION: "-R \"_shm_|_mpi_\""
208 209 210 211 212 213 214
    VERSION: quark
  dependencies:
    - build_quark
  artifacts:
    name: test_quark
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
215
      - build-$VERSION
216 217 218 219
      - chameleon_quark.log
      - chameleon_quark.lcov
  only:
    - master@solverstack/chameleon
PRUVOST Florent's avatar
PRUVOST Florent committed
220
    - /^ci-.*$/
221

PRUVOST Florent's avatar
PRUVOST Florent committed
222
test_starpu_branches:
223 224
  <<: *test_script
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
225 226
    TESTS_RESTRICTION: "-R \"test_shm_s|test_mpi_s|time_ooc_shm_s|time_ooc_mpi_s\""
    VERSION: starpu
227
  dependencies:
PRUVOST Florent's avatar
PRUVOST Florent committed
228
    - build_starpu
229
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
230
    name: test_starpu
231 232
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
233 234 235
      - build-$VERSION
      - chameleon_starpu.log
      - chameleon_starpu.lcov
236 237 238 239
  only:
    - branches
  except:
    - master
PRUVOST Florent's avatar
PRUVOST Florent committed
240
    - /^ci-.*$/
241

PRUVOST Florent's avatar
PRUVOST Florent committed
242
test_starpu_master:
243 244
  <<: *test_script
  variables:
Mathieu Faverge's avatar
Mathieu Faverge committed
245
    TESTS_RESTRICTION: "-R \"_shm_|_mpi_\""
PRUVOST Florent's avatar
PRUVOST Florent committed
246
    VERSION: starpu
247
  dependencies:
PRUVOST Florent's avatar
PRUVOST Florent committed
248
    - build_starpu
249
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
250
    name: test_starpu
251 252
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
253 254 255
      - build-$VERSION
      - chameleon_starpu.log
      - chameleon_starpu.lcov
256 257
  only:
    - master@solverstack/chameleon
PRUVOST Florent's avatar
PRUVOST Florent committed
258
    - /^ci-.*$/
259

PRUVOST Florent's avatar
PRUVOST Florent committed
260
test_starpu_simgrid_branches:
261 262
  <<: *test_script
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
263 264 265
    SIMU: simu
    TESTS_RESTRICTION: "-R simu"
    VERSION: starpu_simgrid
266
  dependencies:
PRUVOST Florent's avatar
PRUVOST Florent committed
267
    - build_starpu_simgrid
268
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
269
    name: test_starpu_simgrid
270 271
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
272 273 274
      - build-$VERSION
      - chameleon_starpu_simgrid.log
      - chameleon_starpu_simgrid.lcov
275 276 277 278
  only:
    - branches
  except:
    - master
PRUVOST Florent's avatar
PRUVOST Florent committed
279
    - /^ci-.*$/
280

PRUVOST Florent's avatar
PRUVOST Florent committed
281
test_starpu_simgrid_master:
282 283
  <<: *test_script
  variables:
PRUVOST Florent's avatar
PRUVOST Florent committed
284 285 286
    SIMU: simu
    TESTS_RESTRICTION: "-R simu"
    VERSION: starpu_simgrid
287
  dependencies:
PRUVOST Florent's avatar
PRUVOST Florent committed
288
    - build_starpu_simgrid
289
  artifacts:
PRUVOST Florent's avatar
PRUVOST Florent committed
290
    name: test_starpu_simgrid
291 292
    expire_in: 48 hours
    paths:
PRUVOST Florent's avatar
PRUVOST Florent committed
293 294 295
      - build-$VERSION
      - chameleon_starpu_simgrid.log
      - chameleon_starpu_simgrid.lcov
296 297
  only:
    - master@solverstack/chameleon
PRUVOST Florent's avatar
PRUVOST Florent committed
298
    - /^ci-.*$/
299

Mathieu Faverge's avatar
Mathieu Faverge committed
300 301 302 303 304 305 306
coverage:
  stage: analyse
  dependencies:
    - test_starpu_branches
    - test_starpu_simgrid_branches
    - test_quark_branches
    - test_parsec_branches
307
    - test_openmp_branches
Mathieu Faverge's avatar
Mathieu Faverge committed
308 309 310 311 312
  script:
      - lcov -a chameleon_starpu.lcov
             -a chameleon_starpu_simgrid.lcov
             -a chameleon_quark.lcov
             -a chameleon_parsec.lcov
313
             -a chameleon_openmp.lcov
Mathieu Faverge's avatar
Mathieu Faverge committed
314 315 316 317
             -o chameleon.lcov
      - lcov --summary chameleon.lcov
  only:
    - branches
318 319
  except:
    - master
PRUVOST Florent's avatar
PRUVOST Florent committed
320
    - /^ci-.*$/
Mathieu Faverge's avatar
Mathieu Faverge committed
321

PRUVOST Florent's avatar
PRUVOST Florent committed
322
.coverity:
323
  stage: analyse
324
  tags: ["large"]
325 326 327 328 329 330
  dependencies: []
  artifacts:
    name: chameleon_coverity
    expire_in: 1 week
    paths:
      - chameleon.tgz
PRUVOST Florent's avatar
PRUVOST Florent committed
331 332
  variables:
    VERSION: coverity
333
  script:
PRUVOST Florent's avatar
PRUVOST Florent committed
334
    - (cd build-$VERSION &&
335 336 337 338 339 340 341 342 343 344 345 346 347
       cmake -C ../cmake_modules/gitlab-ci-initial-cache.cmake .. -DCHAMELEON_USE_CUDA=ON -DCHAMELEON_USE_MPI=ON &&
       cov-build --dir ../cov-int make -j 4)
    - tar czvf chameleon.tgz cov-int
    - curl --form token=$COVERITY_TOKEN
           --form email=florent.pruvost@inria.fr
           --form file=@chameleon.tgz
           --form version="`git rev-parse --short HEAD`"
           --form description=""
           https://scan.coverity.com/builds?project=Chameleon
  only:
    - master@solverstack/chameleon

sonarqube:
348
  stage: analyse
349
  tags: ["large"]
350
  dependencies:
351 352 353
    - test_starpu_master
    - test_starpu_simgrid_master
    - test_quark_master
354
    - test_parsec_master
355
    - test_openmp_master
356 357 358 359
  artifacts:
    name: chameleon_analysis
    expire_in: 1 week
    paths:
360 361 362 363
      - chameleon_build.log
      - chameleon_coverage.xml
      - chameleon_cppcheck.xml
      - chameleon_rats.xml
364
      - sonar.log
PRUVOST Florent's avatar
PRUVOST Florent committed
365 366
  variables:
    VERSION: sonarqube
367
  script:
368
    - cat *.log > chameleon_build.log
PRUVOST Florent's avatar
PRUVOST Florent committed
369
    - ./tools/analysis.sh
370 371
  only:
    - master@solverstack/chameleon
PRUVOST Florent's avatar
PRUVOST Florent committed
372
    - /^ci-.*$/
373

374
pages:
375
  stage: deploy
376
  dependencies: []
377 378 379 380
  artifacts:
    name: chameleon_doc
    expire_in: 1 week
    paths:
381
      - public
PRUVOST Florent's avatar
PRUVOST Florent committed
382 383
  variables:
    VERSION: pages
384
  script:
PRUVOST Florent's avatar
PRUVOST Florent committed
385
    - cd build-$VERSION
386
    - cmake .. -DCHAMELEON_ENABLE_DOC=ON
387
    - make doc -j5
388 389 390
    - mv doc/orgmode/ ../public/
    - ln -s ../public/users_guide.html ../public/index.html
    - mv doc/doxygen/out/html/ ../public/doxygen/
391
  only:
392
    - master@solverstack/chameleon
PRUVOST Florent's avatar
PRUVOST Florent committed
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
    - /^ci-.*$/

release:
  stage: deploy
  dependencies: []
  artifacts:
    name: chameleon_release
    expire_in: 1 week
    paths:
      - build-$VERSION/*.tar.gz
  variables:
    VERSION: release
  only:
    - /^release-.*$/
  script:
    - ./tools/release.sh