IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pranav Sampathkumar
corsika
Commits
d8c9088e
Commit
d8c9088e
authored
4 years ago
by
Ralf Ulrich
Browse files
Options
Downloads
Plain Diff
Merge branch 'ci_update' into 'master'
use of rules See merge request
!214
parents
edfcf5cb
b999da72
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+260
-135
260 additions, 135 deletions
.gitlab-ci.yml
with
260 additions
and
135 deletions
.gitlab-ci.yml
+
260
−
135
View file @
d8c9088e
variables
:
variables
:
GIT_SSL_NO_VERIFY
:
"
1"
GIT_SSL_NO_VERIFY
:
"
1"
GIT_DEPTH
:
10
## Runtime options for sanitizers
## Runtime options for sanitizers
# (detect_leaks=0 because leak detection doesn't work in CI, but you can
# (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)
# try to test with leak detection locally by using detect_leaks=1)
...
@@ -9,47 +10,18 @@ variables:
...
@@ -9,47 +10,18 @@ variables:
# normal multi-step pipeline for each commit
# normal multi-step pipeline for each commit
stages
:
stages
:
-
config
-
quality
-
quality
-
config
-
build
-
build
-
test
-
test
-
example
-
example
-
install
-
optional
-
optional
# job/stage to just prepare cmake
config-u-18_04
:
image
:
corsika/devel:u-18.04
stage
:
config
tags
:
-
corsika
variables
:
CORSIKA_DATA
:
"
${CI_PROJECT_DIR}/corsika-data/"
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
####### CODE QUALITY CHECK ##############
config-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
artifacts
:
expire_in
:
1 day
paths
:
-
build
##########################################################
check-copyrights
:
check-copyrights
:
image
:
corsika/devel:u-18.04
image
:
corsika/devel:u-18.04
stage
:
quality
stage
:
quality
...
@@ -57,7 +29,13 @@ check-copyrights:
...
@@ -57,7 +29,13 @@ check-copyrights:
-
corsika
-
corsika
script
:
script
:
-
./do-copyright.py
-
./do-copyright.py
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
allow_failure
:
true
##########################################################
check-clang-format
:
check-clang-format
:
image
:
corsika/devel:u-18.04
image
:
corsika/devel:u-18.04
before_script
:
before_script
:
...
@@ -67,30 +45,60 @@ check-clang-format:
...
@@ -67,30 +45,60 @@ check-clang-format:
-
corsika
-
corsika
script
:
script
:
-
./do-clang-format.py --all
-
./do-clang-format.py --all
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
allow_failure
:
true
# normal pipeline for each commit
build-u-18_04
:
image
:
corsika/devel:u-18.04
####### CONFIG ##############
dependencies
:
-
config-u-18_04
##########################################################
stage
:
build
# the generic config template job
# job/stage to just prepare cmake
.config
:
stage
:
config
tags
:
tags
:
-
corsika
-
corsika
variables
:
variables
:
CORSIKA_DATA
:
"
${CI_PROJECT_DIR}/corsika-data/"
CORSIKA_DATA
:
"
${CI_PROJECT_DIR}/corsika-data/"
script
:
script
:
-
mkdir build
-
cd build
-
cd build
-
cmake --build . -- -j4
-
cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_PYTHIA=ON
artifacts
:
rules
:
expire_in
:
1 hour
-
if
:
$CI_MERGE_REQUEST_ID
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
cache
:
paths
:
paths
:
-
build
-
build/
policy
:
pull-push
# normal pipeline for each commit
# config for gcc
build-clang-8
:
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
image
:
corsika/devel:clang-8
image
:
corsika/devel:clang-8
dependencies
:
cache
:
-
config-clang-8
key
:
"
${CI_COMMIT_REF_SLUG}-clang"
####### BUILD ##############
##########################################################
# the generic build template job
# normal pipeline for each commit
.build
:
stage
:
build
stage
:
build
tags
:
tags
:
-
corsika
-
corsika
...
@@ -99,41 +107,40 @@ build-clang-8:
...
@@ -99,41 +107,40 @@ build-clang-8:
script
:
script
:
-
cd build
-
cd build
-
cmake --build . -- -j4
-
cmake --build . -- -j4
artifacts
:
rules
:
expire_in
:
1 hour
-
if
:
$CI_MERGE_REQUEST_ID
reports
:
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
cache
:
paths
:
paths
:
-
build
-
build/
policy
:
pull-push
# normal pipeline for each commit
# build for gcc
test-u-18_04
:
build-u-18_04
:
extends
:
.build
image
:
corsika/devel:u-18.04
image
:
corsika/devel:u-18.04
dependencies
:
dependencies
:
-
build-u-18_04
-
config-u-18_04
stage
:
test
cache
:
tags
:
key
:
"
${CI_COMMIT_REF_SLUG}-gcc"
-
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
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 for clang
test-clang-8
:
build-clang-8
:
extends
:
.build
image
:
corsika/devel:clang-8
image
:
corsika/devel:clang-8
dependencies
:
dependencies
:
-
build-clang-8
-
config-clang-8
cache
:
key
:
"
${CI_COMMIT_REF_SLUG}-clang"
####### TEST ##############
##########################################################
# generic test template job
# normal pipeline for each commit
.test
:
stage
:
test
stage
:
test
tags
:
tags
:
-
corsika
-
corsika
...
@@ -144,20 +151,49 @@ test-clang-8:
...
@@ -144,20 +151,49 @@ test-clang-8:
-
cd build
-
cd build
-
set -o pipefail
-
set -o pipefail
-
ctest -VV | gzip -v -9 > test.log.gz
-
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
:
artifacts
:
when
:
always
when
:
always
expire_in
:
1 week
expire_in
:
3 days
reports
:
reports
:
junit
:
junit
:
-
build/test_outputs/junit*.xml
-
build/test_outputs/junit*.xml
paths
:
paths
:
-
build/test.log.gz
-
build/test.log.gz
cache
:
paths
:
-
build/
policy
:
pull
# normal pipeline for each commit
# test for gcc
example-u-18_04
:
test-u-18_04
:
extends
:
.test
image
:
corsika/devel:u-18.04
image
:
corsika/devel:u-18.04
dependencies
:
dependencies
:
-
build-u-18_04
-
build-u-18_04
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"
####### EXAMPLE ##############
##########################################################
# generic example template job
# normal pipeline for each commit
.example
:
stage
:
example
stage
:
example
tags
:
tags
:
-
corsika
-
corsika
...
@@ -168,38 +204,89 @@ example-u-18_04:
...
@@ -168,38 +204,89 @@ example-u-18_04:
-
cd build
-
cd build
-
set -o pipefail
-
set -o pipefail
-
make run_examples | gzip -v -9 > examples.log.gz
-
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
:
artifacts
:
when
:
always
when
:
always
expire_in
:
1 week
expire_in
:
3 days
paths
:
paths
:
-
build/examples.log.gz
-
build/examples.log.gz
cache
:
paths
:
-
build/
policy
:
pull
# normal pipeline for each commit
# example for gcc
example-clang-8
:
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
image
:
corsika/devel:clang-8
image
:
corsika/devel:clang-8
dependencies
:
dependencies
:
-
build-clang-8
-
build-clang-8
stage
:
example
cache
:
key
:
"
${CI_COMMIT_REF_SLUG}-clang"
####### INSTALL ##############
##########################################################
# generic install template job
# make install
.install
:
stage
:
install
tags
:
tags
:
-
corsika
-
corsika
variables
:
variables
:
CORSIKA_DATA
:
"
${CI_PROJECT_DIR}/corsika-data/"
CORSIKA_DATA
:
"
${CI_PROJECT_DIR}/corsika-data/"
script
:
script
:
-
git clone https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika-data.git
-
cd build
-
cd build
-
set -o pipefail
-
set -o pipefail
-
make run_examples | gzip -v -9 > examples.log.gz
-
make install
artifacts
:
rules
:
when
:
always
-
if
:
$CI_MERGE_REQUEST_ID
expire_in
:
1 week
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
cache
:
paths
:
paths
:
-
build/examples.log.gz
-
build/
policy
:
pull
# optional release pipeline for each commit
# install for gcc
release-full-u-18_04
:
install-u-18_04
:
extends
:
.install
image
:
corsika/devel:u-18.04
image
:
corsika/devel:u-18.04
dependencies
:
dependencies
:
-
config-u-18_04
-
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"
####### OPTIONAL ##############
##########################################################
# generic release template job
# optional release pipeline for each commit
.release
:
stage
:
optional
stage
:
optional
tags
:
tags
:
-
corsika
-
corsika
...
@@ -213,46 +300,52 @@ release-full-u-18_04:
...
@@ -213,46 +300,52 @@ release-full-u-18_04:
-
set -o pipefail
-
set -o pipefail
-
ctest -VV | gzip -v -9 > test.log.gz
-
ctest -VV | gzip -v -9 > test.log.gz
-
make run_examples
-
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
cache
:
paths
:
-
build/
policy
:
pull
artifacts
:
artifacts
:
when
:
always
when
:
always
expire_in
:
1 week
expire_in
:
3 days
reports
:
reports
:
junit
:
junit
:
-
build/test_outputs/junit*.xml
-
build/test_outputs/junit*.xml
paths
:
paths
:
-
build/test.log.gz
-
build/test.log.gz
when
:
manual
# optional release pipeline for each commit
# 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
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
cache
:
tags
:
key
:
"
${CI_COMMIT_REF_SLUG}-clang"
-
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
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
# the coverage generation should either run when manually requested, OR always on the master
coverage
:
image
:
corsika/devel:u-18.04
image
:
corsika/devel:u-18.04
dependencies
:
dependencies
:
-
config-u-18_04
-
config-u-18_04
...
@@ -269,24 +362,27 @@ release-full-clang-8:
...
@@ -269,24 +362,27 @@ release-full-clang-8:
-
cmake --build . --target coverage
-
cmake --build . --target coverage
-
tar czf coverage-report.tar.gz coverage-report
-
tar czf coverage-report.tar.gz coverage-report
coverage
:
'
/^.*functions\.+:\s(.*\%)\s/'
coverage
:
'
/^.*functions\.+:\s(.*\%)\s/'
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
artifacts
:
artifacts
:
expire_in
:
1 year
expire_in
:
1 year
paths
:
paths
:
-
build/coverage-report.tar.gz
-
build/coverage-report.tar.gz
cache
:
paths
:
-
build/
policy
:
pull
key
:
"
${CI_COMMIT_REF_SLUG}-gcc"
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
:
documentation
:
image
:
corsika/devel:u-18.04
image
:
corsika/devel:u-18.04
dependencies
:
dependencies
:
...
@@ -302,13 +398,29 @@ documentation:
...
@@ -302,13 +398,29 @@ documentation:
-
mkdir .public
-
mkdir .public
-
cp -r Documentation/Doxygen/html .public/
-
cp -r Documentation/Doxygen/html .public/
-
mv .public ../public
-
mv .public ../public
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
:
artifacts
:
expire_in
:
3 weeks
expire_in
:
3 weeks
paths
:
paths
:
-
public
-
public
when
:
manual
cache
:
allow_failure
:
true
paths
:
-
build/
policy
:
pull
key
:
"
${CI_COMMIT_REF_SLUG}-gcc"
##########################################################
sanity
:
sanity
:
image
:
corsika/devel:u-18.04
image
:
corsika/devel:u-18.04
dependencies
:
dependencies
:
...
@@ -322,6 +434,19 @@ sanity:
...
@@ -322,6 +434,19 @@ sanity:
-
cd build
-
cd build
-
cmake .. -DWITH_CORSIKA_SANITIZERS_ENABLED=ON
-
cmake .. -DWITH_CORSIKA_SANITIZERS_ENABLED=ON
-
cmake --build . -- -j4
-
cmake --build . -- -j4
when
:
manual
rules
:
allow_failure
:
true
-
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
:
-
build/
policy
:
pull
key
:
"
${CI_COMMIT_REF_SLUG}-gcc"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment