Skip to content

Commit

Permalink
try native builders for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeplf committed Oct 8, 2024
1 parent e7e8bd1 commit 680a568
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/publish-sdist-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-2022]
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-20.04, windows-2022, macos-13, macos-14]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
- name: Build wheels Mac OS
if: runner.os == 'macOS'
env:
CIBW_ENVIRONMENT_PASS: "STATIC_HDF5 CMAKE_PREFIX_PATH CMAKE_OSX_ARCHITECTURES MACOSX_DEPLOYMENT_TARGET"
CIBW_ENVIRONMENT_PASS: "STATIC_HDF5 CMAKE_PREFIX_PATH"
CIBW_BEFORE_BUILD: |
# CMake complains if the dependencies come from within the same tree
# as the source, so we'll just pretend they are elsewhere
Expand All @@ -80,19 +81,7 @@ jobs:
# used by setup.py to decide if to set `FindHDF5` to use static hdf5 libraries
export STATIC_HDF5=True
# x86_64 macOS allows for cross compilation; first we do arm64,
# only for the 11.0 target; and store in the cache the compiled code...
export CIBW_ARCHS_MACOS="arm64"
export CMAKE_OSX_ARCHITECTURES="arm64"
export MACOSX_DEPLOYMENT_TARGET="11.0"
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-$CIBW_ARCHS_MACOS/install
python -m cibuildwheel --output-dir dist
# ...and now we do both targets for x86_64
export CIBW_ARCHS_MACOS="x86_64"
export CMAKE_OSX_ARCHITECTURES="x86_64"
unset MACOSX_DEPLOYMENT_TARGET
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-$CIBW_ARCHS_MACOS/install
export CMAKE_PREFIX_PATH=/Users/runner/work/src-cache/install-`uname -m`/install
python -m cibuildwheel --output-dir dist
- name: Cache HDF5 On Windows
Expand Down

0 comments on commit 680a568

Please sign in to comment.