Added musllinux

This commit is contained in:
Andrew Murray 2022-03-30 11:36:47 +11:00
parent 55c6d6758c
commit eee4a21370
5 changed files with 94 additions and 36 deletions

View File

@ -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"

View File

@ -1,4 +1,4 @@
name: Build wheels
name: Build macOS wheels
on:
workflow_call:
@ -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.7"
- os: "macos-latest"
platform: "arm64"
python: "pypy3.7-7.3.8"
- os: "macos-latest"
platform: "arm64"
python: "pypy3.8-7.3.8"
- os: "ubuntu-20.04"
platform: "arm64"
python: [ "3.8", "3.9", "3.10" ]
platform: [ "arm64", "x86_64" ]
include:
- os: "macos-latest"
os-name: "osx"
- os: "ubuntu-20.04"
os-name: "focal"
- platform: "x86_64"
python: "3.7"
- platform: "x86_64"
python: "pypy3.7-7.3.8"
- platform: "x86_64"
python: "pypy3.8-7.3.8"
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:

58
.github/workflows/wheels-ubuntu.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: Build Ubuntu wheels
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

View File

@ -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-build.yml
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-ubuntu.yml
with:
build-commit: "main"
artifacts-name: "wheels-latest"
@ -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:
@ -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:

View File

@ -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
@ -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
@ -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