Skip to content

Commit

Permalink
Update GitHub Actions configuration to build and release for Python 3…
Browse files Browse the repository at this point in the history
….12 and PyPy 3.10
  • Loading branch information
althonos committed Feb 20, 2024
1 parent d83af9f commit b325209
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
36 changes: 16 additions & 20 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

wheel-linux-aarch64:
name: Build Linux wheels (Aarch64)
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-tag:
Expand All @@ -19,9 +19,11 @@ jobs:
- cp39-manylinux_aarch64
- cp310-manylinux_aarch64
- cp311-manylinux_aarch64
- cp312-manylinux_aarch64
- pp37-manylinux_aarch64
- pp38-manylinux_aarch64
- pp39-manylinux_aarch64
- pp310-manylinux_aarch64
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -32,7 +34,7 @@ jobs:
with:
platforms: all
- name: Build manylinux wheels
uses: pypa/cibuildwheel@v2.11.3
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS: aarch64
CIBW_BUILD: ${{ matrix.python-tag }}
Expand All @@ -59,19 +61,17 @@ jobs:
- cp39-manylinux_x86_64
- cp310-manylinux_x86_64
- cp311-manylinux_x86_64
- cp312-manylinux_x86_64
- pp37-manylinux_x86_64
- pp38-manylinux_x86_64
- pp39-manylinux_x86_64
- pp310-manylinux_x86_64
steps:
- uses: actions/checkout@v3
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.16.2
env:
CIBW_ARCHS: x86_64
CIBW_BUILD: ${{ matrix.python-tag }}
Expand All @@ -88,7 +88,7 @@ jobs:

wheel-macos-x86_64:
name: Build MacOS wheels (x86-64)
runs-on: macOS-11
runs-on: macOS-12
strategy:
matrix:
python-tag:
Expand All @@ -98,26 +98,25 @@ jobs:
- cp39-macosx_x86_64
- cp310-macosx_x86_64
- cp311-macosx_x86_64
- cp312-macosx_x86_64
- pp37-macosx_x86_64
- pp38-macosx_x86_64
- pp39-macosx_x86_64
- pp310-macosx_x86_64
steps:
- uses: actions/checkout@v3
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.16.2
env:
CIBW_ARCHS: x86_64
CIBW_BUILD: ${{ matrix.python-tag }}
CIBW_BEFORE_BUILD: pip install cython
CIBW_BUILD_VERBOSITY: 2
CIBW_TEST_COMMAND: python -m unittest pyfastani.tests -vv
CIBW_TEST_REQUIRES: importlib-resources biopython
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.12
with:
output-dir: dist
- uses: actions/upload-artifact@v3
Expand All @@ -127,32 +126,29 @@ jobs:

wheel-macos-aarch64:
name: Build MacOS wheels (Aarch64)
runs-on: macOS-11
runs-on: macOS-12
strategy:
matrix:
python-tag:
- cp38-macosx_arm64
- cp39-macosx_arm64
- cp310-macosx_arm64
- cp311-macosx_arm64
- cp312-macosx_arm64
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: aarch64-apple-darwin
- name: Build manylinux wheels
uses: pypa/cibuildwheel@v2.11.3
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS: arm64
CIBW_BUILD: ${{ matrix.python-tag }}
CIBW_BEFORE_BUILD: pip install cython
CIBW_BUILD_VERBOSITY: 2
CIBW_TEST_COMMAND: python -m unittest pyfastani.tests -vv
CIBW_TEST_REQUIRES: importlib-resources biopython
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.12
with:
output-dir: dist
- uses: actions/upload-artifact@v3
Expand Down
44 changes: 24 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

test_linux:
name: Test (Linux)
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
OS: Linux
strategy:
Expand All @@ -33,6 +33,9 @@ jobs:
- python-version: '3.11'
python-release: v3.11
python-impl: CPython
- python-version: '3.12'
python-release: v3.12
python-impl: CPython
- python-version: pypy-3.7
python-release: v3.7
python-impl: PyPy
Expand All @@ -42,32 +45,29 @@ jobs:
- python-version: pypy-3.9
python-release: v3.9
python-impl: PyPy
- python-version: pypy-3.10
python-release: v3.10
python-impl: PyPy
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Python requirements
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: ${{ runner.os }}-pip-${{ matrix.python-version }}
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install Python requirements
run: python -m pip install -r .github/workflows/requirements.txt
- name: Build C extension
- name: Build C extension in debug mode
run: python setup.py build_ext --inplace --debug
- name: Install numpy
run: python -m pip install numpy
run: python -m pip install --prefer-binary numpy
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
- name: Install tests requirements
run: python -m pip install -r pyfastani/tests/requirements.txt --prefer-binary
run: python -m pip install --prefer-binary -r pyfastani/tests/requirements.txt
- name: Test with coverage
run: python -m coverage run -m unittest discover -vv
- name: Upload to Codecov
Expand Down Expand Up @@ -108,6 +108,9 @@ jobs:
- python-version: '3.11'
python-release: v3.11
python-impl: CPython
- python-version: '3.12'
python-release: v3.12
python-impl: CPython
- python-version: pypy-3.7
python-release: v3.7
python-impl: PyPy
Expand All @@ -117,21 +120,22 @@ jobs:
- python-version: pypy-3.9
python-release: v3.9
python-impl: PyPy
- python-version: pypy-3.10
python-release: v3.10
python-impl: PyPy
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Python requirements
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: ${{ runner.os }}-pip-${{ matrix.python-version }}
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup deployment target
shell: bash
if: ${{ startsWith(matrix.python-version, 'pypy') || matrix.python-version == '3.11' || matrix.python-version == '3.12' }}
run: echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> $GITHUB_ENV
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install Python requirements
Expand All @@ -140,9 +144,9 @@ jobs:
run: python setup.py build_ext --inplace --debug
- name: Install numpy
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
run: python -m pip install numpy
run: python -m pip install --prefer-binary numpy
- name: Install tests requirements
run: python -m pip install -r pyfastani/tests/requirements.txt --prefer-binary
run: python -m pip install --prefer-binary -r pyfastani/tests/requirements.txt
- name: Test with coverage
run: python -m coverage run -m unittest discover -vv
- name: Upload to Codecov
Expand Down

0 comments on commit b325209

Please sign in to comment.