forked from opendr-eu/opendr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic test of pip and docker (opendr-eu#200)
* Test pip installation * Trigger * Fix * Minor * Updated wheel test * Added libopenblas install * Temporary test disable * Temporary test disable * Added libsndfile1 dependency * Restored disabled test * New wheel building pipeline * Update build_wheel.sh * Added libboost-dev dep * Update installation.md * Switch to sdist * sdist workflow * Update tests_suite.yml * Added numpy include dirs * Disabled two 3d detection tests * Disabled three 3d detection tests * Disabled five 3d detection tests * Disabled all 3d detection tests * Disabled model download - 3d test * Disabled everything? * Removed imports from 3d object detection test * Import test * Import test * Import test * Import test * Import test * Import test * Restored test * Disabled object detection 3d test * Refactor workflow * disable temporarely * Fix docker mobile manipulation * Re-enable test * add badge * Fix changelog * remove test install reference * Restored pip installation Co-authored-by: Nikolaos Passalis <passalis@users.noreply.github.com> Co-authored-by: Nikolaos <passalis@csd.auth.gr>
- Loading branch information
1 parent
e499aed
commit 51e2ffc
Showing
9 changed files
with
147 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Test Packages | ||
# This workflow tests the latest (third-party hosted) available builds | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, labeled, unlabeled] | ||
schedule: | ||
- cron: '0 23 * * *' | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
|
||
jobs: | ||
cleanup-runs: | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'test packages') || github.event_name == 'schedule' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: rokroskar/workflow-run-cleanup-action@master | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
test-wheel: | ||
needs: cleanup-runs | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'test packages') || 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: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- 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/master/dependencies/pip_requirements.txt | ||
cat pip_requirements.txt | xargs -n 1 -L 1 pip install | ||
# Test new package | ||
pip install opendr-toolkit | ||
python -m unittest discover -s tests/sources/tools/${{ matrix.package }} | ||
test-docker: | ||
needs: cleanup-runs | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'test packages') || 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: ${{ matrix.os }} | ||
steps: | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Test Docker | ||
run: | | ||
docker run --name toolkit -i opendr/opendr-toolkit:cpu_latest 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 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
recursive-include src/opendr * | ||
include requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Build all OpenDR dependecies | ||
./bin/install.sh | ||
|
||
# Activate OpenDR | ||
source ./bin/activate.sh | ||
|
||
# Prepare requirements.txt for wheel distributions | ||
pip3 freeze > requirements.txt | ||
|
||
# Remove detectron and git repositories (installation not supported through PyPI) | ||
sed -i '/detectron2/d' requirements.txt | ||
sed -i '/git/d' requirements.txt | ||
sed -i '/pkg_resources/d' requirements.txt | ||
sed -i '/auditwheel/d' requirements.txt | ||
|
||
# Build binary wheel and repair it | ||
python3 setup.py sdist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters