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

Commit d7cb6a8

Browse files
committed
Merge branch 'main'
2 parents a452c48 + 77b463f commit d7cb6a8

30 files changed

+650
-376
lines changed

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Top-most EditorConfig file
2+
root = true
3+
4+
[*]
5+
# Unix-style newlines with a newline ending every file
6+
end_of_line = lf
7+
insert_final_newline = true
8+
charset = utf-8
9+
10+
# Four-space indentation
11+
indent_size = 4
12+
indent_style = space
13+
14+
trim_trailing_whitespace = true
15+
16+
[*.yml]
17+
# Two-space indentation
18+
indent_size = 2

.github/mergify.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ pull_request_rules:
33
conditions:
44
- "#approved-reviews-by>=1"
55
- label=automerge
6+
- status-success=Lint
67
- status-success=Travis CI - Pull Request
8+
- status-success=Wheels Successful
79
actions:
810
merge:
911
method: merge

.github/renovate.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:base"
5+
],
6+
"packageRules": [
7+
{
8+
"groupName": "github-actions",
9+
"matchManagers": ["github-actions"],
10+
"separateMajorMinor": "false"
11+
}
12+
],
13+
"schedule": ["on the 4th day of the month"]
14+
}

.github/workflows/build.sh

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11

22
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
3-
# these cause a conflict with built webp and libtiff,
3+
# webp, zstd, xz, libtiff, libxcb cause a conflict with building webp, libtiff, libxcb
44
# curl from brew requires zstd, use system curl
5-
brew remove --ignore-dependencies webp zstd xz libtiff curl
5+
# if php is installed, brew tries to reinstall these after installing openblas
6+
# remove lcms2 to fix building openjpeg on arm64
7+
# remove xmlto to skip building giflib docs
8+
brew remove --ignore-dependencies webp zstd xz libtiff libxcb curl php lcms2 xmlto ghostscript
9+
10+
if [[ "$PLAT" == "arm64" ]]; then
11+
export MACOSX_DEPLOYMENT_TARGET="11.0"
12+
else
13+
export MACOSX_DEPLOYMENT_TARGET="10.10"
14+
fi
615
fi
716

817
if [[ "$MB_PYTHON_VERSION" == pypy3* ]]; then
9-
if [[ "$TRAVIS_OS_NAME" != "macos-latest" ]]; then
10-
MB_ML_VER="2010"
18+
MB_PYTHON_OSX_VER="10.9"
19+
if [[ "$PLAT" == "i686" ]]; then
1120
DOCKER_TEST_IMAGE="multibuild/xenial_$PLAT"
12-
else
13-
MB_PYTHON_OSX_VER="10.9"
1421
fi
22+
elif [[ "$MB_PYTHON_VERSION" == "3.11" ]] && [[ "$PLAT" == "i686" ]]; then
23+
DOCKER_TEST_IMAGE="radarhere/bionic-$PLAT"
1524
fi
1625

1726
echo "::group::Install a virtualenv"
@@ -22,13 +31,13 @@ echo "::group::Install a virtualenv"
2231
echo "::endgroup::"
2332

2433
echo "::group::Build wheel"
25-
clean_code $REPO_DIR $BUILD_COMMIT
26-
build_wheel $REPO_DIR $PLAT
34+
clean_code
35+
build_wheel
2736
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
2837
echo "::endgroup::"
2938

3039
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
3140
echo "::group::Test wheel"
32-
install_run $PLAT
41+
install_run
3342
echo "::endgroup::"
34-
fi
43+
fi

.github/workflows/lint.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
name: Lint
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.x"
20+
- uses: pre-commit/action@v3.0.0

