Skip to content

Commit

Permalink
Add automatic publishing of wheel and docker (#202)
Browse files Browse the repository at this point in the history
* 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

* Minimal

* Refactor workflow

* disable temporarely

* Fix docker mobile manipulation

* Re-enable test

* add badge

* Fix changelog

* remove test install reference

* test build process

* Fix

* version bump

* manual trigger

* Fix workflow

* Minor

* add cuda docker

* Minor

* Fix Token

* Publish wheel to testpypi

* Cleanup

* Specify version

* cleanup and check

* Fix

* Docker push test

* remove if

* Prepare for merge

* Fix pypi credentials

Co-authored-by: Nikolaos Passalis <passalis@users.noreply.github.com>
Co-authored-by: Nikolaos <passalis@csd.auth.gr>
  • Loading branch information
3 people authored Jan 25, 2022
1 parent 60d0757 commit d9f27c5
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 3 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/publisher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Publisher

# Trigger on new github release, a tag with format vX.Y.Z is expected (used to tag the docker)
on:
release:
types: [published]

env:
OPENDR_VERSION: ${{ github.event.release.tag_name }}

defaults:
run:
shell: bash

jobs:
publish-wheel:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- 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
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run : |
twine upload dist/*
publish-docker-cpu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build Docker Image
run: docker build --tag opendr-toolkit:cpu_$OPENDR_VERSION --file Dockerfile .
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Publish Image
run: |
docker tag opendr-toolkit:cpu_$OPENDR_VERSION opendr/opendr-toolkit:cpu_$OPENDR_VERSION
docker push opendr/opendr-toolkit:cpu_$OPENDR_VERSION
publish-docker-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build Docker Image
run: docker build --tag opendr-toolkit:cuda_$OPENDR_VERSION --file Dockerfile-cuda .
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Publish Image
run: |
docker tag opendr-toolkit:cuda_$OPENDR_VERSION opendr/opendr-toolkit:cuda_$OPENDR_VERSION
docker push opendr/opendr-toolkit:cuda_$OPENDR_VERSION
3 changes: 1 addition & 2 deletions .github/workflows/test_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
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:
Expand Down Expand Up @@ -89,7 +88,7 @@ jobs:
- control/mobile_manipulation
- simulation/human_model_generation
- control/single_demo_grasp
#- perception/object_tracking_3d
# - perception/object_tracking_3d
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python 3.8
Expand Down
2 changes: 1 addition & 1 deletion src/opendr/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.0"
__version__ = "1.0.0"

0 comments on commit d9f27c5

Please sign in to comment.