Skip to content

Commit

Permalink
Update GitHub Actions to build and test for Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Oct 21, 2024
1 parent 8f3d32c commit 77c5371
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 43 deletions.
91 changes: 53 additions & 38 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ jobs:
- cp310-manylinux_aarch64
- cp311-manylinux_aarch64
- cp312-manylinux_aarch64
- cp313-manylinux_aarch64
- pp37-manylinux_aarch64
- pp38-manylinux_aarch64
- pp39-manylinux_aarch64
- pp310-manylinux_aarch64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up QEMU
Expand All @@ -33,7 +34,7 @@ jobs:
with:
platforms: all
- name: Build manylinux wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_ARCHS: aarch64
CIBW_BUILD: ${{ matrix.python-tag }}
Expand All @@ -43,9 +44,9 @@ jobs:
CIBW_TEST_REQUIRES: importlib-resources biopython
with:
output-dir: dist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.python-tag }}
path: dist/*

wheel-linux-x86_64:
Expand All @@ -60,16 +61,17 @@ jobs:
- cp310-manylinux_x86_64
- cp311-manylinux_x86_64
- cp312-manylinux_x86_64
- cp313-manylinux_x86_64
- pp37-manylinux_x86_64
- pp38-manylinux_x86_64
- pp39-manylinux_x86_64
- pp310-manylinux_x86_64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Build manylinux wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_ARCHS: x86_64
CIBW_BUILD: ${{ matrix.python-tag }}
Expand All @@ -79,9 +81,9 @@ jobs:
CIBW_TEST_REQUIRES: importlib-resources biopython
with:
output-dir: dist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.python-tag }}
path: dist/*

wheel-macos-x86_64:
Expand All @@ -96,16 +98,17 @@ jobs:
- cp310-macosx_x86_64
- cp311-macosx_x86_64
- cp312-macosx_x86_64
- cp313-macosx_x86_64
- pp37-macosx_x86_64
- pp38-macosx_x86_64
- pp39-macosx_x86_64
- pp310-macosx_x86_64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Build manylinux wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_ARCHS: x86_64
CIBW_BUILD: ${{ matrix.python-tag }}
Expand All @@ -116,9 +119,9 @@ jobs:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.12
with:
output-dir: dist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.python-tag }}
path: dist/*

wheel-macos-aarch64:
Expand All @@ -132,12 +135,13 @@ jobs:
- cp310-macosx_arm64
- cp311-macosx_arm64
- cp312-macosx_arm64
- cp313-macosx_arm64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Build manylinux wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_ARCHS: arm64
CIBW_BUILD: ${{ matrix.python-tag }}
Expand All @@ -148,9 +152,9 @@ jobs:
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.12
with:
output-dir: dist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.python-tag }}
path: dist/*

# wheel-win32-x86_64:
Expand All @@ -164,19 +168,21 @@ jobs:
# - cp39-win_amd64
# - cp310-win_amd64
# - cp311-win_amd64
# - cp312-win_amd64
# - cp313-win_amd64
# - pp37-win_amd64
# - pp38-win_amd64
# - pp39-win_amd64
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# with:
# submodules: true
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# - name: Build manylinux wheels
# uses: pypa/cibuildwheel@v2.11.3
# uses: pypa/cibuildwheel@v2.21.3
# env:
# CIBW_ARCHS: AMD64
# CIBW_BUILD: ${{ matrix.python-tag }}
Expand All @@ -186,30 +192,31 @@ jobs:
# CIBW_TEST_REQUIRES: importlib-resources
# with:
# output-dir: dist
# - uses: actions/upload-artifact@v3
# - name: Store built wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels
# name: wheels-${{ matrix.python-tag }}
# path: dist/*

sdist:
runs-on: ubuntu-latest
name: Build source distribution
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.11
uses: actions/setup-python@v2
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: '3.13'
- name: Install build requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: Build source distribution
run: python -m build -s .
- name: Store built source distribution
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wheels
name: sdist
path: dist/*

test-sdist:
Expand All @@ -218,15 +225,15 @@ jobs:
needs:
- sdist
steps:
- name: Setup Python 3.11
uses: actions/setup-python@v2
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Download built wheels
uses: actions/download-artifact@v2
python-version: '3.13'
- name: Download source distribution
uses: actions/download-artifact@v4
with:
name: wheels
path: dist/
name: sdist
path: dist/
- name: Update pip to latest version
run: python -m pip install -U pip setuptools wheel
- name: Install built wheel
Expand All @@ -247,10 +254,18 @@ jobs:
- wheel-macos-x86_64
# - wheel-win32-x86_64
steps:
- uses: actions/download-artifact@v2
- name: Download source distribution
uses: actions/download-artifact@v4
with:
name: wheels
path: dist
name: sdist
path: dist/
merge-multiple: true
- name: Download wheel distributions
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist/
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags')

Expand Down Expand Up @@ -278,11 +293,11 @@ jobs:
- sdist
- upload
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Download built wheels
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- python-version: '3.12'
python-release: v3.12
python-impl: CPython
- python-version: '3.13'
python-release: v3.13
python-impl: CPython
- python-version: pypy-3.7
python-release: v3.7
python-impl: PyPy
Expand All @@ -47,7 +50,7 @@ jobs:
python-impl: PyPy
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -95,6 +98,9 @@ jobs:
- python-version: '3.12'
python-release: v3.12
python-impl: CPython
- python-version: '3.13'
python-release: v3.13
python-impl: CPython
- python-version: pypy-3.7
python-release: v3.7
python-impl: PyPy
Expand Down Expand Up @@ -157,7 +163,7 @@ jobs:
# python-impl: PyPy
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# uses: actions/checkout@v4
# with:
# submodules: true
# - name: Cache built C files
Expand Down Expand Up @@ -192,12 +198,12 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: 3.11
python-release: v3.11
- python-version: 3.13
python-release: v3.13
python-impl: CPython
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python ${{ matrix.python-version }}
Expand Down

0 comments on commit 77c5371

Please sign in to comment.