1
1
name : Test Suite (develop)
2
2
3
+ # note: this workflow is only triggered by the nightly scheduled run.
4
+ # it is identical to master's workflow, but targets the develop branch.
3
5
on :
4
6
schedule :
5
7
- cron : ' 0 23 * * *'
@@ -10,7 +12,7 @@ defaults:
10
12
11
13
jobs :
12
14
cleanup-runs :
13
- if : ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || contains(github.event.pull_request.labels.*.name, 'test tools') || github.event_name == 'schedule' }}
15
+ if : ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || contains(github.event.pull_request.labels.*.name, 'test tools') || contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
14
16
runs-on : ubuntu-latest
15
17
steps :
16
18
- uses : rokroskar/workflow-run-cleanup-action@master
83
85
steps :
84
86
- uses : actions/checkout@v2
85
87
with :
86
- submodules : true
87
- ref : develop
88
+ submodules : true
89
+ ref : develop
88
90
- name : Set up Python 3.8
89
91
uses : actions/setup-python@v2
90
92
with :
@@ -106,3 +108,163 @@ jobs:
106
108
source tests/sources/tools/control/mobile_manipulation/run_ros.sh
107
109
python -m unittest discover -s tests/sources/tools/${{ matrix.package }}
108
110
fi
111
+ build-wheel :
112
+ needs : cleanup-runs
113
+ if : ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
114
+ runs-on : ubuntu-20.04
115
+ steps :
116
+ - uses : actions/checkout@v2
117
+ with :
118
+ submodules : true
119
+ ref : develop
120
+ - name : Set up Python 3.8
121
+ uses : actions/setup-python@v2
122
+ with :
123
+ python-version : 3.8
124
+ - name : Install prerequisites
125
+ run : |
126
+ python -m pip install --upgrade pip
127
+ pip install setuptools wheel twine
128
+ - name : Build Wheel
129
+ run :
130
+ ./bin/build_wheel.sh
131
+ - name : Upload wheel as artifact
132
+ uses : actions/upload-artifact@v2
133
+ with :
134
+ name : wheel-artifact
135
+ path :
136
+ dist/*.tar.gz
137
+ build-docker :
138
+ needs : cleanup-runs
139
+ if : ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
140
+ runs-on : ubuntu-20.04
141
+ steps :
142
+ - uses : actions/checkout@v2
143
+ with :
144
+ submodules : true
145
+ ref : develop
146
+ - name : Build image
147
+ run : |
148
+ docker build --tag opendr/opendr-toolkit:cpu_test --file Dockerfile .
149
+ docker save opendr/opendr-toolkit:cpu_test > cpu_test.zip
150
+ - name : Upload image artifact
151
+ uses : actions/upload-artifact@v2
152
+ with :
153
+ name : docker-artifact
154
+ path :
155
+ cpu_test.zip
156
+ test-wheel :
157
+ needs : build-wheel
158
+ if : ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
159
+ strategy :
160
+ matrix :
161
+ os : [ubuntu-20.04]
162
+ package :
163
+ - engine
164
+ - utils
165
+ - perception/activity_recognition
166
+ - perception/compressive_learning
167
+ - perception/face_recognition
168
+ - perception/heart_anomaly_detection
169
+ - perception/multimodal_human_centric
170
+ - perception/object_tracking_2d
171
+ - perception/pose_estimation
172
+ - perception/speech_recognition
173
+ - perception/skeleton_based_action_recognition
174
+ - perception/semantic_segmentation
175
+ - perception/object_detection_2d
176
+ - perception/facial_expression_recognition
177
+ # - perception/object_detection_3d
178
+ # - control/mobile_manipulation
179
+ # - simulation/human_model_generation
180
+ # - control/single_demo_grasp
181
+ # - perception/object_tracking_3d
182
+ runs-on : ubuntu-20.04
183
+ steps :
184
+ - uses : actions/checkout@v2
185
+ with :
186
+ submodules : true
187
+ ref : develop
188
+ - name : Set up Python 3.8
189
+ uses : actions/setup-python@v2
190
+ with :
191
+ python-version : 3.8
192
+ - name : Download artifact
193
+ uses : actions/download-artifact@v2
194
+ with :
195
+ path : artifact
196
+ - name : Get branch name
197
+ id : branch-name
198
+ uses :
tj-actions/[email protected]
199
+ - name : Test Wheel
200
+ run : |
201
+ export DISABLE_BCOLZ_AVX2=true
202
+ sudo apt -y install python3.8-venv libfreetype6-dev git build-essential cmake python3-dev wget libopenblas-dev libsndfile1 libboost-dev python3-dev
203
+ python3 -m venv venv
204
+ source venv/bin/activate
205
+ wget https://raw.githubusercontent.com/opendr-eu/opendr/${{ steps.branch-name.outputs.current_branch }}/dependencies/pip_requirements.txt
206
+ cat pip_requirements.txt | xargs -n 1 -L 1 pip install
207
+ pip install ./artifact/wheel-artifact/*.tar.gz
208
+ python -m unittest discover -s tests/sources/tools/${{ matrix.package }}
209
+ test-docker :
210
+ needs : build-docker
211
+ if : ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
212
+ strategy :
213
+ matrix :
214
+ os : [ubuntu-20.04]
215
+ package :
216
+ - engine
217
+ - utils
218
+ - perception/activity_recognition
219
+ - perception/compressive_learning
220
+ - perception/face_recognition
221
+ - perception/heart_anomaly_detection
222
+ - perception/multimodal_human_centric
223
+ - perception/object_tracking_2d
224
+ - perception/pose_estimation
225
+ - perception/speech_recognition
226
+ - perception/skeleton_based_action_recognition
227
+ - perception/semantic_segmentation
228
+ - perception/object_detection_2d
229
+ - perception/facial_expression_recognition
230
+ - perception/object_detection_3d
231
+ - control/mobile_manipulation
232
+ - simulation/human_model_generation
233
+ - control/single_demo_grasp
234
+ # - perception/object_tracking_3d
235
+ runs-on : ubuntu-20.04
236
+ steps :
237
+ - name : Download artifact
238
+ uses : actions/download-artifact@v2
239
+ with :
240
+ path : artifact
241
+ - name : Test docker
242
+ run : |
243
+ docker load < ./artifact/docker-artifact/cpu_test.zip
244
+ docker run --name toolkit -i opendr/opendr-toolkit:cpu_test bash
245
+ docker start toolkit
246
+ docker exec -i toolkit bash -c "source bin/activate.sh && source tests/sources/tools/control/mobile_manipulation/run_ros.sh && python -m unittest discover -s tests/sources/tools/${{ matrix.package }}"
247
+ delete-docker-artifacts :
248
+ needs : [build-docker, test-docker]
249
+ if : ${{ always() }}
250
+ strategy :
251
+ matrix :
252
+ os : [ubuntu-20.04]
253
+ runs-on : ${{ matrix.os }}
254
+ steps :
255
+ - name : Delete docker artifacts
256
+ uses : geekyeggo/delete-artifact@v1
257
+ with :
258
+ name : docker-artifact
259
+ delete-wheel-artifacts :
260
+ needs : [build-wheel, test-wheel]
261
+ if : ${{ always() }}
262
+ strategy :
263
+ matrix :
264
+ os : [ubuntu-20.04]
265
+ runs-on : ${{ matrix.os }}
266
+ steps :
267
+ - name : Delete wheel artifacts
268
+ uses : geekyeggo/delete-artifact@v1
269
+ with :
270
+ name : wheel-artifact
0 commit comments