IAP GITLAB

.gitlab-ci.yml 13.8 KB
Newer Older
Ralf Ulrich's avatar
Ralf Ulrich committed
1
variables:
2
  GIT_STRATEGY: fetch
Ralf Ulrich's avatar
Ralf Ulrich committed
3
  GIT_SSL_NO_VERIFY: "1"
4 5 6
  GIT_DEPTH: 1
  # to re-use clones also in different forks
  GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_NAME
7 8 9 10 11 12
  ## Runtime options for sanitizers
  # (detect_leaks=0 because leak detection doesn't work in CI, but you can
  # try to test with leak detection locally by using detect_leaks=1)
  UBSAN_OPTIONS: "print_stacktrace=1"
  LSAN_OPTIONS: "log_threads=1"
  ASAN_OPTIONS: "detect_leaks=0:detect_stack_use_after_return=1"
13
  # location of AirShowerPhysics/corsika-data
14
  CORSIKA_DATA: "${CI_PROJECT_DIR}/Data" # the git submodule
15 16 17 18 19 20 21 22 23 24
  # _alternatively_ corsika-data can be downloaded as submodule:
  GIT_SUBMODULE_STRATEGY: normal


#
# multi-step pipeline for each commit
#
# Mote: "WIP:" merge request, non-WIP merge requests and "Ready for Code Review" MR are all
#       handled explicitly
#
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
25
stages:
Ralf M Ulrich's avatar
quality  
Ralf M Ulrich committed
26
  - quality
27
  - config
Ralf M Ulrich's avatar
Ralf M Ulrich committed
28 29
  - build
  - test
30
  - build_test
Ralf M Ulrich's avatar
Ralf M Ulrich committed
31
  - example
32
  - build_test_example
33
  - install
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
34 35 36
  - optional


37 38


39
####### CODE QUALITY CHECK ##############
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
40

41
##########################################################
Ralf M Ulrich's avatar
quality  
Ralf M Ulrich committed
42 43 44 45 46 47 48
check-copyrights:
  image: corsika/devel:u-18.04
  stage: quality
  tags:
    - corsika
  script:
    - ./do-copyright.py
49 50 51 52 53
  rules:
    - if: $CI_MERGE_REQUEST_ID
    - if: $CI_COMMIT_TAG
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  allow_failure: true
Ralf M Ulrich's avatar
quality  
Ralf M Ulrich committed
54

55
##########################################################
Ralf M Ulrich's avatar
quality  
Ralf M Ulrich committed
56 57 58 59 60 61 62 63 64
check-clang-format:
  image: corsika/devel:u-18.04
  before_script:
  - apt-get update && apt-get install -y -qq clang-format
  stage: quality
  tags:
    - corsika
  script:
    - ./do-clang-format.py --all
65 66 67 68 69
  rules:
    - if: $CI_MERGE_REQUEST_ID
    - if: $CI_COMMIT_TAG
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  allow_failure: true
Ralf M Ulrich's avatar
quality  
Ralf M Ulrich committed
70

71 72


73

74 75 76 77 78 79 80
####### CONFIG ##############

##########################################################
# the generic config template job
# job/stage to just prepare cmake
.config:
  stage: config
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
81 82
  tags:
    - corsika
Ralf Ulrich's avatar
Ralf Ulrich committed
83
  variables:
84 85
  before_script:
   - cd Data && for F in `find . -name "*.bz2" | grep -v ".git"`; do [ ! -f ${F%%.bz2} ] && bunzip2 -vk $F; done
Ralf Ulrich's avatar
Ralf Ulrich committed
86
   - cd ${CI_PROJECT_DIR}
Ralf Ulrich's avatar
Ralf Ulrich committed
87 88
  script:    
    - mkdir -p build
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
89
    - cd build
90 91 92 93 94 95
    - cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHIA=ON
  rules:
    - if: $CI_MERGE_REQUEST_ID
    - if: $CI_COMMIT_TAG
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  cache: 
Ralf M Ulrich's avatar
Ralf M Ulrich committed
96
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
97 98
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
99
    untracked: true
