forked from MPIfR-BDG/mpikat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
131 lines (110 loc) · 2.88 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
stages:
- test
- deploy
image: eddinfra0:5000/eddbase:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- .cache/apt
.production:
image: eddinfra0:5000/eddbase
before_script:
# - mkdir -p .cache/apt/
# - cp -r .cache/apt/* /var/cache/apt
- apt-get -y update && apt-get install -y python-ipaddress python-coverage
# - cp -r /var/cache/apt .cache/apt/
.python3:
image: nvidia/cuda:10.2-devel-ubuntu18.04
before_script:
# - mkdir -p .cache/apt/
# - cp -r .cache/apt/* /var/cache/apt
- apt-get -y update && apt-get install -y python3-pip python3-git python3-watchdog python3-networkx python3-astropy python3-pybind11 git libboost-program-options-dev libboost-system-dev python3-graphviz
# - cp -r /var/cache/apt .cache/apt/
- pip3 install katcp redis coloredlogs numpy spead2==1.14.0 sphinx sphinxcontrib-apidoc sphinx-rtd-theme recommonmark sphinxcontrib-napoleon sphinx-autoapi
test_production_base:
stage: test
extends: .production
script:
- python-coverage run -p --omit "*/site-packages/*,*test*" --source="mpikat" test.py
only:
- pushes
- merge_requests
artifacts:
untracked: true
when: always
test_python3:
stage: test
extends: .python3
script:
- python3 test.py
- cd doc
- make html
only:
- pushes
- merge_requests
artifacts:
paths:
- doc/_build
test_production_gated:
image: eddinfra0:5000/edd_gated_stokes
extends: .production
stage: test
script:
- cp testing_tools/dummy_numa_ctl.py /usr/bin/numactl
- rm -r /usr/local/lib/python2.7/dist-packages/mpikat*
- cp mpikat/effelsberg/edd/pipeline/test/testGatedPipeline.py .
- python-coverage run -p --omit "*/site-packages/*,*test*" --source="mpikat" testGatedPipeline.py
only:
- pushes
- merge_requests
artifacts:
untracked: true
when: always
#test_coverage:
# stage: deploy
# dependencies:
# - test_production_gated
# - test_production_base
# script:
# - python2-coverage xml
# artifacts:
# reports:
# cobertura: coverage.xml
# when: on_success
test_debug_output:
stage: deploy
script:
- cat debug.log
when: on_failure
pages:
stage: deploy
extends: .production
dependencies:
- test_production_gated
- test_production_base
- test_python3
script:
- ls -a
- python-coverage combine .coverage*
- ls -a
- python-coverage html
- python-coverage report
- mkdir public
- mv htmlcov/ public/coverage
- mv doc/_build/html/* public/
artifacts:
paths:
- public
only:
- dev
- cicd
- doc
trigger_edd_deco_update:
stage: deploy
trigger: mpifr-bdg/edd_documentation
only:
- dev