Skip to content

Commit c2007e7

Browse files
committed
Merge branch 'main' into codecov
2 parents 2d21bc0 + 74ceacf commit c2007e7

File tree

165 files changed

+3432
-1784
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+3432
-1784
lines changed

.ci/after_success.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# gather the coverage data
44
python3 -m pip install codecov
55
if [[ $MATRIX_DOCKER ]]; then
6-
coverage xml --ignore-errors
6+
python3 -m coverage xml --ignore-errors
77
else
8-
coverage xml
8+
python3 -m coverage xml
99
fi

.ci/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
coverage erase
5+
python3 -m coverage erase
66
if [ $(uname) == "Darwin" ]; then
77
export CPPFLAGS="-I/usr/local/miniconda/include";
88
fi

.ci/install.sh

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ aptget_update()
1313
return 1
1414
fi
1515
}
16-
aptget_update || aptget_update retry || aptget_update retry
16+
if [[ $(uname) != CYGWIN* ]]; then
17+
aptget_update || aptget_update retry || aptget_update retry
18+
fi
1719

1820
set -e
1921

20-
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
21-
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
22-
cmake meson imagemagick libharfbuzz-dev libfribidi-dev
22+
if [[ $(uname) != CYGWIN* ]]; then
23+
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
24+
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
25+
cmake meson imagemagick libharfbuzz-dev libfribidi-dev
26+
fi
2327

2428
python3 -m pip install --upgrade pip
2529
python3 -m pip install --upgrade wheel
@@ -31,24 +35,27 @@ python3 -m pip install -U pytest
3135
python3 -m pip install -U pytest-cov
3236
python3 -m pip install -U pytest-timeout
3337
python3 -m pip install pyroma
34-
python3 -m pip install test-image-results
35-
# TODO Remove condition when NumPy supports 3.11
36-
if ! [ "$GHA_PYTHON_VERSION" == "3.11-dev" ]; then python3 -m pip install numpy ; fi
37-
38-
# PyQt6 doesn't support PyPy3
39-
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
40-
sudo apt-get -qq install libegl1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxkbcommon-x11-0
41-
python3 -m pip install pyqt6
42-
fi
4338

44-
# webp
45-
pushd depends && ./install_webp.sh && popd
39+
if [[ $(uname) != CYGWIN* ]]; then
40+
python3 -m pip install numpy
4641

47-
# libimagequant
48-
pushd depends && ./install_imagequant.sh && popd
42+
# PyQt6 doesn't support PyPy3
43+
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
44+
sudo apt-get -qq install libegl1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxkbcommon-x11-0
45+
python3 -m pip install pyqt6
46+
fi
4947

50-
# raqm
51-
pushd depends && ./install_raqm.sh && popd
48+
# webp
49+
pushd depends && ./install_webp.sh && popd
5250

53-
# extra test images
54-
pushd depends && ./install_extra_test_images.sh && popd
51+
# libimagequant
52+
pushd depends && ./install_imagequant.sh && popd
53+
54+
# raqm
55+
pushd depends && ./install_raqm.sh && popd
56+
57+
# extra test images
58+
pushd depends && ./install_extra_test_images.sh && popd
59+
else
60+
cd depends && ./install_extra_test_images.sh && cd ..
61+
fi

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Bug fixes, feature additions, tests, documentation and more can be contributed v
44

55
## Bug fixes, feature additions, etc.
66

