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
+151
−23
Merged
Changes from 63 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 67bef87
CI: Specify where the command line goes in the shell.
DWesl b798989
CI: Make sure all python requirements are installed in Cygwin CI.
DWesl a4495de
CI: Stop using dash so the DOS line endings don't throw things off.
DWesl 8ebac45
CI: Explicitly use dash to get shell globbing.
DWesl cd087c6
CI: Fix the path to the build wheels.
DWesl 1daaf92
CI: Split the config check from the actual test.
DWesl 9ec4034
CI: Incorporate suggestions from PR.
DWesl 407abbf
CI: Try to get tests fully working
DWesl 4cfb1a8
CI: Use the new GitHub Action for codecov
DWesl 90cf149
CI: Fix the spelling on the codecov repository.
DWesl 7fd3e99
CI: Make sure correct version of python is used for testing.
DWesl 1c25d95
CI: Get cygwin tests running
DWesl b9fee08
TST: Parametrize numpy roundtrip to find failing case
DWesl 77c8a07
DOC: Rearrange the Cygwin entries on the support matrix.
DWesl fa536b4
Merge branch 'main' of upstream into add-cygwin-to-ci
DWesl 7ad8fdb
CI: Get all the tests running on Cygwin.
DWesl a23131c
CI: Stop trying to run the netpbm tests.
DWesl 4e7e70f
CI: Install netpbm and dependencies on Cygwin CI.
DWesl 179cdd4
Merge branch 'main' into add-cygwin-to-ci
radarhere e1c2735
Switched to windows-latest
radarhere 6293406
Switched to cygwin/cygwin-install-action
radarhere 728bc7d
Added matrix to test Python 3.7 and 32-bit
radarhere 4be3b76
Connected Cygwin jobs to mergify
radarhere 8d2c56e
Upload errors on failure
radarhere 0563739
Install Pillow directly
radarhere 6fded1a
Install cjpeg and djpeg
radarhere 6b05452
Merge pull request #1 from radarhere/add-cygwin-to-ci
DWesl 1312123
Install netpbm
radarhere 2d6dee1
CI: Try to get Cygwin workflow working.
DWesl b582806
Merge remote-tracking branch 'upstream/main' into add-cygwin-to-ci
DWesl 5588f57
BUG: Only set title in ImageShow.DisplayViewer when title provided
DWesl 4d0e294
CI: Revert changes to test.sh
DWesl e5537b5
Merge branch 'main' into add-cygwin-to-ci
radarhere 7099ade
Merge branch 'main' into add-cygwin-to-ci
DWesl 1d1c22e
CI: Update versions of actions used by Cygwin CI
DWesl 635f8cf
Added Python 3.9
radarhere cdfe08b
Only install NumPy through pip on 64-bit
radarhere 80b8e12
Merge pull request #2 from radarhere/add-cygwin-to-ci
DWesl 97e6197
CI: Set up cache for Cygwin pip
DWesl bd61d1e
FIX, CI: Actually run pip
DWesl be6dd71
Ci: Simplify Cygwin pip cache
DWesl c1d3bac
CI: Fix runner username for pip cache
DWesl 805e8f1
CI: Try to fix Cygwin pip cache
DWesl 7605e46
CI: Set shell for Cygwin CI steps
DWesl 1674e42
CI: Sort the Cygwin requirements.
DWesl 46c1f93
CI: Update pip before installing dependencies.
DWesl 9fb7951
FIX, CI: Change shell to stay in repository.
DWesl 853a95d
Merge branch 'main' into add-cygwin-to-ci
radarhere fdbab82
CI: Use dash to check system-info.py
DWesl afa3cea
Merge branch 'main' into add-cygwin-to-ci
DWesl 91e6457
CI: Stop using login shell for build info
DWesl ed0c37d
CI: Don't use shell for build information
DWesl 41976ae
FIX: Fix syntax for shell call
DWesl e0f4c21
CI: Remind bash to ignore CR in workflow
DWesl 88c406e
CI: Stop using login shell for build step
DWesl 08e0d0b
CI: Use bash for rebase step
DWesl 2d25e66
Do not install NumPy on Python 3.11
radarhere 3453b0e
Merge pull request #3 from radarhere/add-cygwin-to-ci
DWesl 143e57b
CI: Specify python minor version everywhere on Cygwin
DWesl ce74898
CI: Update Cygwin pip, but not on 32-bit
DWesl 0b13425
CI: Use alternatives to select python version (#4)
DWesl 941ff61
CI: Drop 32-bit Cygwin from regular testing
DWesl 2067f60
STY: Commit suggestions from PR review.
DWesl 3005ea1
Merge branch 'main' into add-cygwin-to-ci
radarhere b670df8
STY: Fix English in .github/workflows/test-cygwin.yml
DWesl eee4811
Removed DLL rebase
radarhere a5b20f7
Removed setting alternative
radarhere 7c97d84
CI: Stop testing numpy imports
DWesl c535601
Merge pull request #8 from radarhere/add-cygwin-to-ci
DWesl c6cdd4d
Adjust formatting
radarhere c919db1
Install cffi
radarhere 035e955
Use build.sh
radarhere 0c7868b
Added Cygwin badge
radarhere 63cd3cb
Merge pull request #9 from radarhere/add-cygwin-to-ci
DWesl 30db27c
CI: Only invoke bash once for build step.
DWesl File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
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] | ||
architecture: ["x86_64"] | ||
DWesl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
timeout-minutes: 40 | ||
|
||
name: Python 3.${{ matrix.python-minor-version }} ${{ matrix.architecture }} | ||
DWesl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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: ${{ matrix.architecture }} | ||
DWesl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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-${{ matrix.architecture }}-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }} | ||
restore-keys: | | ||
${{ runner.os }}-cygwin-${{ matrix.architecture }}-pip3.${{ matrix.python-minor-version }}- | ||
DWesl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Ensure correct python minor version used in scripts | ||
DWesl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
shell: bash.exe -eo pipefail -o igncr "{0}" | ||
run: | | ||
/usr/sbin/alternatives --set python3 /usr/bin/python3.${{ matrix.python-minor-version }} | ||
/usr/sbin/alternatives --display python3 | ||
/usr/sbin/alternatives --set python /usr/bin/python3.${{ matrix.python-minor-version }} | ||
/usr/sbin/alternatives --display python | ||
|
||
- 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 | ||
if: matrix.architecture == 'x86_64' | ||
DWesl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
shell: dash.exe -l "{0}" | ||
run: | | ||
python3 -m pip install -U 'numpy!=1.21.*' | ||
|
||
- name: Check imports | ||
shell: dash.exe -l "{0}" | ||
run: | | ||
python3 -c 'import numpy as np; print(np.__version__)' | ||
|
||
DWesl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Build | ||
shell: bash.exe -eo pipefail -o igncr "{0}" | ||
run: | | ||
python3 -m coverage erase | ||
make clean | ||
CFLAGS="-coverage -Werror=implicit-function-declaration" python3 -m pip install -v --global-option="build_ext" . | ||
python3 selftest.py | ||
|
||
- name: Rebase dlls | ||
shell: bash.exe -eo pipefail -o igncr "{0}" | ||
run: | | ||
/usr/bin/rebase --database $(find /usr{,/local}/lib/python3.${{ matrix.python-minor-version }}/site-packages src/PIL ${HOME}/.local/lib/ /usr/lib/lapack /usr/bin -name \*.dll -o -name \*.exe) | ||
|
||
- 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 }} ${{ matrix.architecture }} | ||
DWesl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
success: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Cygwin Test Successful | ||
steps: | ||
- name: Success | ||
run: echo Cygwin Test Successful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a 32-bit check? If so, let's revert it.