site.cfg is unsupported in numpy>=1.26 #71
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
name: Deploy | |
on: [push, pull_request] | |
concurrency: | |
group: deploy-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_wheels: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: auto | |
- os: macos-latest | |
arch: x86_64 arm64 | |
- os: ubuntu-latest | |
arch: aarch64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Set up QEMU to build non-native architectures | |
if: ${{ matrix.arch == 'aarch64' }} | |
uses: docker/setup-qemu-action@v3 | |
- name: Install required Python packages | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install 'cibuildwheel>=2.2.0' twine | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir dist | |
env: | |
CIBW_ARCHS: ${{matrix.arch}} | |
# Skip building musllinux wheels for now, they take too long to build, | |
# mainly because numpy doesn't have musllinux wheels on PyPI yet. | |
# Skip also building for PyPy 3.7-3.8, which are deprecated upstream. | |
CIBW_SKIP: '*-musllinux* pp37-* pp38-*' | |
- name: Check packages | |
run: twine check dist/* | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: packages | |
path: dist/ | |
build_sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install required Python packages | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install build twine | |
- name: Build sdist | |
run: | | |
python -m build --sdist | |
python -m venv test_venv | |
. test_venv/bin/activate | |
python -m pip install dist/*.tar.gz | |
# Test with the same command specified for cibuildwheel in pyproject.toml | |
python -c 'import bx, bx.align, bx.align.sitemask, bx.align.tools, bx.arrays, bx.bbi, bx.cookbook, bx.intervals, bx.intervals.operations, bx.intseq, bx.misc, bx.motif, bx.motif.io, bx.motif.logo, bx.phylo, bx.pwm, bx.seq, bx.tabular, bx_extras' | |
- name: Check packages | |
run: twine check dist/* | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: packages | |
path: dist/ | |
upload_pypi: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'bxlab' | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: packages | |
path: dist | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |