Drop support for Python 3.9 #140
This file contains hidden or 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 | |
| archs: auto | |
| - os: macos-latest | |
| archs: x86_64 arm64 | |
| - os: ubuntu-latest | |
| archs: aarch64 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| cache: pip | |
| - name: Set up QEMU to build non-native architectures | |
| if: ${{ matrix.archs == '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.archs }} | |
| CIBW_ENABLE: "pypy" | |
| # Skip building for PyPy 3.10 https://github.com/pypa/cibuildwheel/issues/2518 | |
| CIBW_SKIP: "pp310-*" | |
| - name: Check packages | |
| run: twine check dist/* | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: "packages-${{ matrix.os }}-${{ matrix.archs }}" | |
| path: dist/ | |
| build_sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| cache: pip | |
| - 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@v5 | |
| with: | |
| name: packages-sdist | |
| path: dist/ | |
| upload_pypi: | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| merge-multiple: true | |
| path: dist | |
| pattern: packages-* | |
| - name: Display structure of downloaded files | |
| run: ls -R dist/ | |
| - name: Publish to PyPI | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'bxlab' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} |