Skip to content

Modernization galore #10

Modernization galore

Modernization galore #10

Workflow file for this run

name: Wheel building
on:
pull_request:
# We also want this workflow triggered if the 'Build all wheels'
# label is added or present when PR is updated
types:
- synchronize
- labeled
push:
branches:
- master
tags:
- '*'
permissions:
contents: read
jobs:
build_and_publish:
# This job builds the wheels and publishes them to PyPI for all
# tags. For PRs with the "Build wheels" label, wheels are built,
# but are not uploaded to PyPI.
permissions:
contents: none
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1
if: (github.repository == 'spacetelescope/spherical_geometry' && (github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Build wheels')))
with:
# We upload to PyPI for all tag pushes
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
test_extras: test
test_command: pytest -p no:warnings --pyargs spherical_geometry -v
targets: |
# Linux wheels
- cp3*-manylinux_x86_64
- cp3*-musllinux_x86_64
- cp3*-manylinux_aarch64
# MacOS X wheels - we deliberately do not build universal2 wheels.
# Note that the arm64 wheels are not actually tested so we
# rely on local manual testing of these to make sure they are ok.
- cp3*macosx_x86_64
- cp3*macosx_arm64
# Windows wheels
- cp3*win32
- cp3*win_amd64
secrets:
pypi_token: ${{ secrets.PYPI_TOKEN }}