Skip to content

Workflow file for this run

name: Build wheels and sdist and upload to PyPI
on:
release:
types:
- published
workflow_dispatch:
jobs:
build_linux_wheels:
name: Build wheels on standard linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 2
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "*manylinux*"
CIBW_SKIP: cp36* cp37* pp*
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_BUILD: pip install -U pybind11-global
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_musl_wheels:
name: Build wheels on musl linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 2
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "*musllinux*"
CIBW_SKIP: cp36* cp37* pp*
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_BUILD: pip install -U pybind11-global
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_macosx_wheels:
name: Build wheels on macosx
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 2
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "*macosx*"
CIBW_SKIP: cp36* cp37* pp*
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_BUILD: pip install -U pybind11-global
CIBW_BEFORE_TEST: pip install -U -r test_requirements.txt
CIBW_TEST_COMMAND: pytest --skip_gha {package}/tests
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build sdist and upload to PyPI
needs: [build_linux_wheels, build_musl_wheels, build_macosx_wheels]
# Just need to build sdist on a single machine
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 2
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -U numpy setuptools
pip install -U -r requirements.txt
pip install -U pybind11-global
- name: Download wheels
uses: actions/download-artifact@v3
with:
path: ./wheels
- name: Build sdist
run: |
python setup.py sdist
ls -l dist
tar tvfz dist/batoid-*.tar.gz
- name: Copy wheels
run: |
echo ls -l wheels
ls -l wheels
echo ls -l wheels/artifact
ls -l wheels/artifact
cp wheels/artifact/*.whl dist
echo ls -l dist
ls -l dist
# - name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TESTPYPI_PASSWORD }}
# repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_PASSWORD }}
verbose: true