Skip to content

Commit

Permalink
mac arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
letmaik committed Oct 2, 2023
1 parent 4a7e724 commit a0ea23c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ pip freeze
# By default, wheels are tagged with the architecture of the Python
# installation, which would produce universal2 even if only building
# for x86_64. The following line overrides that behavior.
export _PYTHON_HOST_PLATFORM="macosx-${MACOS_MIN_VERSION}-x86_64"
export _PYTHON_HOST_PLATFORM="macosx-${MACOS_MIN_VERSION}-$ARCH"

export CC=clang
export CXX=clang++
export CFLAGS="-arch x86_64"
export CFLAGS="-arch $ARCH"
export CXXFLAGS=$CFLAGS
export LDFLAGS=$CFLAGS
export ARCHFLAGS=$CFLAGS
Expand All @@ -54,7 +54,7 @@ python setup.py bdist_wheel
# no shared library dependencies that have to be bundled.

delocate-listdeps --all --depending dist/*.whl # lists library dependencies
delocate-wheel --verbose --require-archs=x86_64 dist/*.whl # copies library dependencies into wheel
delocate-wheel --verbose --require-archs=$ARCH dist/*.whl # copies library dependencies into wheel
delocate-listdeps --all --depending dist/*.whl # verify

# Dump target versions of dependend libraries.
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,40 @@ jobs:

- os-image: macos-11
os-name: mac
arch: x86_64
macos-min-version: '10.9'
python-version: '3.7'
numpy-version: '1.14.*'
- os-image: macos-11
os-name: mac
arch: x86_64
macos-min-version: '10.9'
python-version: '3.8'
numpy-version: '1.17.*'
- os-image: macos-11
os-name: mac
arch: x86_64
macos-min-version: '10.9'
python-version: '3.9'
numpy-version: '1.19.*'
- os-image: macos-11
os-name: mac
arch: x86_64
macos-min-version: '10.9'
python-version: '3.10'
numpy-version: '1.21.*'
- os-image: macos-11
os-name: mac
arch: x86_64
macos-min-version: '10.9'
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: macos-13-xlarge # M1
os-name: mac
arch: arm64
macos-min-version: '11.0'
python-version: '3.11'
numpy-version: '1.23.*'

- os-image: windows-latest
os-name: windows
Expand Down Expand Up @@ -159,6 +170,7 @@ jobs:
if: matrix.config.os-name == 'mac'
run: .github/scripts/build-macos.sh
env:
ARCH: ${{ matrix.config.arch }}
MACOS_MIN_VERSION: ${{ matrix.config.macos-min-version }}
PYTHON_VERSION: ${{ matrix.config.python-version }}
NUMPY_VERSION: ${{ matrix.config.numpy-version }}
Expand Down

0 comments on commit a0ea23c

Please sign in to comment.