Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add a Cygwin run to GitHub Actions #5878

Merged
merged 76 commits into from May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
fdbb187
CI: Add a cygwin run to GitHub Actions.
DWesl Dec 10, 2021
67bef87
CI: Specify where the command line goes in the shell.
DWesl Dec 10, 2021
b798989
CI: Make sure all python requirements are installed in Cygwin CI.
DWesl Dec 11, 2021
a4495de
CI: Stop using dash so the DOS line endings don't throw things off.
DWesl Dec 11, 2021
8ebac45
CI: Explicitly use dash to get shell globbing.
DWesl Dec 11, 2021
cd087c6
CI: Fix the path to the build wheels.
DWesl Dec 11, 2021
1daaf92
CI: Split the config check from the actual test.
DWesl Dec 11, 2021
9ec4034
CI: Incorporate suggestions from PR.
DWesl Dec 11, 2021
407abbf
CI: Try to get tests fully working
DWesl Dec 11, 2021
4cfb1a8
CI: Use the new GitHub Action for codecov
DWesl Dec 11, 2021
90cf149
CI: Fix the spelling on the codecov repository.
DWesl Dec 11, 2021
7fd3e99
CI: Make sure correct version of python is used for testing.
DWesl Dec 11, 2021
1c25d95
CI: Get cygwin tests running
DWesl Dec 18, 2021
b9fee08
TST: Parametrize numpy roundtrip to find failing case
DWesl Dec 18, 2021
77c8a07
DOC: Rearrange the Cygwin entries on the support matrix.
DWesl Dec 16, 2021
fa536b4
Merge branch 'main' of upstream into add-cygwin-to-ci
DWesl Dec 26, 2021
7ad8fdb
CI: Get all the tests running on Cygwin.
DWesl Jan 7, 2022
a23131c
CI: Stop trying to run the netpbm tests.
DWesl Jan 7, 2022
4e7e70f
CI: Install netpbm and dependencies on Cygwin CI.
DWesl Jan 8, 2022
179cdd4
Merge branch 'main' into add-cygwin-to-ci
radarhere Jan 29, 2022
e1c2735
Switched to windows-latest
radarhere Feb 2, 2022
6293406
Switched to cygwin/cygwin-install-action
radarhere Feb 2, 2022
728bc7d
Added matrix to test Python 3.7 and 32-bit
radarhere Feb 2, 2022
4be3b76
Connected Cygwin jobs to mergify
radarhere Feb 2, 2022
8d2c56e
Upload errors on failure
radarhere Feb 2, 2022
0563739
Install Pillow directly
radarhere Feb 2, 2022
6fded1a
Install cjpeg and djpeg
radarhere Feb 3, 2022
6b05452
Merge pull request #1 from radarhere/add-cygwin-to-ci
DWesl Feb 3, 2022
1312123
Install netpbm
radarhere Feb 3, 2022
2d6dee1
CI: Try to get Cygwin workflow working.
DWesl Feb 6, 2022
b582806
Merge remote-tracking branch 'upstream/main' into add-cygwin-to-ci
DWesl Feb 6, 2022
5588f57
BUG: Only set title in ImageShow.DisplayViewer when title provided
DWesl Feb 6, 2022
4d0e294
CI: Revert changes to test.sh
DWesl Feb 7, 2022
e5537b5
Merge branch 'main' into add-cygwin-to-ci
radarhere Mar 4, 2022
7099ade
Merge branch 'main' into add-cygwin-to-ci
DWesl Apr 15, 2022
1d1c22e
CI: Update versions of actions used by Cygwin CI
DWesl Apr 16, 2022
635f8cf
Added Python 3.9
radarhere Apr 16, 2022
cdfe08b
Only install NumPy through pip on 64-bit
radarhere Apr 16, 2022
80b8e12
Merge pull request #2 from radarhere/add-cygwin-to-ci
DWesl Apr 16, 2022
97e6197
CI: Set up cache for Cygwin pip
DWesl Apr 20, 2022
bd61d1e
FIX, CI: Actually run pip
DWesl Apr 20, 2022
be6dd71
Ci: Simplify Cygwin pip cache
DWesl Apr 21, 2022
c1d3bac
CI: Fix runner username for pip cache
DWesl Apr 21, 2022
805e8f1
CI: Try to fix Cygwin pip cache
DWesl Apr 22, 2022
7605e46
CI: Set shell for Cygwin CI steps
DWesl Apr 23, 2022
1674e42
CI: Sort the Cygwin requirements.
DWesl Apr 23, 2022
46c1f93
CI: Update pip before installing dependencies.
DWesl Apr 23, 2022
9fb7951
FIX, CI: Change shell to stay in repository.
DWesl Apr 23, 2022
853a95d
Merge branch 'main' into add-cygwin-to-ci
radarhere Apr 25, 2022
fdbab82
CI: Use dash to check system-info.py
DWesl Apr 29, 2022
afa3cea
Merge branch 'main' into add-cygwin-to-ci
DWesl Apr 29, 2022
91e6457
CI: Stop using login shell for build info
DWesl Apr 29, 2022
ed0c37d
CI: Don't use shell for build information
DWesl Apr 29, 2022
41976ae
FIX: Fix syntax for shell call
DWesl Apr 29, 2022
e0f4c21
CI: Remind bash to ignore CR in workflow
DWesl Apr 29, 2022
88c406e
CI: Stop using login shell for build step
DWesl Apr 29, 2022
08e0d0b
CI: Use bash for rebase step
DWesl Apr 29, 2022
2d25e66
Do not install NumPy on Python 3.11
radarhere Apr 30, 2022
3453b0e
Merge pull request #3 from radarhere/add-cygwin-to-ci
DWesl Apr 30, 2022
143e57b
CI: Specify python minor version everywhere on Cygwin
DWesl Apr 30, 2022
ce74898
CI: Update Cygwin pip, but not on 32-bit
DWesl May 2, 2022
0b13425
CI: Use alternatives to select python version (#4)
DWesl May 3, 2022
941ff61
CI: Drop 32-bit Cygwin from regular testing
DWesl May 4, 2022
2067f60
STY: Commit suggestions from PR review.
DWesl May 5, 2022
3005ea1
Merge branch 'main' into add-cygwin-to-ci
radarhere May 6, 2022
b670df8
STY: Fix English in .github/workflows/test-cygwin.yml
DWesl May 7, 2022
eee4811
Removed DLL rebase
radarhere May 7, 2022
a5b20f7
Removed setting alternative
radarhere May 7, 2022
7c97d84
CI: Stop testing numpy imports
DWesl May 7, 2022
c535601
Merge pull request #8 from radarhere/add-cygwin-to-ci
DWesl May 7, 2022
c6cdd4d
Adjust formatting
radarhere May 7, 2022
c919db1
Install cffi
radarhere May 7, 2022
035e955
Use build.sh
radarhere May 8, 2022
0c7868b
Added Cygwin badge
radarhere May 8, 2022
63cd3cb
Merge pull request #9 from radarhere/add-cygwin-to-ci
DWesl May 10, 2022
30db27c
CI: Only invoke bash once for build step.
DWesl May 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/after_success.sh
Expand Up @@ -3,7 +3,7 @@
# gather the coverage data
python3 -m pip install codecov
if [[ $MATRIX_DOCKER ]]; then
coverage xml --ignore-errors
python3 -m coverage xml --ignore-errors
else
coverage xml
python3 -m coverage xml
fi
2 changes: 1 addition & 1 deletion .ci/build.sh
Expand Up @@ -2,7 +2,7 @@

set -e

coverage erase
python3 -m coverage erase
if [ $(uname) == "Darwin" ]; then
export CPPFLAGS="-I/usr/local/miniconda/include";
fi
Expand Down
47 changes: 28 additions & 19 deletions .ci/install.sh
Expand Up @@ -13,13 +13,17 @@ aptget_update()
return 1
fi
}
aptget_update || aptget_update retry || aptget_update retry
if [[ $(uname) != CYGWIN* ]]; then
aptget_update || aptget_update retry || aptget_update retry
fi

