-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
227 lines (209 loc) · 4.66 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
image: gitlab.mrt.kit.edu:21443/mrt/private/meyer/publications/diss/yolino:latest
### Cache build results between building and testing
cache:
paths:
- .cache/pip
- venv
stages:
- default
- test
# Prepare workspace and checkout the code. This will be executed before every stage
before_script:
- export SHELL="/bin/bash"
- export RUNNING_IN=docker
- apt-get update && apt-get upgrade -y
- apt install git -y
- pip3 install virtualenv
- virtualenv venv --python=python3.8 --system-site-packages
- source venv/bin/activate
- pip3 install .
- pip3 show torch
anchors:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_anchors.py
dependencies:
- build_docker
augment:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_augment.py
dependencies:
- build_docker
clyolo:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_clyolo.py
dependencies:
- build_docker
datasets:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_datasets.py
dependencies:
- build_docker
distances:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_distances.py
dependencies:
- build_docker
grid:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_grid.py
dependencies:
- build_docker
kendall:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_kendall.py
dependencies:
- build_docker
linerep:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_linerep.py
dependencies:
- build_docker
loss:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_loss.py
dependencies:
- build_docker
metrics:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_metrics.py
dependencies:
- build_docker
model:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_model.py
dependencies:
- build_docker
nms:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_nms.py
dependencies:
- build_docker
plot:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_plot.py
dependencies:
- build_docker
setup:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME != "docker"
script:
- cd $CI_PROJECT_DIR
- ls $CI_PROJECT_DIR
- source venv/bin/activate
- cd test
- python3 -m unittest test_setup.py
dependencies:
- build_docker
build_docker:
stage: default
image: docker:18.09
rules:
- if: $CI_COMMIT_REF_NAME == "docker"
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
changes:
- Dockerfile
- setup.cfg
- .gitlab-ci.yml
allow_failure: true
before_script: []
cache: {}
services:
- docker:18.09-dind
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE .
- if [ "$CI_COMMIT_REF_NAME" = "master" ]; then docker push $CI_REGISTRY_IMAGE; fi