Skip to content

Commit

Permalink
ci: More wheel hell
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Oct 18, 2024
1 parent 22c84ce commit a8aeb7a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/buildwheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-12, macos-14]
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4

Expand All @@ -24,7 +25,14 @@ jobs:
with:
platforms: all

# https://cibuildwheel.pypa.io/en/stable/faq/#macos-library-dependencies-do-not-satisfy-target-macos
- name: Set MacOS compiler target dynamically from the runner
if: runner.os == 'macOS'
run: echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d. -f1)" >> $GITHUB_ENV

- name: Build wheels
env:
CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=${{ env.MACOSX_DEPLOYMENT_TARGET }}
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build and upload to PyPI

on:
workflow_dispatch:
release:
types: [published]

jobs:
build_wheels:
Expand All @@ -25,7 +27,14 @@ jobs:
with:
platforms: all

# https://cibuildwheel.pypa.io/en/stable/faq/#macos-library-dependencies-do-not-satisfy-target-macos
- name: Set MacOS compiler target dynamically from the runner
if: runner.os == 'macOS'
run: echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d. -f1)" >> $GITHUB_ENV

- name: Build wheels
env:
CIBW_ENVIRONMENT: MACOSX_DEPLOYMENT_TARGET=${{ env.MACOSX_DEPLOYMENT_TARGET }}
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
Expand Down

0 comments on commit a8aeb7a

Please sign in to comment.