Skip to content

Commit

Permalink
github actions: fixes for trying to build all wheels using cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCzarnecki committed Oct 30, 2024
1 parent 5357bd4 commit 1ffc6e0
Showing 1 changed file with 46 additions and 7 deletions.
53 changes: 46 additions & 7 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@ name: Build wheels
on: [push, pull_request]

jobs:
build_wheels:
build_wheels_linux:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
architecture: [x86_64]
include:
- os: ubuntu-latest
architecture: aarch64
- os: macos-latest
architecture: arm64
architecture: [x86_64, aarch64]

steps:
- name: Checkout repository
Expand All @@ -25,6 +20,50 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Setup variables for aarch64
if: matrix.architecture == 'aarch64'
env:
CIBW_PLATFORM: "linux_aarch64"
CIBW_EMULATOR: "linux/aarch64"

- name: Build wheels with cibuildwheel
env:
CIBW_ARCHS_LINUX: ${{ matrix.architecture }}
CIBW_SKIP: "cp36-* cp37-*"
run: |
cibuildwheel --output-dir wheelhouse
- name: List wheels
run: |
ls wheelhouse
- name: Upload wheels as artifact
uses: actions/upload-artifact@v3
with:
name: python-wheels
path: wheelhouse/*.whl

build_wheels_mac:
name: ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
architecture: [x86_64, arm64]

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

- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
- name: Set macOS Deployment Target
export MACOSX_DEPLOYMENT_TARGET=11.0

- name: Build wheels with cibuildwheel
env:
Expand Down

0 comments on commit 1ffc6e0

Please sign in to comment.