-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
315 lines (298 loc) · 9.47 KB
/
.drone.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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
---
kind: pipeline
type: docker
name: python3.7
steps:
- name: test (tox) and build
image: python:3.7-buster
commands:
# dev depedency with tox is currently broken
- pip install --upgrade pip poetry==1.4.2 tox==3.28.0 tox-poetry-installer==0.10.2
- tox -e py37
- poetry build
- name: install (sdist)
image: python:3.7-buster
commands:
- python -m venv .venv-sdist
- . .venv-sdist/bin/activate
- pip install dist/plafosim-*.tar.gz
- plafosim
- name: install (wheel)
image: python:3.7-buster
commands:
- python3 -m venv .venv-wheel
- . .venv-wheel/bin/activate
- pip install --upgrade wheel
- pip install dist/plafosim-*-py3-none-any.whl
- plafosim
---
kind: pipeline
type: docker
name: python3.8
steps:
- name: test (tox) and build
image: python:3.8-buster
commands:
# dev depedency with tox is currently broken
- pip install --upgrade pip poetry==1.4.2 tox==3.28.0 tox-poetry-installer==0.10.2
- tox -e py38
- poetry build
- name: install (sdist)
image: python:3.8-buster
commands:
- python -m venv .venv-sdist
- . .venv-sdist/bin/activate
- pip install dist/plafosim-*.tar.gz
- plafosim
- name: install (wheel)
image: python:3.8-buster
commands:
- python3 -m venv .venv-wheel
- . .venv-wheel/bin/activate
- pip install --upgrade wheel
- pip install dist/plafosim-*-py3-none-any.whl
- plafosim
---
kind: pipeline
type: docker
name: python3.9
steps:
- name: test (tox) and build
image: python:3.9-buster
commands:
# dev depedency with tox is currently broken
- pip install --upgrade pip poetry==1.4.2 tox==3.28.0 tox-poetry-installer==0.10.2
- tox -e py39
- poetry build
- name: install (sdist)
image: python:3.9-buster
commands:
- python -m venv .venv-sdist
- . .venv-sdist/bin/activate
- pip install dist/plafosim-*.tar.gz
- plafosim
- name: install (wheel)
image: python:3.9-buster
commands:
- python3 -m venv .venv-wheel
- . .venv-wheel/bin/activate
- pip install --upgrade wheel
- pip install dist/plafosim-*-py3-none-any.whl
- plafosim
---
kind: pipeline
type: docker
name: integration
steps:
- name: cf models (tox)
image: python:3.7-buster
commands:
# dev depedency with tox is currently broken
- pip install --upgrade pip poetry==1.4.2 tox==3.28.0 tox-poetry-installer==0.10.2
- tox -e test_cf_models
- name: lc models (tox)
image: python:3.7-buster
commands:
# dev depedency with tox is currently broken
- pip install --upgrade pip poetry==1.4.2 tox==3.28.0 tox-poetry-installer==0.10.2
- tox -e test_lc_models
- name: departure (tox)
image: python:3.7-buster
commands:
# dev depedency with tox is currently broken
- pip install --upgrade pip poetry==1.4.2 tox==3.28.0 tox-poetry-installer==0.10.2
- tox -e test_departure
- name: simulation (tox)
image: python:3.7-buster
commands:
# dev depedency with tox is currently broken
- pip install --upgrade pip poetry==1.4.2 tox==3.28.0 tox-poetry-installer==0.10.2
- tox -e test_simulation
trigger:
ref:
- refs/heads/master
- refs/heads/develop
- refs/pull/**
- refs/tags/*
---
kind: pipeline
type: docker
name: execution
steps:
- name: build
image: python:3.7-buster
commands:
- pip install --upgrade pip poetry
- poetry build
- name: install (wheel)
image: python:3.7-buster
commands:
- python3 -m venv .venv
- . .venv/bin/activate
- pip install --upgrade wheel
- pip install dist/plafosim-*-py3-none-any.whl
- name: no formation
image: python:3.7-buster
environment:
SEED: ${DRONE_BUILD_NUMBER}
commands:
- . .venv/bin/activate
# we are testing both vehicle types
- plafosim --vehicles 100 --penetration 0.5 --time-limit 0.5 --random-seed $SEED
- name: distributed formation
image: python:3.7-buster
environment:
SEED: ${DRONE_BUILD_NUMBER}
commands:
- . .venv/bin/activate
# we are testing both vehicle types
- plafosim --vehicles 100 --penetration 0.5 --time-limit 0.5 --formation-algorithm SpeedPosition --formation-strategy distributed --random-seed $SEED
- name: centralized formation (greedy)
image: python:3.7-buster
environment:
SEED: ${DRONE_BUILD_NUMBER}
commands:
- . .venv/bin/activate
# we are testing both vehicle types
- plafosim --vehicles 100 --penetration 0.5 --time-limit 0.5 --formation-algorithm SpeedPosition --formation-strategy centralized --formation-centralized-kind greedy --infrastructures 1 --random-seed $SEED
- name: centralized formation (optimal) # still experimental
image: python:3.7-buster
environment:
SEED: ${DRONE_BUILD_NUMBER}
commands:
- . .venv/bin/activate
# we are testing both vehicle types
- plafosim --vehicles 100 --penetration 0.5 --time-limit 0.5 --formation-algorithm SpeedPosition --formation-strategy centralized --formation-centralized-kind optimal --infrastructures 1 --random-seed $SEED
trigger:
ref:
- refs/heads/master
- refs/heads/develop
- refs/pull/**
- refs/tags/*
---
kind: pipeline
type: docker
name: correctness
steps:
- name: install (poetry)
image: python:3.7-buster
environment:
POETRY_VIRTUALENVS_IN_PROJECT: true
commands:
- pip install --upgrade pip poetry
- poetry install
- poetry run pip install git+https://github.com/michele-segata/plexe-pyapi.git
- name: Human
image: dbuse/sumo-python:3.7-buster-1_6_0-slim
commands:
- apt update
- apt install time
- . .venv/bin/activate
- ./scripts/validate-cf-model-human-single.sh
- ./scripts/validate-cf-model-human-100.sh
- name: ACC
image: dbuse/sumo-python:3.7-buster-1_6_0-slim
commands:
- apt update
- apt install time
- . .venv/bin/activate
- ./scripts/validate-cf-model-acc-single.sh
- ./scripts/validate-cf-model-acc-100.sh
- name: CACC
image: dbuse/sumo-python:3.7-buster-1_6_0-slim
commands:
- apt update
- apt install time
- . .venv/bin/activate
- ./scripts/validate-cf-model-cacc-100.sh
- name: data
image: maurosoft1973/alpine-lftp
environment:
HOST:
from_secret: ARTIFACTS_HOST
USERNAME:
from_secret: ARTIFACTS_USER
PASSWORD:
from_secret: ARTIFACTS_PASSWORD
BASE_DIR:
from_secret: ARTIFACTS_PATH
DIR: ${DRONE_REPO}/${DRONE_BUILD_NUMBER}/${DRONE_STAGE_NAME}
commands:
- lftp -c "open -u $USERNAME,$PASSWORD $HOST; cd $BASE_DIR; mkdir -pf $DIR; mput -O $DIR *.csv"
- name: upload
image: alpine/git
commands:
- echo "Username '$DRONE_ASKPASS_USERNAME'"
- echo "machine webgit.ccs-labs.org login $DRONE_ASKPASS_USERNAME password $DRONE_ASKPASS_PASSWORD" > ~/.netrc
- git clone ${DRONE_GIT_HTTP_URL/.git/.wiki.git} /wiki
- mkdir -p /wiki/${DRONE_BRANCH}
- cp *.png /wiki/${DRONE_BRANCH}/
- git -C /wiki add /wiki/${DRONE_BRANCH}
- git -C /wiki commit -m"Add validation data for ${DRONE_COMMIT_SHA:0:8} from run ${DRONE_BUILD_NUMBER}"
- git -C /wiki push
when:
branch:
- master
- develop
event:
exclude:
- pull_request
trigger:
ref:
- refs/heads/master
- refs/heads/develop
- refs/pull/**
- refs/tags/*
---
kind: pipeline
type: docker
name: performance
steps:
- name: build
image: python:3.7-buster
commands:
- pip install --upgrade pip poetry
- poetry build
- name: install (wheel)
image: python:3.7-buster
commands:
- python3 -m venv .venv
- . .venv/bin/activate
- pip install --upgrade wheel
- pip install dist/plafosim-*-py3-none-any.whl
- name: Human-5
image: python:3.7-buster
commands:
- . .venv/bin/activate
- plafosim -q --pre-fill true --random-seed 0 --depart-desired true --time-limit 0.1 --road-length 100 --lanes 4 --density 5 --penetration 0 --depart-flow true --random-depart-position true --depart-method number
- name: Human-10
image: python:3.7-buster
commands:
- . .venv/bin/activate
- plafosim -q --pre-fill true --random-seed 0 --depart-desired true --time-limit 0.1 --road-length 100 --lanes 4 --density 10 --penetration 0 --depart-flow true --random-depart-position true --depart-method number
- name: ACC-5
image: python:3.7-buster
commands:
- . .venv/bin/activate
- plafosim -q --pre-fill true --random-seed 0 --depart-desired true --time-limit 0.1 --road-length 100 --lanes 4 --density 5 --penetration 1 --depart-flow true --random-depart-position true --depart-method number
- name: ACC-10
image: python:3.7-buster
commands:
- . .venv/bin/activate
- plafosim -q --pre-fill true --random-seed 0 --depart-desired true --time-limit 0.1 --road-length 100 --lanes 4 --density 10 --penetration 1 --depart-flow true --random-depart-position true --depart-method number
- name: CACC-5
image: python:3.7-buster
commands:
- . .venv/bin/activate
- plafosim -q --pre-fill true --random-seed 0 --depart-desired true --time-limit 0.1 --road-length 100 --lanes 4 --density 5 --penetration 1 --start-as-platoon true
- name: CACC-10
image: python:3.7-buster
commands:
- . .venv/bin/activate
- plafosim -q --pre-fill true --random-seed 0 --depart-desired true --time-limit 0.1 --road-length 100 --lanes 4 --density 10 --penetration 1 --start-as-platoon true
trigger:
ref:
- refs/heads/master
- refs/heads/develop
- refs/pull/**
- refs/tags/*