-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
74 additions
and
7 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: python | ||
|
||
on: [push, pull_request] | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
build_wheels: | ||
|
@@ -11,7 +11,7 @@ jobs: | |
- os: ubuntu-latest | ||
target: x86_64 | ||
- os: macos-latest | ||
target: universal2-apple-darwin | ||
target: x86_64 | ||
|
||
steps: | ||
- name: checkout | ||
|
@@ -28,30 +28,50 @@ jobs: | |
with: | ||
python-version: 3.9 | ||
architecture: x64 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: build wheel | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist | ||
manylinux: auto | ||
args: --release -m crates/optik-py/Cargo.toml --out dist | ||
sccache: true | ||
- name: delocate wheel (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
pip install delocate | ||
delocate-wheel -v dist/*.whl | ||
- name: install built wheel | ||
run: | | ||
pip install optik_py --no-index --find-links dist | ||
pip install optik --no-index --find-links dist | ||
python -c "import optik" | ||
- name: upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
upload_release: | ||
sdist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build sdist | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
command: sdist | ||
args: --out dist --manifest-path crates/optik-py/Cargo.toml | ||
- name: upload sdist | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
prerelease: | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: push-${{ github.ref_name }}-prerelease | ||
cancel-in-progress: true | ||
needs: [build_wheels] | ||
needs: [build_wheels, sdist] | ||
steps: | ||
- uses: dev-drprasad/[email protected] | ||
with: | ||
|
@@ -75,3 +95,19 @@ jobs: | |
removeArtifacts: true | ||
replacesArtifacts: true | ||
artifacts: "wheels/*" | ||
|
||
public: | ||
name: publish to PyPI | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [build_wheels, sdist] | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
- uses: PyO3/maturin-action@v1 | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
with: | ||
command: upload | ||
args: --non-interactive --skip-existing * |
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,25 @@ | ||
[project] | ||
name = "optik" | ||
version = "0.1.0" | ||
description = "An optimizing IK solver based on the Lie group of rigid transforms SE(3)" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = "MIT OR Apache-2.0" | ||
authors = [ | ||
{email = "[email protected]"}, | ||
{name = "Kyle Cesare"} | ||
] | ||
classifiers = [ | ||
"Topic :: Scientific/Engineering" | ||
] | ||
dependencies = [] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/kylc/optik" | ||
|
||
[build-system] | ||
requires = ["maturin>=1.0,<2.0"] | ||
build-backend = "maturin" | ||
|
||
[tool.maturin] | ||
manifest-path = "crates/optik-py/Cargo.toml" |