Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 76 additions & 25 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,83 +51,124 @@ jobs:
platform_id: win_amd64

# Linux 64 bit manylinux2014
- os: ubuntu-20.04
- os: ubuntu-22.04
python: 36
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-20.04
- os: ubuntu-22.04
python: 37
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-20.04
- os: ubuntu-22.04
python: 38
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-20.04
- os: ubuntu-22.04
python: 39
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-20.04
- os: ubuntu-22.04
python: 310
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
- os: ubuntu-20.04
- os: ubuntu-22.04
python: 311
bitness: 64
platform_id: manylinux_x86_64
manylinux_image: manylinux2014

# MacOS x86_64
- os: macos-12
# MacOS x86_64 (Cross-compiled on Apple Silicon)
- os: macos-latest
bitness: 64
python: 36
platform_id: macosx_x86_64
- os: macos-12
arch: x86_64
- os: macos-latest
bitness: 64
python: 37
platform_id: macosx_x86_64
- os: macos-12
arch: x86_64
- os: macos-latest
bitness: 64
python: 38
platform_id: macosx_x86_64
- os: macos-12
arch: x86_64
- os: macos-latest
bitness: 64
python: 39
platform_id: macosx_x86_64
- os: macos-12
arch: x86_64
- os: macos-latest
bitness: 64
python: 310
platform_id: macosx_x86_64
- os: macos-12
arch: x86_64
- os: macos-latest
bitness: 64
python: 311
platform_id: macosx_x86_64
arch: x86_64

# MacOS ARM64 (Native on Apple Silicon)
- os: macos-latest
bitness: 64
python: 38
platform_id: macosx_arm64
arch: arm64
- os: macos-latest
bitness: 64
python: 39
platform_id: macosx_arm64
arch: arm64
- os: macos-latest
bitness: 64
python: 310
platform_id: macosx_arm64
arch: arm64
- os: macos-latest
bitness: 64
python: 311
platform_id: macosx_arm64
arch: arm64

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip'
python-version: '3.12'

- name: Install dependencies
- name: Install dependencies (Python 3.6-3.7)
if: matrix.python == '36' || matrix.python == '37'
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==2.16.2

- name: Install dependencies (Python 3.8+)
if: matrix.python != '36' && matrix.python != '37'
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel>=2.20.0

- name: Build wheels
env:
CIBW_BEFORE_BUILD: python -m pip install numpy>=1.19.5 cython>=0.29.0 scipy>=1.7.0
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
# Enable cross-compilation for macOS (only on macos-latest)
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
# Set deployment target based on runner type
CIBW_ENVIRONMENT_MACOS: >
MACOSX_DEPLOYMENT_TARGET=${{ (matrix.python == '36' || matrix.python == '37') && '10.9' || '11.0' }}
# Skip tests on cross-compiled wheels (only for macos-latest)
CIBW_TEST_SKIP: ${{ matrix.os == 'macos-latest' && '*-macosx_x86_64 *-macosx_arm64' || '' }}
CIBW_BUILD_VERBOSITY: 1
run: cibuildwheel --output-dir wheelhouse

Expand All @@ -138,21 +179,31 @@ jobs:
path: wheelhouse/*.whl

merge_wheels:
name: Merge wheels
needs: build_wheels
runs-on: ubuntu-latest

steps:
- name: Merge All Wheels
uses: actions/download-artifact@v4
with:
path: wheels
pattern: wheels-cp*
merge-multiple: true
- run: ls -R wheels
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
pattern: wheels-*
merge-multiple: true

- name: List downloaded wheels
run: ls -R dist/

- name: Upload merged wheels
uses: actions/upload-artifact@v4
with:
name: "πŸ’˜πŸ’˜πŸ’˜all-wheelsπŸ’˜πŸ’˜πŸ’˜"
path: dist/*.whl

# Build the source distribution under Linux
build_sdist:
name: Source distribution
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout
Expand Down
Loading