100
    policy: pull-push
Ralf M Ulrich's avatar
Ralf M Ulrich committed
101

102 103 104 105 106 107 108 109 110 111
# config for gcc
config-u-18_04:
  extends: .config
  image: corsika/devel:u-18.04
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc"

# config for clang
config-clang-8:
  extends: .config
Ralf M Ulrich's avatar
Ralf M Ulrich committed
112
  image: corsika/devel:clang-8
113 114 115 116 117
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang"



118 119

####### BUILD (only manual) ##############
120 121 122 123 124

##########################################################
# the generic build template job
# normal pipeline for each commit
.build:
Ralf M Ulrich's avatar
Ralf M Ulrich committed
125 126 127 128 129 130
  stage: build
  tags:
    - corsika
  script:
    - cd build
    - cmake --build . -- -j4
131 132
  rules:
    - if: $CI_MERGE_REQUEST_ID
133
      when: manual
134
    - if: $CI_COMMIT_TAG
135
      when: manual
136
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
137 138
      when: manual
  allow_failure: true
139
  cache: 
Ralf M Ulrich's avatar
Ralf M Ulrich committed
140
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
141 142
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
143
    untracked: true
144
    policy: pull-push
Ralf M Ulrich's avatar
Ralf M Ulrich committed
145

146 147 148
# build for gcc
build-u-18_04:
  extends: .build
Ralf M Ulrich's avatar
Ralf M Ulrich committed
149 150
  image: corsika/devel:u-18.04
  dependencies:
151 152 153
    - config-u-18_04
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc"
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
154

155 156 157
# build for clang
build-clang-8: 
  extends: .build
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
158 159
  image: corsika/devel:clang-8
  dependencies:
160 161 162 163 164
    - config-clang-8
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang"


165 166 167


####### TEST (only manual)  ##############
168 169 170 171 172

##########################################################
# generic test template job
# normal pipeline for each commit
.test:
Ralf M Ulrich's avatar
Ralf M Ulrich committed
173
  stage: test
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
174 175 176 177
  tags:
    - corsika
  script:
    - cd build
178
    - set -o pipefail
179
    - ctest -j4 -VV | gzip -v -9 > test.log.gz 
180 181
  rules:
    - if: $CI_MERGE_REQUEST_ID
182
      when: manual
183
    - if: $CI_COMMIT_TAG
184
      when: manual
185
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
186 187
      when: manual
  allow_failure: true
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
188
  artifacts:
189
    when: always
190
    expire_in: 3 days
191 192
    reports:
      junit:
Ralf Ulrich's avatar
Ralf Ulrich committed
193
        - ${CI_PROJECT_DIR}/build/test_outputs/junit*.xml
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
194
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
195
      - ${CI_PROJECT_DIR}/build/test.log.gz
196 197
  cache: 
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
198 199
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
200 201
    untracked: true
    policy: pull-push
Ralf M Ulrich's avatar
Ralf M Ulrich committed
202

203 204 205
# test for gcc
test-u-18_04:
  extends: .test
Ralf M Ulrich's avatar
Ralf M Ulrich committed
206 207 208
  image: corsika/devel:u-18.04
  dependencies:
    - build-u-18_04
209 210 211 212 213 214 215 216 217 218 219 220 221 222
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc"

# test for clang
test-clang-8:
  extends: .test
  image: corsika/devel:clang-8
  dependencies:
    - build-clang-8
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang"



223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248

####### BUILD-TEST (all builds <= WIP, default) ##############

##########################################################
# the generic build_test template job
# normal pipeline for each commit
.build_test:
  stage: build_test
  tags:
    - corsika
  script:
    - cd build
    - cmake --build . -- -j4
    - set -o pipefail
    - ctest -j4 -VV | gzip -v -9 > test.log.gz 
  rules:
    - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE =~ /^WIP:/'
    - if: $CI_MERGE_REQUEST_ID
      when: manual
      allow_failure: true
  allow_failure: true
  artifacts:
    when: always
    expire_in: 3 days
    reports:
      junit:
Ralf Ulrich's avatar
Ralf Ulrich committed
249
        - ${CI_PROJECT_DIR}/build/test_outputs/junit*.xml
250
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
251
      - ${CI_PROJECT_DIR}/build/test.log.gz
252 253
  cache: 
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
254 255
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
    untracked: true
    policy: pull-push

# build_test for gcc
build_test-u-18_04:
  extends: .build_test
  image: corsika/devel:u-18.04
  dependencies:
    - config-u-18_04
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc"

# build_test for clang
build_test-clang-8: 
  extends: .build_test
  image: corsika/devel:clang-8
  dependencies:
    - config-clang-8
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang"



####### EXAMPLE (only manual)  ##############
280 281 282 283 284

##########################################################
# generic example template job
# normal pipeline for each commit
.example:
Ralf M Ulrich's avatar
Ralf M Ulrich committed
285 286 287 288 289 290
  stage: example
  tags:
    - corsika
  script:
    - cd build
    - set -o pipefail
Ralf Ulrich's avatar
Ralf Ulrich committed
291
    - make -j4 run_examples | gzip -v -9 > examples.log.gz
292
  rules:
Ralf Ulrich's avatar
Ralf Ulrich committed
293
    - if: $CI_MERGE_REQUEST_ID
294
      when: manual
295
    - if: $CI_COMMIT_TAG
Ralf Ulrich's avatar
Ralf Ulrich committed
296
      when: manual
297 298 299
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      when: manual
  allow_failure: true
Ralf M Ulrich's avatar
Ralf M Ulrich committed
300 301
  artifacts:
    when: always
302
    expire_in: 3 days
Ralf M Ulrich's avatar
Ralf M Ulrich committed
303
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
304
      - ${CI_PROJECT_DIR}/build/examples.log.gz
305 306
  cache: 
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
307 308
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
309
    untracked: true
310
    policy: pull
Ralf M Ulrich's avatar
Ralf M Ulrich committed
311

312 313 314 315 316 317 318 319 320 321 322 323
# example for gcc
example-u-18_04: 
  extends: .example
  image: corsika/devel:u-18.04
  dependencies:
    - build-u-18_04
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc"

# example for clang
example-clang-8:
  extends: .example
Ralf M Ulrich's avatar
Ralf M Ulrich committed
324 325 326
  image: corsika/devel:clang-8
  dependencies:
    - build-clang-8
327 328 329 330
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang"


331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360

####### BUILD-TEST-EXAMPLE (only non-WIP)  ##############

##########################################################
# generic example template job
# normal pipeline for each commit
.build_test_example:
  stage: build_test_example
  tags:
    - corsika
  script:
    - cd build
    - cmake --build . -- -j4
    - set -o pipefail
    - ctest -j4 -VV | gzip -v -9 > test.log.gz 
    - make -j4 run_examples | gzip -v -9 > examples.log.gz
  rules:
    - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TITLE =~ /^WIP:/'
      when: manual
      allow_failure: true
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_MERGE_REQUEST_ID
    - if: $CI_COMMIT_TAG
      when: manual
      allow_failure: true
  artifacts:
    when: always
    expire_in: 3 days
    reports:
      junit:
Ralf Ulrich's avatar
Ralf Ulrich committed
361
        - ${CI_PROJECT_DIR}/build/test_outputs/junit*.xml
362
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
363 364
      - ${CI_PROJECT_DIR}/build/examples.log.gz
      - ${CI_PROJECT_DIR}/build/test.log.gz
365 366
  cache: 
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
367 368
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
    untracked: true
    policy: pull

# build_test_example for gcc
build_test_example-u-18_04: 
  extends: .build_test_example
  image: corsika/devel:u-18.04
  dependencies:
    - config-u-18_04
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc"

