Skip to content

Commit

Permalink
Synchronize master and develop workflows (#236)
Browse files Browse the repository at this point in the history
* Synchronize master and develop workflows

* comment
  • Loading branch information
ad-daniel authored Mar 4, 2022
1 parent f2eb5a6 commit ae5b869
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/tests_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test Suite (master)

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
types: [opened, synchronize, reopened, labeled, unlabeled]
schedule:
- cron: '0 23 * * *'

Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v2
if: matrix.os == 'ubuntu-20.04' || github.event.pull_request.draft == false
with:
submodules: true
submodules: true
- name: Set up Python 3.8
if: matrix.os == 'ubuntu-20.04' || github.event.pull_request.draft == false
uses: actions/setup-python@v2
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
submodules: true
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
submodules: true
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
Expand All @@ -138,7 +138,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
submodules: true
- name: Build image
run: |
docker build --tag opendr/opendr-toolkit:cpu_test --file Dockerfile .
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
submodules: true
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
Expand Down
168 changes: 165 additions & 3 deletions .github/workflows/tests_suite_develop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
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 * * *'
Expand All @@ -10,7 +12,7 @@ defaults:

jobs:
cleanup-runs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test sources') || contains(github.event.pull_request.labels.*.name, 'test tools') || github.event_name == 'schedule' }}
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' }}
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
Expand Down Expand Up @@ -83,8 +85,8 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
ref: develop
submodules: true
ref: develop
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
Expand All @@ -106,3 +108,163 @@ jobs:
source tests/sources/tools/control/mobile_manipulation/run_ros.sh
python -m unittest discover -s tests/sources/tools/${{ matrix.package }}
fi
build-wheel:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
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: Install prerequisites
run: |
python -m pip install --upgrade pip
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:
needs: cleanup-runs
if: ${{ contains(github.event.pull_request.labels.*.name, 'test release') || github.event_name == 'schedule' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
ref: develop
- name: Build image
run: |
docker build --tag opendr/opendr-toolkit:cpu_test --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:
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/object_tracking_2d
- perception/pose_estimation
- perception/speech_recognition
- perception/skeleton_based_action_recognition
- perception/semantic_segmentation
- perception/object_detection_2d
- perception/facial_expression_recognition
# - perception/object_detection_3d
# - control/mobile_manipulation
# - simulation/human_model_generation
# - control/single_demo_grasp
# - perception/object_tracking_3d
runs-on: ubuntu-20.04
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: Download artifact
uses: actions/download-artifact@v2
with:
path: artifact
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.1
- name: Test Wheel
run: |
export DISABLE_BCOLZ_AVX2=true
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
wget https://raw.githubusercontent.com/opendr-eu/opendr/${{ steps.branch-name.outputs.current_branch }}/dependencies/pip_requirements.txt
cat pip_requirements.txt | xargs -n 1 -L 1 pip install
pip install ./artifact/wheel-artifact/*.tar.gz
python -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:
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/object_tracking_2d
- perception/pose_estimation
- perception/speech_recognition
- perception/skeleton_based_action_recognition
- perception/semantic_segmentation
- perception/object_detection_2d
- perception/facial_expression_recognition
- perception/object_detection_3d
- control/mobile_manipulation
- simulation/human_model_generation
- control/single_demo_grasp
# - perception/object_tracking_3d
runs-on: ubuntu-20.04
steps:
- 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
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 }}"
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]
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

0 comments on commit ae5b869

Please sign in to comment.