-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
151 lines (140 loc) · 4.6 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
###############################################################################
#### continuous integration setting of the JuKKR codes ####
###############################################################################
# docker image containing Developlement Tools and the current Intel compilers based on CentOS 7 with cmake
#image: iffregistry.fz-juelich.de/docker-images/centos7-intel-compilers/extended_intel2016
image: iffregistry.fz-juelich.de/docker-images/centos8-intel-compilers:latest-ipython3
before_script:
# set +e prevents sourced scripts from aborting if single commands fail (GitLab CI sets `-e` by default)
- set +e && source compilervars.sh intel64
# set environment variables to avoind stack size issue
- export OMP_NUM_THREADS=1
- export OMP_STACKSIZE=1g
- ulimit -s unlimited
# install numpy
- pip3 install numpy
# now reactivate `-e` setting again to stop on each error that follows
- set -e
stages:
- test
# voronoi stages
- build_voronoi
- run_voronoi
# verify stage not defined yet
# kkrhost stages
- build_kkrhost
- run_kkrhost_serial
- run_kkrhost_parallel
- run_kkrhost_features_part1
- run_kkrhost_features_part2
- run_kkrhost_features_SOC
- verify_kkrhost
- deploy:codecov_kkrhost
- deploy:doc_kkrhost
# kkrimp stages
- build_kkrimp
- run_kkrimp_parallel
- run_kkrimp_features
- verify_kkrimp
# kkrsusc stages
# to be implemented ...
# pkkprime stages
- build_pkkprime
# run and verify stages not defined yet
# rhoq stages
- build_rhoq
# run and verify stages not defined yet
# kkrnano stages
- build_kkrnano
- run_kkrnano
###############################################################################
test:intel:
stage: test
tags:
- docker-executor
script:
# test if dependencies are working
- echo 'do some tests here'
- which cmake
- which ifort
- which mpiifort
- which gfortran
- which profmerge
- which codecov || which Codecov
#- which python && python --version
- which python3 && python3 --version
#- which pip && pip --version
- which pip3 && pip3 --version
# needs to be implemented (tests for dependencies e.g. MPI, OpenMP, LAPACK, etc.)
- df -h /dev/shm # check if shm is big enough (https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/troubleshooting/problem-mpi-limitation-for-docker.html)
- cd tests/unit_tests/test_parallel && ./run_parallel_tests.sh
###############################################################################
# include build / run / verify scripts for all codes
include:
### 1. build codes ###
- tests/gitlab-ci/build_kkrhost.yml
- tests/gitlab-ci/build_kkrimp.yml
#- tests/gitlab-ci/build_kkrsusc.yml
- tests/gitlab-ci/build_pkkprime.yml
- tests/gitlab-ci/build_voronoi.yml
- tests/gitlab-ci/build_rhoq.yml
- tests/gitlab-ci/build_kkrnano.yml
### 2. run tests ###
- tests/gitlab-ci/run_kkrhost.yml
- tests/gitlab-ci/run_kkrimp.yml
#- tests/gitlab-ci/run_kkrsusc.yml
#- tests/gitlab-ci/run_pkkprime.yml
- tests/gitlab-ci/run_voronoi.yml
- tests/gitlab-ci/run_kkrnano.yml
### 3. verify results ###
- tests/gitlab-ci/verify_kkrhost.yml
- tests/gitlab-ci/verify_kkrimp.yml
#- tests/gitlab-ci/verify_kkrsusc.yml
#- tests/gitlab-ci/verify_pkkprime.yml
#- tests/gitlab-ci/verify_voronoi.yml
###############################################################################
# for Gitlab pages (online code documentation build with ford)
codecov:
stage: deploy:codecov_kkrhost
allow_failure: true
tags:
- docker-executor
script:
- cd build && ls -ltr
- profmerge
- codecov -spi pgopti.spi -dpi pgopti.dpi
- tar -zcvf ../cov.tar.gz CODE_COVERAGE.HTML CodeCoverage
- rm -rf *.dyn pgopti.spi pgopti.dpi
artifacts:
paths:
- cov.tar.gz
only:
- schedules
- triggers
- web
pages:
stage: deploy:doc_kkrhost
image: iffregistry.fz-juelich.de/docker-images/kkr-pages:latest
allow_failure: true
tags:
- docker-executor
script:
- cd docs
- ford settings_ford.md
- mv build/ ../public/
- cd ..
# add code coverage
- tar -zxvf cov.tar.gz && mv CODE_COVERAGE.HTML public/page/codecov/index.html && mv CodeCoverage public/page/codecov/CodeCoverage
# upload code for deploy
- '[ -n "${PREFIX}" ]'
- mkdir -p "public/${PREFIX}"
- git clone "${CI_REPOSITORY_URL}"
- tar -czf jukkr-git.tgz jukkr/
- mv jukkr-git.tgz "public/${PREFIX}/"
artifacts:
paths:
- public
only:
- schedules
- triggers
- web