# build_test_example for clang
build_test_example-clang-8:
  extends: .build_test_example
  image: corsika/devel:clang-8
  dependencies:
    - config-clang-8
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang"




393 394 395 396 397 398 399
####### INSTALL  ##############

##########################################################
# generic install template job
# make install
.install:
  stage: install
Ralf M Ulrich's avatar
Ralf M Ulrich committed
400 401 402 403 404
  tags:
    - corsika
  script:
    - cd build
    - set -o pipefail
Ralf Ulrich's avatar
Ralf Ulrich committed
405
    - make -j2 install
406
  rules:
Ralf Ulrich's avatar
Ralf Ulrich committed
407
    - if: $CI_MERGE_REQUEST_ID
408
      when: manual
409
    - if: $CI_COMMIT_TAG
Ralf Ulrich's avatar
Ralf Ulrich committed
410
      when: manual
411 412 413
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      when: manual
  allow_failure: true
414
  cache: 
Ralf M Ulrich's avatar
Ralf M Ulrich committed
415
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
416 417
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
418
    untracked: true
419
    policy: pull
Ralf M Ulrich's avatar
Ralf M Ulrich committed
420

421 422 423
# install for gcc
install-u-18_04: 
  extends: .install
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
424 425
  image: corsika/devel:u-18.04
  dependencies:
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
    - build-u-18_04
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc"

# install for clang
install-clang-8:
  extends: .install
  image: corsika/devel:clang-8
  dependencies:
    - build-clang-8
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang"



441

442 443 444 445 446 447
####### OPTIONAL ##############

##########################################################
# generic release template job
# optional release pipeline for each commit
.release:
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
448
  stage: optional
449 450 451
  tags:
    - corsika
  script:
452
    - cd build
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
453
    - cmake .. -DCMAKE_BUILD_TYPE=Release
454
    - cmake --build . -- -j4
455
    - set -o pipefail
456
    - ctest -j4 -VV | gzip -v -9 > test.log.gz 
Ralf Ulrich's avatar
Ralf Ulrich committed
457
    - make -j4 run_examples | gzip -v -9 > examples.log.gz
458 459 460 461 462 463 464 465 466 467 468 469 470
  rules:
    - if: '$CI_MERGE_REQUEST_LABELS =~ /Ready for code review/' # run on merge requests, if label 'Ready for code review' is set
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      when: manual
      allow_failure: true
    - if: $CI_MERGE_REQUEST_ID
      when: manual
      allow_failure: true
    - if: $CI_COMMIT_TAG
      when: manual
      allow_failure: true
  cache: 
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
471 472
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
473
    untracked: true
474
    policy: pull
475
  artifacts:
476
    when: always
477
    expire_in: 3 days
478 479
    reports:
      junit:
Ralf Ulrich's avatar
Ralf Ulrich committed
480
        - ${CI_PROJECT_DIR}/build/test_outputs/junit*.xml
481
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
482 483
      - ${CI_PROJECT_DIR}/build/test.log.gz
      - ${CI_PROJECT_DIR}/build/examples.log.gz
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
484

485 486 487 488 489 490 491 492 493 494
# release for gcc
release-full-u-18_04:
  extends: .release
  image: corsika/devel:u-18.04
  dependencies:
    - config-u-18_04
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc"

# release for clang
Ralf M Ulrich's avatar
Ralf M Ulrich committed
495
release-full-clang-8: 
496
  extends: .release
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
497 498 499
  image: corsika/devel:clang-8
  dependencies:
    - config-clang-8
500 501 502
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang"

Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
503

504 505


506 507
##########################################################
# the coverage generation should either run when manually requested, OR always on the master
508

509
coverage:
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
510 511 512 513 514 515 516 517 518 519
  image: corsika/devel:u-18.04
  dependencies:
    - config-u-18_04
  stage: optional
  tags:
    - corsika
  script:
    - cd build
    - cmake .. -DCMAKE_BUILD_TYPE=Coverage
    - cmake --build . -- -j4
