From a0ea23cc2f406c8d236efd4a5d6fd107d44e49cc Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Mon, 2 Oct 2023 18:35:11 +0100 Subject: [PATCH] mac arm64 --- .github/scripts/build-macos.sh | 6 +++--- .github/workflows/ci.yml | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/scripts/build-macos.sh b/.github/scripts/build-macos.sh index aea2173..eabe1e2 100755 --- a/.github/scripts/build-macos.sh +++ b/.github/scripts/build-macos.sh @@ -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 @@ -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. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abe6414..5ab9abd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 }}