7-
Please send a pull request to the `main` branch. Please include [documentation](https://pillow.readthedocs.io) and [tests](../Tests/README.rst) for new features. Tests or documentation without bug fixes or feature additions are welcome too. Feel free to ask questions [via issues](https://github.com/python-pillow/Pillow/issues/new), [Gitter](https://gitter.im/python-pillow/Pillow) or irc://irc.freenode.net#pil
7+
Please send a pull request to the `main` branch. Please include [documentation](https://pillow.readthedocs.io) and [tests](../Tests/README.rst) for new features. Tests or documentation without bug fixes or feature additions are welcome too. Feel free to ask questions [via issues](https://github.com/python-pillow/Pillow/issues/new), [discussions](https://github.com/python-pillow/Pillow/discussions/new), [Gitter](https://gitter.im/python-pillow/Pillow) or irc://irc.freenode.net#pil
88

99
- Fork the Pillow repository.
1010
- Create a branch from `main`.

.github/mergify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pull_request_rules:
88
- status-success=Docker Test Successful
99
- status-success=Windows Test Successful
1010
- status-success=MinGW Test Successful
11+
- status-success=Cygwin Test Successful
1112
- status-success=continuous-integration/appveyor/pr
1213
actions:
1314
merge:

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Lint
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710

.github/workflows/macos-install.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ python3 -m pip install -U pytest
1212
python3 -m pip install -U pytest-cov
1313
python3 -m pip install -U pytest-timeout
1414
python3 -m pip install pyroma
15-
python3 -m pip install test-image-results
1615

1716
echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg
18-
# TODO Remove condition when NumPy supports 3.11
19-
if ! [ "$GHA_PYTHON_VERSION" == "3.11-dev" ]; then python3 -m pip install numpy ; fi
17+
python3 -m pip install numpy
2018

2119
# extra test images
2220
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/release-drafter.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ on:
77
- main
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
update_release_draft:
15+
permissions:
16+
contents: write # for release-drafter/release-drafter to create a github release
17+
pull-requests: write # for release-drafter/release-drafter to add label to PR
1218
if: github.repository == 'python-pillow/Pillow'
1319
runs-on: ubuntu-latest
1420
steps:

.github/workflows/test-cygwin.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Test Cygwin
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: windows-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
python-minor-version: [7, 8, 9]
12+
13+
timeout-minutes: 40
14+
15+
name: Python 3.${{ matrix.python-minor-version }}
16+
17+
steps:
18+
- name: Fix line endings
19+
run: |
20+
git config --global core.autocrlf input
21+
22+
- name: Checkout Pillow
23+
uses: actions/checkout@v3
24+
25+
- name: Install Cygwin
26+
uses: cygwin/cygwin-install-action@v2
27+
with:
28+
platform: x86_64
29+
packages: >
30+
ImageMagick gcc-g++ ghostscript jpeg libfreetype-devel
31+
libimagequant-devel libjpeg-devel liblapack-devel
32+
liblcms2-devel libopenjp2-devel libraqm-devel
33+
libtiff-devel libwebp-devel libxcb-devel libxcb-xinerama0
34+
make netpbm perl
35+
python3${{ matrix.python-minor-version }}-cffi
36+
python3${{ matrix.python-minor-version }}-cython
37+
python3${{ matrix.python-minor-version }}-devel
38+
python3${{ matrix.python-minor-version }}-numpy
39+
python3${{ matrix.python-minor-version }}-sip
40+
python3${{ matrix.python-minor-version }}-tkinter
41+
qt5-devel-tools subversion xorg-server-extra zlib-devel
42+
43+
- name: Add Lapack to PATH
44+
uses: egor-tensin/cleanup-path@v1
45+
with:
46+
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack'
47+
48+
- name: pip cache
49+
uses: actions/cache@v3
50+
with:
51+
path: 'C:\cygwin\home\runneradmin\.cache\pip'
52+
key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }}
53+
restore-keys: |
54+
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-
55+
56+
- name: Build system information
57+
run: |
58+
dash.exe -c "python3 .github/workflows/system-info.py"
59+
60+
- name: Install dependencies
61+
run: |
62+
bash.exe .ci/install.sh
63+
64+
- name: Install a different NumPy
65+
shell: dash.exe -l "{0}"
66+
run: |
67+
python3 -m pip install -U 'numpy!=1.21.*'
68+
69+
- name: Build
70+
shell: bash.exe -eo pipefail -o igncr "{0}"
71+
run: |
72+
.ci/build.sh
73+
74+
- name: Test
75+
run: |
76+
bash.exe xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh
77+
78+
- name: Prepare to upload errors
79+
if: failure()
80+
run: |
81+
dash.exe -c "mkdir -p Tests/errors"
82+
83+
- name: Upload errors
84+
uses: actions/upload-artifact@v3
85+
if: failure()
86+
with:
87+
name: errors
88+
path: Tests/errors
89+
90+
- name: After success
91+
run: |
92+
bash.exe .ci/after_success.sh
93+
94+
- name: Upload coverage
95+
uses: codecov/codecov-action@v3
96+
with:
97+
file: ./coverage.xml
98+
flags: GHA_Cygwin
99+
name: Cygwin Python 3.${{ matrix.python-minor-version }}
100+
101+
success:
102+
permissions:
103+
contents: none
104+
needs: build
105+
runs-on: ubuntu-latest
106+
name: Cygwin Test Successful
107+
steps:
108+
- name: Success
109+
run: echo Cygwin Test Successful

.github/workflows/test-docker.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Test Docker
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710

@@ -11,9 +14,9 @@ jobs:
1114
matrix:
1215
docker: [
1316
# Run slower jobs first to give them a headstart and reduce waiting time
14-
ubuntu-20.04-focal-arm64v8,
15-
ubuntu-20.04-focal-ppc64le,
16-
ubuntu-20.04-focal-s390x,
17+
ubuntu-22.04-jammy-arm64v8,
18+
ubuntu-22.04-jammy-ppc64le,
19+
ubuntu-22.04-jammy-s390x,
1720
# Then run the remainder
1821
alpine,
1922
amazon-2-amd64,
@@ -24,18 +27,19 @@ jobs:
2427
debian-10-buster-x86,
2528
debian-11-bullseye-x86,
2629
fedora-35-amd64,
30+
fedora-36-amd64,
2731
gentoo,
2832
ubuntu-18.04-bionic-amd64,
2933
ubuntu-20.04-focal-amd64,
3034
ubuntu-22.04-jammy-amd64,
3135
]
3236
dockerTag: [main]
3337
include:
34-
- docker: "ubuntu-20.04-focal-arm64v8"
38+
- docker: "ubuntu-22.04-jammy-arm64v8"
3539
qemu-arch: "aarch64"
36-
- docker: "ubuntu-20.04-focal-ppc64le"
40+
- docker: "ubuntu-22.04-jammy-ppc64le"
3741
qemu-arch: "ppc64le"
38-
- docker: "ubuntu-20.04-focal-s390x"
42+
- docker: "ubuntu-22.04-jammy-s390x"
3943
qemu-arch: "s390x"
4044

4145
name: ${{ matrix.docker }}
@@ -81,6 +85,8 @@ jobs:
8185
name: ${{ matrix.docker }}
8286

8387
success:
88+
permissions:
89+
contents: none
8490
needs: build
8591
runs-on: ubuntu-latest
8692
name: Docker Test Successful

0 commit comments

Comments
 (0)