Skip to content

Commit d9f27c5

Browse files
ad-danielpassalis
andauthored
Add automatic publishing of wheel and docker (#202)
* 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 <[email protected]> Co-authored-by: Nikolaos <[email protected]>
1 parent 60d0757 commit d9f27c5

File tree

3 files changed

+74
-3
lines changed

3 files changed

+74
-3
lines changed

Diff for: .github/workflows/publisher.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Publisher
2+
3+
# Trigger on new github release, a tag with format vX.Y.Z is expected (used to tag the docker)
4+
on:
5+
release:
6+
types: [published]
7+
8+
env:
9+
OPENDR_VERSION: ${{ github.event.release.tag_name }}
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
15+
jobs:
16+
publish-wheel:
17+
runs-on: ubuntu-20.04
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
submodules: true
22+
- name: Set up Python 3.8
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.8
26+
- name: Install prerequisites
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install setuptools wheel twine
30+
- name: Build Wheel
31+
run: |
32+
./bin/build_wheel.sh
33+
- name: Upload Wheel
34+
env:
35+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
36+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
37+
run : |
38+
twine upload dist/*
39+
publish-docker-cpu:
40+
runs-on: ubuntu-20.04
41+
steps:
42+
- uses: actions/checkout@v2
43+
with:
44+
submodules: true
45+
- name: Build Docker Image
46+
run: docker build --tag opendr-toolkit:cpu_$OPENDR_VERSION --file Dockerfile .
47+
- name: Login to Docker Hub
48+
uses: docker/login-action@v1
49+
with:
50+
username: ${{ secrets.DOCKERHUB_USERNAME }}
51+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
52+
- name: Publish Image
53+
run: |
54+
docker tag opendr-toolkit:cpu_$OPENDR_VERSION opendr/opendr-toolkit:cpu_$OPENDR_VERSION
55+
docker push opendr/opendr-toolkit:cpu_$OPENDR_VERSION
56+
publish-docker-cuda:
57+
runs-on: ubuntu-20.04
58+
steps:
59+
- uses: actions/checkout@v2
60+
with:
61+
submodules: true
62+
- name: Build Docker Image
63+
run: docker build --tag opendr-toolkit:cuda_$OPENDR_VERSION --file Dockerfile-cuda .
64+
- name: Login to Docker Hub
65+
uses: docker/login-action@v1
66+
with:
67+
username: ${{ secrets.DOCKERHUB_USERNAME }}
68+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
69+
- name: Publish Image
70+
run: |
71+
docker tag opendr-toolkit:cuda_$OPENDR_VERSION opendr/opendr-toolkit:cuda_$OPENDR_VERSION
72+
docker push opendr/opendr-toolkit:cuda_$OPENDR_VERSION

Diff for: .github/workflows/test_packages.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
source venv/bin/activate
6262
wget https://raw.githubusercontent.com/opendr-eu/opendr/master/dependencies/pip_requirements.txt
6363
cat pip_requirements.txt | xargs -n 1 -L 1 pip install
64-
# Test new package
6564
pip install opendr-toolkit
6665
python -m unittest discover -s tests/sources/tools/${{ matrix.package }}
6766
test-docker:
@@ -89,7 +88,7 @@ jobs:
8988
- control/mobile_manipulation
9089
- simulation/human_model_generation
9190
- control/single_demo_grasp
92-
#- perception/object_tracking_3d
91+
# - perception/object_tracking_3d
9392
runs-on: ${{ matrix.os }}
9493
steps:
9594
- name: Set up Python 3.8

Diff for: src/opendr/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "1.0"
15+
__version__ = "1.0.0"

0 commit comments

Comments
 (0)