IAP GITLAB

.gitlab-ci.yml 1.54 KB
Newer Older
Lukas Nellen's avatar
Lukas Nellen committed
1
image: corsika/devel:u-18.04
Ralf Ulrich's avatar
Ralf Ulrich committed
2

Ralf Ulrich's avatar
Ralf Ulrich committed
3 4
variables:
  GIT_SSL_NO_VERIFY: "1"
5 6 7 8 9 10
  ## 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"
Ralf Ulrich's avatar
Ralf Ulrich committed
11

12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
build: # normal pipeline for each commit, except for commits to the master
  stage: build
  tags:
    - corsika
  script:
    - mkdir build
    - cd build
    - cmake .. -DCMAKE_BUILD_TYPE=Debug
    - cmake --build . -- -j4
    - ctest -j4 -V >& test.log || gzip -v -9 -S .gz test.log
  artifacts:
    expire_in: 1 year
    paths:
      - build/test.log.gz
    reports:
      junit:
        - build/test_outputs/junit*.xml
  except:
    - master
31

32
coverage: # special pipeline for master with coverage report
33 34 35 36
  stage: build
  tags:
    - corsika
  script:
37
    - mkdir -p build
38
    - cd build
39 40
    - cmake .. -DCMAKE_BUILD_TYPE=Coverage
    - cmake --build . -- -j4
41
    - ctest -j4 
42
    - cmake --build . --target coverage && tar czf coverage-report.tar.gz coverage-report
43
  artifacts:
44
    expire_in: 1 year
45
    paths:
46
      - build/coverage-report.tar.gz
47 48
  only:
    - master
Ralf Ulrich's avatar
Ralf Ulrich committed
49

50
pages:
Ralf Ulrich's avatar
Ralf Ulrich committed
51
  stage: build
Ralf Ulrich's avatar
Ralf Ulrich committed
52
  tags:
Lukas Nellen's avatar
Lukas Nellen committed
53
    - corsika
54
  script:
Ralf Ulrich's avatar
Ralf Ulrich committed
55 56 57
    - mkdir build
    - cd build
    - cmake ..
58
    - cmake --build . --target doxygen
59 60
    - mkdir .public
    - cp -r Documentation/Doxygen/html .public/
Ralf Ulrich's avatar
Ralf Ulrich committed
61
    - mv .public ../public
62 63 64 65 66 67 68
  artifacts:
    paths:
      - public
  only:
    - tags
    - triggers
    - schedules