.github/workflows/wheels-linux.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build Linux wheels
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
build-commit:
7+
required: true
8+
type: string
9+
artifacts-name:
10+
required: true
11+
type: string
12+
13+
env:
14+
REPO_DIR: Pillow
15+
TEST_DEPENDS: "pytest pytest-timeout"
16+
17+
jobs:
18+
build:
19+
name: ${{ matrix.python }} ${{ matrix.mb-ml-libc }}${{ matrix.mb-ml-ver }} ${{ matrix.platform }}
20+
runs-on: "ubuntu-20.04"
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
python: [
25+
"pypy3.8-7.3.10",
26+
"pypy3.9-7.3.10",
27+
"3.7",
28+
"3.8",
29+
"3.9",
30+
"3.10",
31+
"3.11",
32+
]
33+
platform: [ "i686", "x86_64" ]
34+
mb-ml-libc: [ "manylinux" ]
35+
mb-ml-ver: [ 2014, "_2_28" ]
36+
exclude:
37+
- platform: "i686"
38+
mb-ml-ver: "_2_28"
39+
include:
40+
- python: "3.8"
41+
platform: "x86_64"
42+
mb-ml-libc: "musllinux"
43+
mb-ml-ver: "_1_1"
44+
- python: "3.9"
45+
platform: "x86_64"
46+
mb-ml-libc: "musllinux"
47+
mb-ml-ver: "_1_1"
48+
- python: "3.10"
49+
platform: "x86_64"
50+
mb-ml-libc: "musllinux"
51+
mb-ml-ver: "_1_1"
52+
- python: "3.11"
53+
platform: "x86_64"
54+
mb-ml-libc: "musllinux"
55+
mb-ml-ver: "_1_1"
56+
env:
57+
BUILD_COMMIT: ${{ inputs.build-commit }}
58+
PLAT: ${{ matrix.platform }}
59+
MB_PYTHON_VERSION: ${{ matrix.python }}
60+
MB_ML_LIBC: ${{ matrix.mb-ml-libc }}
61+
MB_ML_VER: ${{ matrix.mb-ml-ver }}
62+
steps:
63+
- uses: actions/checkout@v3
64+
with:
65+
submodules: true
66+
- uses: actions/setup-python@v4
67+
with:
68+
python-version: "3.x"
69+
- name: Build Wheel
70+
run: .github/workflows/build.sh
71+
- uses: actions/upload-artifact@v3
72+
with:
73+
name: ${{ inputs.artifacts-name }}
74+
path: wheelhouse/*.whl
75+
# Uncomment to get SSH access for testing
76+
# - name: Setup tmate session
77+
# if: failure()
78+
# uses: mxschmitt/action-tmate@v3

.github/workflows/wheels-macos.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build macOS wheels
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
build-commit:
7+
required: true
8+
type: string
9+
artifacts-name:
10+
required: true
11+
type: string
12+
13+
env:
14+
REPO_DIR: Pillow
15+
TEST_DEPENDS: "pytest pytest-timeout"
16+
17+
jobs:
18+
build:
19+
name: ${{ matrix.python }} ${{ matrix.platform }}
20+
runs-on: "macos-latest"
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
python: [
25+
"pypy3.8-7.3.10",
26+
"pypy3.9-7.3.10",
27+
"3.7",
28+
"3.8",
29+
"3.9",
30+
"3.10",
31+
"3.11",
32+
]
33+
platform: [ "x86_64", "arm64" ]
34+
exclude:
35+
- python: "3.7"
36+
platform: "arm64"
37+
- python: "pypy3.8-7.3.10"
38+
platform: "arm64"
39+
- python: "pypy3.9-7.3.10"
40+
platform: "arm64"
41+
env:
42+
BUILD_COMMIT: ${{ inputs.build-commit }}
43+
PLAT: ${{ matrix.platform }}
44+
MB_PYTHON_VERSION: ${{ matrix.python }}
45+
TRAVIS_OS_NAME: "osx"
46+
steps:
47+
- uses: actions/checkout@v3
48+
with:
49+
submodules: true
50+
- uses: actions/setup-python@v4
51+
with:
52+
python-version: "3.x"
53+
- name: Build Wheel
54+
run: .github/workflows/build.sh
55+
- uses: actions/upload-artifact@v3
56+
with:
57+
name: ${{ inputs.artifacts-name }}
58+
path: wheelhouse/*.whl
59+
# Uncomment to get SSH access for testing
60+
# - name: Setup tmate session
61+
# if: failure()
62+
# uses: mxschmitt/action-tmate@v3

0 commit comments

Comments
 (0)