IAP GITLAB

Skip to content
Snippets Groups Projects
Commit beddaf53 authored by Ralf M Ulrich's avatar Ralf M Ulrich
Browse files

simplify ci

parent 2142f117
No related branches found
No related tags found
1 merge request!214use of rules
Pipeline #1536 failed
...@@ -54,9 +54,9 @@ check-clang-format: ...@@ -54,9 +54,9 @@ check-clang-format:
####### CONFIG ############## ####### CONFIG ##############
########################################################## ##########################################################
# the generic config template job
# job/stage to just prepare cmake # job/stage to just prepare cmake
config-u-18_04: .config
image: corsika/devel:u-18.04
stage: config stage: config
tags: tags:
- corsika - corsika
...@@ -75,38 +75,24 @@ config-u-18_04: ...@@ -75,38 +75,24 @@ config-u-18_04:
paths: paths:
- build - build
########################################################## # config for gcc
# job/stage to just prepare cmake config-u-18_04:
extends: .config
image: corsika/devel:u-18.04
# config for clang
config-clang-8: config-clang-8:
extends: .config
image: corsika/devel:clang-8 image: corsika/devel:clang-8
stage: config
tags:
- corsika
variables:
CORSIKA_DATA: "${CI_BUILDS_DIR}/AirShowerPhysics/corsika/corsika-data/"
script:
- mkdir build
- cd build
# - 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
artifacts:
expire_in: 1 day
paths:
- build
####### BUILD ############## ####### BUILD ##############
########################################################## ##########################################################
# the generic build template job
# normal pipeline for each commit # normal pipeline for each commit
build-u-18_04: .build
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
stage: build stage: build
tags: tags:
- corsika - corsika
...@@ -124,39 +110,27 @@ build-u-18_04: ...@@ -124,39 +110,27 @@ build-u-18_04:
paths: paths:
- build - build
########################################################## # build for gcc
# normal pipeline for each commit build-u-18_04:
extends: .build
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
# build for clang
build-clang-8: build-clang-8:
extends: .build
image: corsika/devel:clang-8 image: corsika/devel:clang-8
dependencies: dependencies:
- config-clang-8 - config-clang-8
stage: build
tags:
- corsika
variables:
CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/"
script:
- cd build
# - cmake --build . -- -j4
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
artifacts:
expire_in: 4 hours
reports:
paths:
- build
####### TEST ############## ####### TEST ##############
########################################################## ##########################################################
# generic test template job
# normal pipeline for each commit # normal pipeline for each commit
test-u-18_04: .test
image: corsika/devel:u-18.04
dependencies:
- build-u-18_04
stage: test stage: test
tags: tags:
- corsika - corsika
...@@ -180,45 +154,28 @@ test-u-18_04: ...@@ -180,45 +154,28 @@ test-u-18_04:
# paths: # paths:
# - build/test.log.gz # - build/test.log.gz
########################################################## # test for gcc
# normal pipeline for each commit test-u-18_04:
test-clang-8: extends: .test
image: corsika/devel:u-18.04
dependencies:
- build-u-18_04
# test for clang
test-clang-8:
extends: .test
image: corsika/devel:clang-8 image: corsika/devel:clang-8
dependencies: dependencies:
- build-clang-8 - build-clang-8
stage: test
tags:
- corsika
variables:
CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/"
script:
# - git clone https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika-data.git
- cd build
- set -o pipefail
# - ctest -VV | gzip -v -9 > test.log.gz
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# artifacts:
# when: always
# expire_in: 3 days
# reports:
# junit:
# - build/test_outputs/junit*.xml
# paths:
# - build/test.log.gz
####### EXAMPLE ############## ####### EXAMPLE ##############
########################################################## ##########################################################
# generic example template job
# normal pipeline for each commit # normal pipeline for each commit
example-u-18_04: .example
image: corsika/devel:u-18.04
dependencies:
- build-u-18_04
stage: example stage: example
tags: tags:
- corsika - corsika
...@@ -239,42 +196,28 @@ example-u-18_04: ...@@ -239,42 +196,28 @@ example-u-18_04:
# paths: # paths:
# - build/examples.log.gz # - build/examples.log.gz
########################################################## # example for gcc
# normal pipeline for each commit example-u-18_04:
example-clang-8: extends: .example
image: corsika/devel:u-18.04
dependencies:
- build-u-18_04
# example for clang
example-clang-8:
extends: .example
image: corsika/devel:clang-8 image: corsika/devel:clang-8
dependencies: dependencies:
- build-clang-8 - build-clang-8
stage: example
tags:
- corsika
variables:
CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/"
script:
# - git clone https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika-data.git
- cd build
- set -o pipefail
# - make run_examples | gzip -v -9 > examples.log.gz
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# artifacts:
# when: always
# expire_in: 3 days
# paths:
# - build/examples.log.gz
####### OPTIONAL ############## ####### OPTIONAL ##############
########################################################## ##########################################################
# generic release template job
# optional release pipeline for each commit # optional release pipeline for each commit
release-full-u-18_04: .release
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
stage: optional stage: optional
tags: tags:
- corsika - corsika
...@@ -308,44 +251,19 @@ release-full-u-18_04: ...@@ -308,44 +251,19 @@ release-full-u-18_04:
# paths: # paths:
# - build/test.log.gz # - build/test.log.gz
########################################################## # release for gcc
# optional release pipeline for each commit release-full-u-18_04:
extends: .release
image: corsika/devel:u-18.04
dependencies:
- config-u-18_04
# release for clang
release-full-clang-8: release-full-clang-8:
extends: .release
image: corsika/devel:clang-8 image: corsika/devel:clang-8
dependencies: dependencies:
- config-clang-8 - config-clang-8
stage: optional
tags:
- corsika
variables:
CORSIKA_DATA: "${CI_PROJECT_DIR}/corsika-data/"
script:
# - git clone https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika-data.git
- cd build
# - cmake .. -DCMAKE_BUILD_TYPE=Release
# - cmake --build . -- -j4
- set -o pipefail
# - ctest -VV | gzip -v -9 > test.log.gz
# - make run_examples
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
# artifacts:
# when: always
# expire_in: 3 days
# reports:
# junit:
# - build/test_outputs/junit*.xml
# paths:
# - build/test.log.gz
########################################################## ##########################################################
# the coverage generation should either run when manually requested, OR always on the master # the coverage generation should either run when manually requested, OR always on the master
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment