Skip to content

Commit

Permalink
Build arm64 wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jan 25, 2021
1 parent b851ec8 commit 6108405
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 16 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ echo "::group::Build wheel"
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
echo "::endgroup::"

echo "::group::Test wheel"
install_run $PLAT
echo "::endgroup::"
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
echo "::group::Test wheel"
install_run $PLAT
echo "::endgroup::"
fi
15 changes: 14 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ env:
REPO_DIR: Pillow
BUILD_DEPENDS: ""
TEST_DEPENDS: "pytest pytest-cov"
MACOSX_DEPLOYMENT_TARGET: "10.10"
WHEEL_SDIR: wheelhouse

jobs:
Expand All @@ -20,6 +19,7 @@ jobs:
os: [ "ubuntu-16.04", "macos-latest" ]
python: [ "pypy3.7-7.3.3","pypy3.6-7.3", "3.6", "3.7", "3.8", "3.9" ]
platform: [ "x86_64", "i686" ]
macos-target: [ "10.10" ]
exclude:
- os: "macos-latest"
platform: "i686"
Expand All @@ -28,11 +28,17 @@ jobs:
os-name: "osx"
- os: "ubuntu-16.04"
os-name: "xenial"
- os: "macos-11.0"
os-name: "osx"
platform: "arm64"
python: "3.9"
macos-target: "11.0"
env:
BUILD_COMMIT: HEAD
PLAT: ${{ matrix.platform }}
MB_PYTHON_VERSION: ${{ matrix.python }}
TRAVIS_OS_NAME: ${{ matrix.os-name }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -61,6 +67,7 @@ jobs:
os: [ "ubuntu-16.04", "macos-latest" ]
python: [ "pypy3.7-7.3.3", "pypy3.6-7.3", "3.6", "3.7", "3.8", "3.9" ]
platform: [ "x86_64", "i686" ]
macos-target: [ "10.10" ]
exclude:
- os: "macos-latest"
platform: "i686"
Expand All @@ -69,11 +76,17 @@ jobs:
os-name: "osx"
- os: "ubuntu-16.04"
os-name: "xenial"
- os: "macos-11.0"
os-name: "osx"
platform: "arm64"
python: "3.9"
macos-target: "11.0"
env:
BUILD_COMMIT: master
PLAT: ${{ matrix.platform }}
MB_PYTHON_VERSION: ${{ matrix.python }}
TRAVIS_OS_NAME: ${{ matrix.os-name }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }}
steps:
- uses: actions/checkout@v2
with:
Expand Down
33 changes: 22 additions & 11 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ function pre_build {
BUILD_PREFIX=`dirname $(dirname $(which python))`
PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig"
fi
build_simple xcb-proto 1.14.1 https://xcb.freedesktop.org/dist
if [ -n "$IS_MACOS" ]; then
build_simple xproto 7.0.31 https://www.x.org/pub/individual/proto
build_simple libXau 1.0.9 https://www.x.org/pub/individual/lib
build_simple libpthread-stubs 0.4 https://xcb.freedesktop.org/dist
else
sed -i s/\${pc_sysrootdir\}// /usr/local/lib/pkgconfig/xcb-proto.pc
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
build_simple xcb-proto 1.14.1 https://xcb.freedesktop.org/dist
if [ -n "$IS_MACOS" ]; then
build_simple xproto 7.0.31 https://www.x.org/pub/individual/proto
build_simple libXau 1.0.9 https://www.x.org/pub/individual/lib
build_simple libpthread-stubs 0.4 https://xcb.freedesktop.org/dist
else
sed -i s/\${pc_sysrootdir\}// /usr/local/lib/pkgconfig/xcb-proto.pc
fi
build_simple libxcb $LIBXCB_VERSION https://xcb.freedesktop.org/dist
fi
build_simple libxcb $LIBXCB_VERSION https://xcb.freedesktop.org/dist
if [ -n "$IS_MACOS" ]; then
BUILD_PREFIX=$ORIGINAL_BUILD_PREFIX
PKG_CONFIG_PATH=$ORIGINAL_PKG_CONFIG_PATH
Expand All @@ -56,7 +58,9 @@ function pre_build {
build_tiff
build_libpng
build_lcms2
build_openjpeg
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
build_openjpeg
fi

CFLAGS="$CFLAGS -O3 -DNDEBUG"
build_libwebp
Expand All @@ -82,9 +86,16 @@ function run_tests_in_repo {
pytest
}

EXP_CODECS="jpg jpg_2000 libtiff zlib"
EXP_CODECS="jpg"
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
EXP_CODECS="$EXP_CODECS jpg_2000"
fi
EXP_CODECS="$EXP_CODECS libtiff zlib"
EXP_MODULES="freetype2 littlecms2 pil tkinter webp"
EXP_FEATURES="transp_webp webp_anim webp_mux xcb"
EXP_FEATURES="transp_webp webp_anim webp_mux"
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
EXP_FEATURES="$EXP_FEATURES xcb"
fi

function run_tests {
if [ -n "$IS_MACOS" ]; then
Expand Down
2 changes: 1 addition & 1 deletion multibuild

0 comments on commit 6108405

Please sign in to comment.