Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 22, 2022
2 parents a452c48 + 77b463f commit b96e905
Show file tree
Hide file tree
Showing 30 changed files with 650 additions and 376 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Top-most EditorConfig file
root = true

[*]
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
charset = utf-8

# Four-space indentation
indent_size = 4
indent_style = space

trim_trailing_whitespace = true

[*.yml]
# Two-space indentation
indent_size = 2
2 changes: 2 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ pull_request_rules:
conditions:
- "#approved-reviews-by>=1"
- label=automerge
- status-success=Lint
- status-success=Travis CI - Pull Request
- status-success=Wheels Successful
actions:
merge:
method: merge
14 changes: 14 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"packageRules": [
{
"groupName": "github-actions",
"matchManagers": ["github-actions"],
"separateMajorMinor": "false"
}
],
"schedule": ["on the 4th day of the month"]
}
29 changes: 19 additions & 10 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# these cause a conflict with built webp and libtiff,
# webp, zstd, xz, libtiff, libxcb cause a conflict with building webp, libtiff, libxcb
# curl from brew requires zstd, use system curl
brew remove --ignore-dependencies webp zstd xz libtiff curl
# if php is installed, brew tries to reinstall these after installing openblas
# remove lcms2 to fix building openjpeg on arm64
# remove xmlto to skip building giflib docs
brew remove --ignore-dependencies webp zstd xz libtiff libxcb curl php lcms2 xmlto ghostscript

if [[ "$PLAT" == "arm64" ]]; then
export MACOSX_DEPLOYMENT_TARGET="11.0"
else
export MACOSX_DEPLOYMENT_TARGET="10.10"
fi
fi

if [[ "$MB_PYTHON_VERSION" == pypy3* ]]; then
if [[ "$TRAVIS_OS_NAME" != "macos-latest" ]]; then
MB_ML_VER="2010"
MB_PYTHON_OSX_VER="10.9"
if [[ "$PLAT" == "i686" ]]; then
DOCKER_TEST_IMAGE="multibuild/xenial_$PLAT"
else
MB_PYTHON_OSX_VER="10.9"
fi
elif [[ "$MB_PYTHON_VERSION" == "3.11" ]] && [[ "$PLAT" == "i686" ]]; then
DOCKER_TEST_IMAGE="radarhere/bionic-$PLAT"
fi

echo "::group::Install a virtualenv"
Expand All @@ -22,13 +31,13 @@ echo "::group::Install a virtualenv"
echo "::endgroup::"

echo "::group::Build wheel"
clean_code $REPO_DIR $BUILD_COMMIT
build_wheel $REPO_DIR $PLAT
clean_code
build_wheel
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
echo "::endgroup::"

if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
echo "::group::Test wheel"
install_run $PLAT
install_run
echo "::endgroup::"
fi
fi
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint

on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

name: Lint

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- uses: pre-commit/[email protected]
78 changes: 78 additions & 0 deletions .github/workflows/wheels-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build Linux 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.mb-ml-ver }} ${{ matrix.platform }}
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
python: [
"pypy3.8-7.3.10",
"pypy3.9-7.3.10",
"3.7",
"3.8",
"3.9",
"3.10",
"3.11",
]
platform: [ "i686", "x86_64" ]
mb-ml-libc: [ "manylinux" ]
mb-ml-ver: [ 2014, "_2_28" ]
exclude:
- platform: "i686"
mb-ml-ver: "_2_28"
include:
- python: "3.8"
platform: "x86_64"
mb-ml-libc: "musllinux"
mb-ml-ver: "_1_1"
- python: "3.9"
platform: "x86_64"
mb-ml-libc: "musllinux"
mb-ml-ver: "_1_1"
- python: "3.10"
platform: "x86_64"
mb-ml-libc: "musllinux"
mb-ml-ver: "_1_1"
- python: "3.11"
platform: "x86_64"
mb-ml-libc: "musllinux"
mb-ml-ver: "_1_1"
env:
BUILD_COMMIT: ${{ inputs.build-commit }}
PLAT: ${{ matrix.platform }}
MB_PYTHON_VERSION: ${{ matrix.python }}
MB_ML_LIBC: ${{ matrix.mb-ml-libc }}
MB_ML_VER: ${{ matrix.mb-ml-ver }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- 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
62 changes: 62 additions & 0 deletions .github/workflows/wheels-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build macOS 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.platform }}
runs-on: "macos-latest"
strategy:
fail-fast: false
matrix:
python: [
"pypy3.8-7.3.10",
"pypy3.9-7.3.10",
"3.7",
"3.8",
"3.9",
"3.10",
"3.11",
]
platform: [ "x86_64", "arm64" ]
exclude:
- python: "3.7"
platform: "arm64"
- python: "pypy3.8-7.3.10"
platform: "arm64"
- python: "pypy3.9-7.3.10"
platform: "arm64"
env:
BUILD_COMMIT: ${{ inputs.build-commit }}
PLAT: ${{ matrix.platform }}
MB_PYTHON_VERSION: ${{ matrix.python }}
TRAVIS_OS_NAME: "osx"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- 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
Loading

0 comments on commit b96e905

Please sign in to comment.