520
    - ctest -j4 -VV | gzip -v -9 > test.log.gz 
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
521 522
    - cmake --build . --target coverage
    - tar czf coverage-report.tar.gz coverage-report
Ralf Ulrich's avatar
Ralf Ulrich committed
523
  coverage: '/^.*functions\.+:\s(.*\%)\s/'
524 525 526 527 528 529 530 531 532
  rules:
    - if: '$CI_MERGE_REQUEST_LABELS =~ /Ready for code review/' # run on merge requests, if label 'Ready for code review' is set
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - if: $CI_MERGE_REQUEST_ID
      when: manual
      allow_failure: true
    - if: $CI_COMMIT_TAG
      when: manual
      allow_failure: true
533
  artifacts:
534
    when: always
535
    expire_in: 1 year
536
    paths:
537
      - ${CI_PROJECT_DIR}/build/test.log.gz
Ralf Ulrich's avatar
Ralf Ulrich committed
538
      - ${CI_PROJECT_DIR}/build/coverage-report.tar.gz
539 540
  cache: 
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
541 542
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
543
    untracked: true
544 545
    policy: pull
    key: "${CI_COMMIT_REF_SLUG}-gcc"
Ralf Ulrich's avatar
Ralf Ulrich committed
546

Ralf Ulrich's avatar
Ralf Ulrich committed
547

548 549


550
##########################################################
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
551 552 553
documentation:
  image: corsika/devel:u-18.04
  dependencies:
554
    - config-u-18_04
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
555
  stage: optional
Ralf Ulrich's avatar
Ralf Ulrich committed
556
  tags:
Lukas Nellen's avatar
Lukas Nellen committed
557
    - corsika
558
  script:
Ralf Ulrich's avatar
Ralf Ulrich committed
559
    - cd build
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
560
    - cmake --build . --target doxygen -- -j4
Ralf Ulrich's avatar
Ralf Ulrich committed
561
    - mkdir -p .public
562
    - cp -r Documentation/Doxygen/html .public/
Ralf Ulrich's avatar
Ralf Ulrich committed
563
    - mv .public ../public
564 565 566 567 568 569 570 571 572 573 574
  rules:
    - if: '$CI_MERGE_REQUEST_LABELS =~ /Ready for code review/' # run on merge requests, if label 'Ready for code review' is set
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      when: manual
      allow_failure: true
    - if: $CI_MERGE_REQUEST_ID
      when: manual
      allow_failure: true
    - if: $CI_COMMIT_TAG
      when: manual
      allow_failure: true
575
  artifacts:
576
    expire_in: 3 weeks
577
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
578
      - ${CI_PROJECT_DIR}/public
579 580
  cache: 
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
581 582
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
583
    untracked: true
584 585 586
    policy: pull
    key: "${CI_COMMIT_REF_SLUG}-gcc"

Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
587

588

589
##########################################################
Ralf Ulrich's avatar
CI  
Ralf Ulrich committed
590 591 592 593 594 595 596 597 598 599 600
sanity:
  image: corsika/devel:u-18.04
  dependencies:
    - config-u-18_04
  stage: optional
  tags:
    - corsika
  script:
    - cd build
    - cmake .. -DWITH_CORSIKA_SANITIZERS_ENABLED=ON
    - cmake --build . -- -j4
601 602 603 604 605 606 607 608 609 610 611 612 613
  rules:
    - if: '$CI_MERGE_REQUEST_LABELS =~ /Ready for code review/' # run on merge requests, if label 'Ready for code review' is set
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      when: manual
      allow_failure: true
    - if: $CI_MERGE_REQUEST_ID
      when: manual
      allow_failure: true
    - if: $CI_COMMIT_TAG
      when: manual
      allow_failure: true
  cache: 
    paths:
Ralf Ulrich's avatar
Ralf Ulrich committed
614 615
      - ${CI_PROJECT_DIR}/build/
      - ${CI_PROJECT_DIR}/Data/
616
    untracked: true
617 618
    policy: pull
    key: "${CI_COMMIT_REF_SLUG}-gcc"