Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ if [[ "$MB_PYTHON_VERSION" == pypy3* ]]; then
else
DOCKER_TEST_IMAGE="multibuild/focal_$PLAT"
fi
elif [[ "$MB_ML_LIBC" == "manylinux" ]] && [[ "$PLAT" == "x86_64" ]]; then
DOCKER_TEST_IMAGE="matthewbrett/trusty:64"
fi

echo "::group::Install a virtualenv"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build wheels
name: Build macOS wheels

on:
workflow_call:
Expand All @@ -12,44 +12,29 @@ on:

env:
REPO_DIR: Pillow
BUILD_DEPENDS: ""
TEST_DEPENDS: "pytest pytest-timeout"
WHEEL_SDIR: wheelhouse

jobs:
build:
name: ${{ matrix.os-name }} ${{ matrix.python }} ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.python }} ${{ matrix.platform }}
runs-on: "macos-latest"
strategy:
fail-fast: false
matrix:
os: [ "macos-latest", "ubuntu-20.04" ]
python: [ "pypy3.7-7.3.8", "pypy3.8-7.3.8", "3.7", "3.8", "3.9", "3.10" ]
platform: [ "arm64", "x86_64", "i686" ]
exclude:
- os: "macos-latest"
platform: "i686"
- os: "macos-latest"
platform: "arm64"
python: [ "3.8", "3.9", "3.10" ]
platform: [ "arm64", "x86_64" ]
include:
- platform: "x86_64"
python: "3.7"
Comment thread
hugovk marked this conversation as resolved.
Outdated
- os: "macos-latest"
platform: "arm64"
- platform: "x86_64"
python: "pypy3.7-7.3.8"
- os: "macos-latest"
platform: "arm64"
- platform: "x86_64"
python: "pypy3.8-7.3.8"
- os: "ubuntu-20.04"
platform: "arm64"
include:
- os: "macos-latest"
os-name: "osx"
- os: "ubuntu-20.04"
os-name: "focal"
env:
BUILD_COMMIT: ${{ inputs.build-commit }}
PLAT: ${{ matrix.platform }}
MB_PYTHON_VERSION: ${{ matrix.python }}
TRAVIS_OS_NAME: ${{ matrix.os-name }}
TRAVIS_OS_NAME: "osx"
steps:
- uses: actions/checkout@v3
with:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/wheels-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build Ubuntu wheels

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought musllinux is built using Alpine, not Ubuntu? Perhaps call this Linux wheels?

Suggested change
name: Build Ubuntu wheels
name: Build Linux wheels

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair call. Ok, I've pushed a commit


on:
workflow_call:
inputs:
build-commit:
required: true
type: string
artifacts-name:
required: true
type: string

env:
REPO_DIR: Pillow
TEST_DEPENDS: "pytest pytest-timeout"

jobs:
build:
name: ${{ matrix.python }} ${{ matrix.mb-ml-libc }} ${{ matrix.platform }}
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
python: [ "pypy3.7-7.3.8", "pypy3.8-7.3.8", "3.7", "3.8", "3.9", "3.10" ]
platform: [ "x86_64", "i686" ]
mb-ml-libc: [ "manylinux" ]
include:
- python: "3.8"
platform: "x86_64"
mb-ml-libc: "musllinux"
- python: "3.9"
platform: "x86_64"
mb-ml-libc: "musllinux"
- python: "3.10"
platform: "x86_64"
mb-ml-libc: "musllinux"
env:
BUILD_COMMIT: ${{ inputs.build-commit }}
PLAT: ${{ matrix.platform }}
MB_PYTHON_VERSION: ${{ matrix.python }}
MB_ML_LIBC: ${{ matrix.mb-ml-libc }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Build Wheel
run: .github/workflows/build.sh
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifacts-name }}
path: wheelhouse/*.whl
# Uncomment to get SSH access for testing
# - name: Setup tmate session
# if: failure()
# uses: mxschmitt/action-tmate@v3
25 changes: 19 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,28 @@ name: Wheels
on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: ./.github/workflows/wheels-build.yml
macos:
uses: ./.github/workflows/wheels-macos.yml
with:
build-commit: "HEAD"
artifacts-name: "wheels"

build-latest:
ubuntu:
uses: ./.github/workflows/wheels-ubuntu.yml
with:
build-commit: "HEAD"
artifacts-name: "wheels"

macos-latest:
if: "!startsWith(github.ref, 'refs/tags/')"
uses: ./.github/workflows/wheels-macos.yml
with:
build-commit: "main"
artifacts-name: "wheels-latest"

ubuntu-latest:
if: "!startsWith(github.ref, 'refs/tags/')"
uses: ./.github/workflows/wheels-build.yml
uses: ./.github/workflows/wheels-ubuntu.yml
with:
build-commit: "main"
artifacts-name: "wheels-latest"
Expand All @@ -20,7 +33,7 @@ jobs:
name: Create Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: build
needs: [macos, ubuntu]
steps:
- uses: actions/download-artifact@v3
with:
Expand All @@ -32,7 +45,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

success:
needs: [build, build-latest]
needs: [macos, ubuntu, macos-latest, ubuntu-latest]
runs-on: ubuntu-latest
name: Wheels Successful
steps:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/python-Pillow/Pillow.git
[submodule "multibuild"]
path = multibuild
url = https://github.com/multi-build/multibuild.git
url = https://github.com/radarhere/multibuild.git
6 changes: 3 additions & 3 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function pre_build {
untar pillow-depends-main.zip

build_xz
if [ -z "$IS_MACOS" ]; then
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
yum remove -y zlib-devel
fi
build_new_zlib
Expand Down Expand Up @@ -140,7 +140,7 @@ function run_tests_in_repo {
EXP_CODECS="jpg jpg_2000"
EXP_CODECS="$EXP_CODECS libtiff zlib"
EXP_MODULES="freetype2 littlecms2 pil tkinter webp"
if [ -z "$IS_MACOS" ] && [[ "$MB_PYTHON_VERSION" != pypy3* ]] && [[ "$MACHTYPE" != aarch64* ]]; then
if [ -z "$IS_MACOS" ] && [ -z "$IS_ALPINE" ] && [[ "$MB_PYTHON_VERSION" != pypy3* ]] && [[ "$MACHTYPE" != aarch64* ]]; then
EXP_FEATURES="fribidi harfbuzz libjpeg_turbo raqm transp_webp webp_anim webp_mux xcb"
else
# can't find FriBiDi
Expand All @@ -156,7 +156,7 @@ function run_tests {
python3 -m pip install numpy==1.21.4
elif [[ "$MB_PYTHON_VERSION" == 3.8 || "$MB_PYTHON_VERSION" == 3.9 ]] && [[ $(uname -m) == "i686" ]]; then
python3 -m pip install numpy==1.21.5
else
elif [ -z "$IS_ALPINE" ]; then
python3 -m pip install numpy
fi

Expand Down
2 changes: 1 addition & 1 deletion multibuild