Browse Source

Add `dora-node-api-python` package publication on pypi to release workflow (#92)

* add `pip` release in release workflow

* add blank space

* Reduce Python verion to 3.7 for default conda support

* Split CI workflows to avoid name collusions

There is a name collusion issue within cargo. See: https://github.com/rust-lang/cargo/issues/6313
That make it impossible to build at the same time the `dora` cli binary,
and the `dora` python shared library.

To avoid the collusion, this commit split the two workflows:
- `main` workflows consists of default-members and is tested on `ci.yml`
- `python` workflow is on `ci-python.yaml` which is only run when python file changed.

* add root example package

* add python version

* Fix Minor pypi release issue

- Name is `dora-rs` and not `dora`
- maturin 0.13 does not have `extension-module` features built in.

* Use `--all` to check build of `dora`

As the cli name was changed to `dora-cli`, we don't have name collusion anymore and can use `--all` flags for building and testing `dora`
tags/v0.0.0-test-pr-120
Xavier Tao GitHub 3 years ago
parent
commit
62b780d92b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 17 deletions
  1. +23
    -0
      .github/workflows/release.yml
  2. +14
    -14
      Cargo.toml
  3. +1
    -1
      apis/python/node/Cargo.toml
  4. +2
    -2
      apis/python/node/pyproject.toml

+ 23
- 0
.github/workflows/release.yml View File

@@ -15,6 +15,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7"]
fail-fast: false
runs-on: ${{ matrix.platform }}

@@ -80,3 +81,25 @@ jobs:
asset_path: archive.zip
asset_name: dora-${{ github.ref_name }}-x86_64-${{ runner.os }}.zip
asset_content_type: application/zip

# Publish Dora Node Python API
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install maturin==0.13.2
- name: Publish wheel
shell: bash
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
run: |
cd apis/python/node
maturin publish \
--no-sdist \
--skip-existing \
-o wheels \
-i python \
--username __token__ \

+ 14
- 14
Cargo.toml View File

@@ -1,19 +1,19 @@
[workspace]
members = [
"apis/c/*",
"apis/python/node",
"apis/rust/*",
"apis/rust/operator/macros",
"apis/rust/operator/types",
"binaries/*",
"examples/rust-dataflow/*",
"examples/c++-dataflow/*-rust-*",
"examples/iceoryx/*",
"libraries/communication-layer",
"libraries/core",
"libraries/message",
"libraries/extensions/telemetry/*",
"libraries/extensions/zenoh-logger",
"apis/c/*",
"apis/python/node",
"apis/rust/*",
"apis/rust/operator/macros",
"apis/rust/operator/types",
"binaries/*",
"examples/rust-dataflow/*",
"examples/c++-dataflow/*-rust-*",
"examples/iceoryx/*",
"libraries/communication-layer",
"libraries/core",
"libraries/message",
"libraries/extensions/telemetry/*",
"libraries/extensions/zenoh-logger",
]

[package]


+ 1
- 1
apis/python/node/Cargo.toml View File

@@ -8,7 +8,7 @@ license = "Apache-2.0"

[dependencies]
dora-node-api = { path = "../../rust/node" }
pyo3 = { version = "0.16", features = ["eyre", "abi3-py38"] }
pyo3 = { version = "0.16", features = ["eyre", "abi3-py37"] }
eyre = "0.6"
serde_yaml = "0.8.23"
flume = "0.10.14"


+ 2
- 2
apis/python/node/pyproject.toml View File

@@ -1,9 +1,9 @@
[build-system]
requires = ["maturin>=0.13,<0.14"]
requires = ["maturin>=0.13.2,<0.14"]
build-backend = "maturin"

[project]
name = "dora"
name = "dora-rs"

[tool.maturin]
features = ["pyo3/extension-module"]

Loading…
Cancel
Save