Skip to content
Merged
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
48 changes: 47 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,37 @@ jobs:
path: wheelhouse/*.whl
name: dist-linux-wheels

test_wheels:
name: Test wheel import
needs: [build_wheels]
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Download wheels
uses: actions/download-artifact@v4
with:
name: dist-linux-wheels
path: wheelhouse

- name: Install wheel
run: |
PYTHON_VERSION_NO_DOT=$(echo "${{ matrix.python-version }}" | tr -d '.')
pip install wheelhouse/mach_beamform-*-cp${PYTHON_VERSION_NO_DOT}-*.whl

- name: Test import mach
run: python -c 'import mach; print(mach.__version__)'

upload_all:
name: Upload if release
needs: [build_wheels]
needs: [test_wheels]
runs-on: ubuntu-22.04
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
Expand Down Expand Up @@ -84,3 +112,21 @@ jobs:
- name: Publish to PyPI
run: uv publish
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/

smoke_test:
name: check PyPI release
needs: [upload_all]
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
ignore-empty-workdir: true
enable-cache: false

- name: Test import mach
run: uvx --with mach-beamform --python ${{ matrix.python-version }} python -c 'import mach; print(mach.__version__)'
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ dependencies = [
"array-api-compat>=1.11.0",
"einops>=0.8.0",
"jaxtyping>=0.2.36",
# TODO: remove numpy dependency once jaxtyping no longer implicitly depends on numpy
# https://github.com/patrick-kidger/jaxtyping/issues/360
"numpy>=1.25.0",
]

[project.urls]
Expand Down
2 changes: 2 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.