variables: GIT_SSL_NO_VERIFY: "1" ## 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" # normal multi-step pipeline for each commit stages: - config - build_test - optional # job/stage to just prepare cmake config-u-18_04: image: corsika/devel:u-18.04 stage: config tags: - corsika script: - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHIA=ON artifacts: expire_in: 1 day paths: - build # job/stage to just prepare cmake config-clang-8: image: corsika/devel:clang-8 stage: config tags: - corsika script: - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHIA=ON artifacts: expire_in: 1 day paths: - build # normal pipeline for each commit build-test-u-18_04: image: corsika/devel:u-18.04 dependencies: - config-u-18_04 stage: build_test tags: - corsika script: - cd build - cmake --build . -- -j4 - set -o pipefail - ctest -VV | gzip -v -9 > test.log.gz artifacts: when: always expire_in: 1 week reports: junit: - build/test_outputs/junit*.xml paths: - build/test.log.gz # normal pipeline for each commit build-test-clang-8: image: corsika/devel:clang-8 dependencies: - config-clang-8 stage: build_test tags: - corsika script: - cd build - cmake --build . -- -j4 - set -o pipefail - ctest -VV | gzip -v -9 > test.log.gz artifacts: when: always expire_in: 1 week reports: junit: - build/test_outputs/junit*.xml paths: - build/test.log.gz # optional release pipeline for each commit release-u-18_04: image: corsika/devel:u-18.04 dependencies: - config-u-18_04 stage: optional tags: - corsika script: - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release - cmake --build . -- -j4 - set -o pipefail - ctest -VV | gzip -v -9 > test.log.gz artifacts: when: always expire_in: 1 week reports: junit: - build/test_outputs/junit*.xml paths: - build/test.log.gz when: manual # optional release pipeline for each commit release-clang-8: image: corsika/devel:clang-8 dependencies: - config-clang-8 stage: optional tags: - corsika script: - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release - cmake --build . -- -j4 - set -o pipefail - ctest -VV | gzip -v -9 > test.log.gz artifacts: when: always expire_in: 1 week reports: junit: - build/test_outputs/junit*.xml paths: - build/test.log.gz when: manual # the coverage generation should either run when manually requested, OR for all changes on the master .coverage_job: &coverage_job 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 - ctest -j4 -V > test.log - cmake --build . --target coverage - tar czf coverage-report.tar.gz coverage-report coverage: '/^.*functions\.+:\s(.*\%)\s/' artifacts: expire_in: 1 year paths: - build/coverage-report.tar.gz coverage: # special manual job to run after normal pipeline on branch finished <<: *coverage_job when: manual except: refs: - master coverage_master: # special job to run on master banch changes <<: *coverage_job only: refs: - master documentation: image: corsika/devel:u-18.04 dependencies: - config-u-18_04 stage: optional tags: - corsika script: - cd build - cmake --build . --target doxygen -- -j4 - mkdir .public - cp -r Documentation/Doxygen/html .public/ - mv .public ../public artifacts: expire_in: 3 weeks paths: - public when: manual allow_failure: true 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 when: manual allow_failure: true