Skip to content

Commit ae5b869

Browse files
authored
Synchronize master and develop workflows (#236)
* Synchronize master and develop workflows * comment
1 parent f2eb5a6 commit ae5b869

File tree

2 files changed

+171
-9
lines changed

2 files changed

+171
-9
lines changed

Diff for: .github/workflows/tests_suite.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Test Suite (master)
22

33
on:
44
pull_request:
5-
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
5+
types: [opened, synchronize, reopened, labeled, unlabeled]
66
schedule:
77
- cron: '0 23 * * *'
88

@@ -36,7 +36,7 @@ jobs:
3636
- uses: actions/checkout@v2
3737
if: matrix.os == 'ubuntu-20.04' || github.event.pull_request.draft == false
3838
with:
39-
submodules: true
39+
submodules: true
4040
- name: Set up Python 3.8
4141
if: matrix.os == 'ubuntu-20.04' || github.event.pull_request.draft == false
4242
uses: actions/setup-python@v2
@@ -84,7 +84,7 @@ jobs:
8484
steps:
8585
- uses: actions/checkout@v2
8686
with:
87-
submodules: true
87+
submodules: true
8888
- name: Set up Python 3.8
8989
uses: actions/setup-python@v2
9090
with:
@@ -113,7 +113,7 @@ jobs:
113113
steps:
114114
- uses: actions/checkout@v2
115115
with:
116-
submodules: true
116+
submodules: true
117117
- name: Set up Python 3.8
118118
uses: actions/setup-python@v2
119119
with:
@@ -138,7 +138,7 @@ jobs:
138138
steps:
139139
- uses: actions/checkout@v2
140140
with:
141-
submodules: true
141+
submodules: true
142142
- name: Build image
143143
run: |
144144
docker build --tag opendr/opendr-toolkit:cpu_test --file Dockerfile .
@@ -179,7 +179,7 @@ jobs:
179179
steps:
180180
- uses: actions/checkout@v2
181181
with:
182-
submodules: true
182+
submodules: true
183183
- name: Set up Python 3.8
184184
uses: actions/setup-python@v2
185185
with:

Diff for: .github/workflows/tests_suite_develop.yml

+165-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Test Suite (develop)
22

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.
35
on:
46
schedule:
57
- cron: '0 23 * * *'
@@ -10,7 +12,7 @@ defaults:
1012

1113
jobs:
1214
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' }}
1416
runs-on: ubuntu-latest
1517
steps:
1618
- uses: rokroskar/workflow-run-cleanup-action@master
@@ -83,8 +85,8 @@ jobs:
8385
steps:
8486
- uses: actions/checkout@v2
8587
with:
86-
submodules: true
87-
ref: develop
88+
submodules: true
89+
ref: develop
8890
- name: Set up Python 3.8
8991
uses: actions/setup-python@v2
9092
with:
@@ -106,3 +108,163 @@ jobs:
106108
source tests/sources/tools/control/mobile_manipulation/run_ros.sh
107109
python -m unittest discover -s tests/sources/tools/${{ matrix.package }}
108110
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

Comments
 (0)