set -e

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

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
Expand All @@ -32,23 +36,28 @@ python3 -m pip install -U pytest-cov
python3 -m pip install -U pytest-timeout
python3 -m pip install pyroma
python3 -m pip install test-image-results
# TODO Remove condition when NumPy supports 3.11
if ! [ "$GHA_PYTHON_VERSION" == "3.11-dev" ]; then python3 -m pip install numpy ; fi

# PyQt6 doesn't support PyPy3
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
sudo apt-get -qq install libegl1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxkbcommon-x11-0
python3 -m pip install pyqt6
fi
if [[ $(uname) != CYGWIN* ]]; then
# TODO Remove condition when NumPy supports 3.11
if ! [ "$GHA_PYTHON_VERSION" == "3.11-dev" ]; then python3 -m pip install numpy ; fi

# webp
pushd depends && ./install_webp.sh && popd
# PyQt6 doesn't support PyPy3
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
sudo apt-get -qq install libegl1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxkbcommon-x11-0
python3 -m pip install pyqt6
fi

# webp
pushd depends && ./install_webp.sh && popd

# libimagequant
pushd depends && ./install_imagequant.sh && popd
# libimagequant
pushd depends && ./install_imagequant.sh && popd

# raqm
pushd depends && ./install_raqm.sh && popd
# raqm
pushd depends && ./install_raqm.sh && popd

# extra test images
pushd depends && ./install_extra_test_images.sh && popd
# extra test images
pushd depends && ./install_extra_test_images.sh && popd
else
cd depends && ./install_extra_test_images.sh && cd ..
fi
1 change: 1 addition & 0 deletions .github/mergify.yml
Expand Up @@ -8,6 +8,7 @@ pull_request_rules:
- status-success=Docker Test Successful
- status-success=Windows Test Successful
- status-success=MinGW Test Successful
- status-success=Cygwin Test Successful
- status-success=continuous-integration/appveyor/pr
actions:
merge:
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/test-cygwin.yml
@@ -0,0 +1,107 @@
name: Test Cygwin

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-minor-version: [7, 8, 9]

timeout-minutes: 40

name: Python 3.${{ matrix.python-minor-version }}

