Skip to content

Commit

Permalink
CI: Build package for macos arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
sebp committed Feb 4, 2024
1 parent 409905b commit 3c6a710
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
config: [py38, py39, py310, py311, py312]
os: [ubuntu-latest, macos-13, macos-14]
config: [py39, py310, py311, py312]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand Down
9 changes: 7 additions & 2 deletions setup-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ export CPU_COUNT=2

export PYTHONUNBUFFERED=1

export MACOSX_DEPLOYMENT_TARGET=10.9
CPU_ARCH=$(arch)
if [[ "${CPU_ARCH:-}" == "arm64" ]]; then
export MACOSX_DEPLOYMENT_TARGET=11.1
else
export MACOSX_DEPLOYMENT_TARGET=10.9
fi

export CONDA_BUILD_SYSROOT="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${MACOSX_DEPLOYMENT_TARGET}.sdk"

if [[ ! -d ${CONDA_BUILD_SYSROOT} || "$OSX_FORCE_SDK_DOWNLOAD" == "1" ]]; then
echo "Downloading ${MACOSX_DEPLOYMENT_TARGET} sdk"
curl -L -O https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX${MACOSX_DEPLOYMENT_TARGET}.sdk.tar.xz
curl -L -O https://github.com/phracker/MacOSX-SDKs/releases/download/11.0-11.1/MacOSX${MACOSX_DEPLOYMENT_TARGET}.sdk.tar.xz
tar -xf MacOSX${MACOSX_DEPLOYMENT_TARGET}.sdk.tar.xz -C "$(dirname "$CONDA_BUILD_SYSROOT")"
# set minimum sdk version to our target
plutil -replace MinimumSDKVersion -string ${MACOSX_DEPLOYMENT_TARGET} $(xcode-select -p)/Platforms/MacOSX.platform/Info.plist
Expand Down

0 comments on commit 3c6a710

Please sign in to comment.