Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- 'main'
- 'skydio-export-master'
tags:
- 'v*.*.*'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -131,3 +133,33 @@ jobs:
with:
name: symforce-wheels
delete-merged: true

# publish-to-pypi:
# name: Publish Python 🐍 distribution 📦 to PyPI
# strategy:
# matrix:
# package: [symforce, symforce_sym, skymarshal]
# if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
# needs:
# - merge-wheel-artifacts
# runs-on: ubuntu-latest

# environment:
# name: testpypi
# url: https://test.pypi.org/p/${{ matrix.package }}

# permissions:
# id-token: write

# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v4
# with:
# name: symforce-wheels
# path: wheels-download/
# - run: mkdir dist && cp wheels-download/${{ matrix.package }}-*.whl dist/
# - name: Publish distribution 📦 to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# verbose: true
# repository-url: https://test.pypi.org/legacy/
12 changes: 6 additions & 6 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ To set the symbolic API, you can either use :func:`symforce.set_symbolic_api()`
Building wheels
*************************************************

Wheels are built automatically for pushes to the main branch, by the ``build_wheels`` GitHub
Actions workflow. Previous runs of this workflow will have the built wheels available as an
artifact. The workflow can also be run manually on a branch. All runs will have wheels available
on the action as a ``symforce-wheels.zip`` artifact. Tagged commits will also push to PyPI
automatically.

You should be able to build Python wheels of symforce the standard ways. We recommend using
``build``, i.e. running ``python3 -m build --wheel`` from the ``symforce`` directory. By default,
this will build a wheel that includes local dependencies on the ``skymarshal`` and ``symforce-sym``
Expand All @@ -107,12 +113,6 @@ typically want to set the environment variable ``SYMFORCE_REWRITE_LOCAL_DEPENDEN
release version when building, and also run ``python3 -m build --wheel third_party/skymarshal`` and
``python3 -m build --wheel gen/python`` to build wheels for those packages separately.

For SymForce releases, all of this is handled by the ``build_wheels`` GitHub Actions workflow. This
workflow is currently run manually on a commit, and produces a ``symforce-wheels.zip`` artifact with
wheels (and sdists) for distribution (e.g. on PyPI). It doesn't upload them to PyPI - to do that
(after verifying that the built wheels work as expected) you should download and unzip the archive,
and upload to PyPI with ``python -m twine upload [--repository testpypi] --verbose *``.

*************************************************
Adding new types
*************************************************
Expand Down