steps:
- name: Fix line endings
run: |
git config --global core.autocrlf input

- name: Checkout Pillow
uses: actions/checkout@v3

- name: Install Cygwin
uses: cygwin/cygwin-install-action@v2
with:
platform: x86_64
packages: >
ImageMagick gcc-g++ ghostscript jpeg libfreetype-devel
libimagequant-devel libjpeg-devel liblapack-devel
liblcms2-devel libopenjp2-devel libraqm-devel
libtiff-devel libwebp-devel libxcb-devel libxcb-xinerama0
make netpbm perl
python3${{ matrix.python-minor-version }}-cffi
python3${{ matrix.python-minor-version }}-cython
python3${{ matrix.python-minor-version }}-devel
python3${{ matrix.python-minor-version }}-numpy
python3${{ matrix.python-minor-version }}-sip
python3${{ matrix.python-minor-version }}-tkinter
qt5-devel-tools subversion xorg-server-extra zlib-devel

- name: Add Lapack to PATH
uses: egor-tensin/cleanup-path@v1
with:
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack'

- name: pip cache
uses: actions/cache@v3
with:
path: 'C:\cygwin\home\runneradmin\.cache\pip'
key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }}
restore-keys: |
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-

- name: Build system information
run: |
dash.exe -c "python3 .github/workflows/system-info.py"

- name: Install dependencies
run: |
bash.exe .ci/install.sh
hugovk marked this conversation as resolved.
Show resolved Hide resolved

- name: Install a different NumPy
shell: dash.exe -l "{0}"
run: |
python3 -m pip install -U 'numpy!=1.21.*'

- name: Build
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
.ci/build.sh

- name: Test
run: |
bash.exe xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh

- name: Prepare to upload errors
if: failure()
run: |
dash.exe -c "mkdir -p Tests/errors"

- name: Upload errors
uses: actions/upload-artifact@v3
if: failure()
with:
name: errors
path: Tests/errors

- name: After success
run: |
bash.exe .ci/after_success.sh

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: GHA_Cygwin
name: Cygwin Python 3.${{ matrix.python-minor-version }}

success:
needs: build
runs-on: ubuntu-latest
name: Cygwin Test Successful
steps:
- name: Success
run: echo Cygwin Test Successful
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -36,6 +36,9 @@ As of 2019, Pillow development is
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-mingw.yml"><img
alt="GitHub Actions build status (Test MinGW)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20MinGW/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-cygwin.yml"><img
alt="GitHub Actions build status (Test Cygwin)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Cygwin/badge.svg"></a>
<a href="https://github.com/python-pillow/Pillow/actions/workflows/test-docker.yml"><img
alt="GitHub Actions build status (Test Docker)"
src="https://github.com/python-pillow/Pillow/workflows/Test%20Docker/badge.svg"></a>
Expand Down
4 changes: 4 additions & 0 deletions docs/index.rst
Expand Up @@ -29,6 +29,10 @@ Pillow for enterprise is available via the Tidelift Subscription. `Learn more <h
:target: https://github.com/python-pillow/Pillow/actions/workflows/test-mingw.yml
:alt: GitHub Actions build status (Test MinGW)

.. image:: https://github.com/python-pillow/Pillow/workflows/Test%20Cygwin/badge.svg
:target: https://github.com/python-pillow/Pillow/actions/workflows/test-cygwin.yml
:alt: GitHub Actions build status (Test Cygwin)

.. image:: https://img.shields.io/appveyor/build/python-pillow/Pillow/main.svg?label=Windows%20build
:target: https://ci.appveyor.com/project/python-pillow/Pillow
:alt: AppVeyor CI build status (Windows)
Expand Down
6 changes: 5 additions & 1 deletion docs/installation.rst
Expand Up @@ -483,7 +483,9 @@ These platforms are built and tested for every change.
| Windows Server 2022 | 3.7, 3.8, 3.9, 3.10, 3.11, | x86, x86-64 |
| | PyPy3 | |
| +----------------------------+---------------------+
| | 3.9/MinGW | x86, x86-64 |
| | 3.9 (MinGW) | x86, x86-64 |
| +----------------------------+---------------------+
| | 3.7, 3.8, 3.9 (Cygwin) | x86-64 |
+----------------------------------+----------------------------+---------------------+


Expand Down Expand Up @@ -568,6 +570,8 @@ These platforms have been reported to work at the versions mentioned.
+----------------------------------+---------------------------+------------------+--------------+
| Windows 10 | 3.7 | 7.1.0 |x86-64 |
+----------------------------------+---------------------------+------------------+--------------+
| Windows 10/Cygwin 3.3 | 3.6, 3.7, 3.8, 3.9 | 8.4.0 |x86-64 |
+----------------------------------+---------------------------+------------------+--------------+
| Windows 8.1 Pro | 2.6, 2.7, 3.2, 3.3, 3.4 | 2.4.0 |x86,x86-64 |
+----------------------------------+---------------------------+------------------+--------------+
| Windows 8 Pro | 2.6, 2.7, 3.2, 3.3, 3.4a3 | 2.2.0 |x86,x86-64 |
Expand Down