-
Notifications
You must be signed in to change notification settings - Fork 95
448 lines (430 loc) · 18.1 KB
/
tests_suite_develop.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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
name: Test Suite (develop)
# note: this workflow is only triggered by the nightly scheduled run.
# it is identical to master's workflow, but targets the develop branch.
on:
schedule:
- cron: '0 23 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
test-sources:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || github.event_name == 'schedule' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11]
include:
- os: ubuntu-20.04
DEPENDENCIES_INSTALLATION: "sudo apt update; sudo apt -y install clang-format-10 cppcheck"
- os: macos-11
DEPENDENCIES_INSTALLATION: "brew install clang-format@11 cppcheck; ln /usr/local/bin/clang-format-11 /usr/local/bin/clang-format"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
if: matrix.os == 'ubuntu-20.04' || github.event.pull_request.draft == false
with:
submodules: true
ref: develop
- name: Set up Python 3.8
if: matrix.os == 'ubuntu-20.04' || github.event.pull_request.draft == false
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Test Sources
if: matrix.os == 'ubuntu-20.04' || github.event.pull_request.draft == false
run: |
${{ matrix.DEPENDENCIES_INSTALLATION }}
export OPENDR_HOME=$PWD
export OPENDR_DEVICE=cpu
pip install -r tests/requirements.txt
python -m unittest discover -s tests
test-tools:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test tools') || github.event_name == 'schedule' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
package:
- engine
- utils
- perception/activity_recognition
- perception/compressive_learning
- perception/face_recognition
- perception/heart_anomaly_detection
- perception/multimodal_human_centric
- perception/pose_estimation
- perception/fall_detection
- perception/speech_recognition
- perception/skeleton_based_action_recognition/costgcn
- perception/skeleton_based_action_recognition/pstgcn
- perception/skeleton_based_action_recognition/stbln
- perception/skeleton_based_action_recognition/stgcn
- perception/skeleton_based_action_recognition/tagcn
- perception/semantic_segmentation
- perception/binary_high_resolution
- perception/object_tracking_2d
# - perception/object_tracking_3d # passes, but disabled due to free() crash
- perception/object_detection_2d/centernet
- perception/object_detection_2d/detr
- perception/object_detection_2d/gem
- perception/object_detection_2d/ssd
- perception/object_detection_2d/nanodet
- perception/object_detection_2d/yolov3
- perception/object_detection_2d/yolov5
- perception/object_detection_2d/retinaface
- perception/object_detection_2d/nms
# - perception/object_detection_3d # passes, but disabled due to free() crash
- perception/facial_expression_recognition
- simulation/human_model_generation
- control/mobile_manipulation
- control/single_demo_grasp
- planning/end_to_end_planning
- control/multi_object_search
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
ref: develop
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Test Tools
run: |
export ROS_DISTRO=noetic
export OPENDR_HOME=$PWD
./bin/install.sh
source bin/activate.sh
python3 -m pip install -r tests/sources/requirements.txt
if [ ${{ matrix.package }} = "ctests" ]; then
make ctests
else
if [[ ${{ matrix.package }} == "control/mobile_manipulation" || ${{ matrix.package }} == "planning/end_to_end_planning" ]]; then
source tests/sources/tools/control/mobile_manipulation/run_ros.sh
fi
python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}
fi
build-wheel:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: develop
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install prerequisites
run: |
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel twine
- name: Build Wheel
run:
./bin/build_wheel.sh
- name: Upload wheel as artifact
uses: actions/upload-artifact@v2
with:
name: wheel-artifact
path:
dist/*.tar.gz
build-docker:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
steps:
- name: Free Disk Space
uses: jlumbroso/[email protected]
- uses: actions/checkout@v3
with:
submodules: true
ref: develop
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: Build image
run: |
docker build --no-cache --tag opendr/opendr-toolkit:cpu_test --build-arg branch=${{ steps.branch-name.outputs.current_branch }} --build-arg ros_distro=noetic --file Dockerfile .
docker save opendr/opendr-toolkit:cpu_test > cpu_test.zip
- name: Upload image artifact
uses: actions/upload-artifact@v2
with:
name: docker-artifact
path:
cpu_test.zip
test-wheel:
needs: build-wheel
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
package:
- engine
- utils
- perception/activity_recognition
- perception/compressive_learning
- perception/face_recognition
- perception/heart_anomaly_detection
- perception/multimodal_human_centric
- perception/pose_estimation
- perception/fall_detection
- perception/speech_recognition
- perception/skeleton_based_action_recognition/costgcn
- perception/skeleton_based_action_recognition/pstgcn
- perception/skeleton_based_action_recognition/stbln
- perception/skeleton_based_action_recognition/stgcn
- perception/skeleton_based_action_recognition/tagcn
- perception/semantic_segmentation
- perception/binary_high_resolution
- perception/object_tracking_2d
# - perception/object_tracking_3d # passes, but disabled due to free() crash
- perception/object_detection_2d/centernet
- perception/object_detection_2d/detr
- perception/object_detection_2d/gem
- perception/object_detection_2d/ssd
- perception/object_detection_2d/nanodet
- perception/object_detection_2d/yolov3
- perception/object_detection_2d/yolov5
- perception/object_detection_2d/retinaface
- perception/object_detection_2d/nms
# - perception/object_detection_3d # passes, but disabled due to free() crash
- perception/facial_expression_recognition
- simulation/human_model_generation
#- control/multi_object_search
#- control/mobile_manipulation
#- control/single_demo_grasp
#- planning/end_to_end_planning
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: develop
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Download artifact
uses: actions/download-artifact@v2
with:
path: artifact
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: Test Wheel
run: |
export OPENDR_HOME=$PWD
export DISABLE_BCOLZ_AVX2=true
export OPENDR_DEVICE=cpu
export PYTHONPATH=$OPENDR_HOME/src:$PYTHONPATH
export ROS_DISTRO=noetic
sudo apt -y install python3.8-venv libfreetype6-dev git build-essential cmake python3-dev wget libopenblas-dev libsndfile1 libboost-dev python3-dev
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install wheel==0.38.4
# install all tools one at a time
while read f; do
package=$(sed "s/_/-/g" <<< $f)
package=(${package//// })
if [ ! -z ${package[1]} ]; then package=${package[1]}; fi
if [ "$package" != "opendr" ]; then
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-$package-*.tar.gz
fi
done < packages.txt
cd src/opendr/perception/object_detection_2d/retinaface; make; cd $OPENDR_HOME
# run the test
python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}
test-wheel-separate:
needs: build-wheel
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
package:
- engine
- utils
- perception/activity_recognition
- perception/compressive_learning
- perception/face_recognition
- perception/heart_anomaly_detection
- perception/multimodal_human_centric
- perception/pose_estimation
- perception/fall_detection
- perception/speech_recognition
- perception/skeleton_based_action_recognition/costgcn
- perception/skeleton_based_action_recognition/pstgcn
- perception/skeleton_based_action_recognition/stbln
- perception/skeleton_based_action_recognition/stgcn
- perception/skeleton_based_action_recognition/tagcn
- perception/semantic_segmentation
- perception/binary_high_resolution
- perception/object_tracking_2d
# - perception/object_tracking_3d # passes, but disabled due to free() crash
- perception/object_detection_2d/centernet
- perception/object_detection_2d/detr
- perception/object_detection_2d/gem
- perception/object_detection_2d/ssd
- perception/object_detection_2d/nanodet
- perception/object_detection_2d/yolov3
- perception/object_detection_2d/yolov5
- perception/object_detection_2d/retinaface
- perception/object_detection_2d/nms
# - perception/object_detection_3d # passes, but disabled due to free() crash
- perception/facial_expression_recognition
- simulation/human_model_generation
#- control/multi_object_search
#- control/mobile_manipulation
#- control/single_demo_grasp
#- planning/end_to_end_planning
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
ref: develop
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Download artifact
uses: actions/download-artifact@v2
with:
path: artifact
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: Test Wheel Separate
run: |
export OPENDR_HOME=$PWD
export DISABLE_BCOLZ_AVX2=true
export OPENDR_DEVICE=cpu
export PYTHONPATH=$OPENDR_HOME/src:$PYTHONPATH
export ROS_DISTRO=noetic
sudo apt -y install python3.8-venv libfreetype6-dev git build-essential cmake python3-dev wget libopenblas-dev libsndfile1 libboost-dev libeigen3-dev
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install wheel==0.38.4
# get the name of the wheel to install based on the test being run
package=$(sed "s/_/-/g" <<< ${{ matrix.package }})
package=(${package//// })
if [ ! -z ${package[1]} ]; then package=${package[1]}; fi
# all packages require the engine
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-engine-*.tar.gz
# install specific package
if [ ${{ matrix.package }} == "utils" ]; then
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-hyperparameter-tuner-*.tar.gz
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-ambiguity-measure-*.tar.gz
else
# install required dependencies for derived tools, we do so manually to ensure the local one is used
if [ ${{ matrix.package }} == "perception/fall_detection" ]; then
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-pose-estimation-*.tar.gz
elif [ ${{ matrix.package }} == "perception/heart_anomaly_detection" ]; then
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-compressive-learning-*.tar.gz
elif [ ${{ matrix.package }} == "perception/multimodal_human_centric" ]; then
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-compressive-learning-*.tar.gz
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-object-detection-2d-*.tar.gz
elif [ ${{ matrix.package }} == "perception/object_tracking_3d" ]; then
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-object-detection-3d-*.tar.gz
fi
# install the package itself
python3 -m pip install --find-links ./artifact/wheel-artifact/ ./artifact/wheel-artifact/opendr-toolkit-$package-*.tar.gz
fi
if [[ ${{ matrix.package }} == "perception/object_detection_2d/retinaface" ]]; then
cd src/opendr/perception/object_detection_2d/retinaface; make; cd $OPENDR_HOME
fi
# run the test
python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}
test-docker:
needs: build-docker
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
package:
- engine
- utils
- perception/activity_recognition
- perception/compressive_learning
- perception/face_recognition
- perception/heart_anomaly_detection
- perception/multimodal_human_centric
- perception/pose_estimation
- perception/fall_detection
- perception/speech_recognition
- perception/skeleton_based_action_recognition/costgcn
- perception/skeleton_based_action_recognition/pstgcn
- perception/skeleton_based_action_recognition/stbln
- perception/skeleton_based_action_recognition/stgcn
- perception/skeleton_based_action_recognition/tagcn
- perception/semantic_segmentation
- perception/binary_high_resolution
- perception/object_tracking_2d
# - perception/object_tracking_3d # passes, but disabled due to free() crash
- perception/object_detection_2d/centernet
- perception/object_detection_2d/detr
- perception/object_detection_2d/gem
- perception/object_detection_2d/ssd
- perception/object_detection_2d/nanodet
- perception/object_detection_2d/yolov3
- perception/object_detection_2d/yolov5
- perception/object_detection_2d/retinaface
- perception/object_detection_2d/nms
# - perception/object_detection_3d # passes, but disabled due to free() crash
- perception/facial_expression_recognition
- simulation/human_model_generation
- control/mobile_manipulation
- control/single_demo_grasp
- planning/end_to_end_planning
# - control/multi_object_search # needs CUDA Docker container
runs-on: ubuntu-20.04
steps:
- name: Free Disk Space
uses: jlumbroso/[email protected]
- name: Download artifact
uses: actions/download-artifact@v2
with:
path: artifact
- name: Test docker
run: |
docker load < ./artifact/docker-artifact/cpu_test.zip
docker run --name toolkit -i opendr/opendr-toolkit:cpu_test bash
docker start toolkit
if [[ ${{ matrix.package }} == "control/mobile_manipulation" || ${{ matrix.package }} == "planning/end_to_end_planning" ]]; then
docker exec -i toolkit bash -c "source bin/activate.sh && source tests/sources/tools/control/mobile_manipulation/run_ros.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}"
else
docker exec -i toolkit bash -c "source bin/activate.sh && python3 -m unittest discover -s tests/sources/tools/${{ matrix.package }}"
fi
delete-docker-artifacts:
needs: [build-docker, test-docker]
if: ${{ always() }}
strategy:
matrix:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: Delete docker artifacts
uses: geekyeggo/delete-artifact@v1
with:
name: docker-artifact
delete-wheel-artifacts:
needs: [build-wheel, test-wheel, test-wheel-separate]
if: ${{ always() }}
strategy:
matrix:
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: Delete wheel artifacts
uses: geekyeggo/delete-artifact@v1
with:
name: wheel-artifact