2021-12-10 16:52:46 +03:00
|
|
|
name: Test Cygwin
|
|
|
|
|
2021-12-11 16:26:24 +03:00
|
|
|
on: [push, pull_request, workflow_dispatch]
|
2021-12-10 16:52:46 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-02-02 06:44:16 +03:00
|
|
|
runs-on: windows-latest
|
2022-02-02 07:05:54 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-04-16 08:42:09 +03:00
|
|
|
python-minor-version: [7, 8, 9]
|
2022-02-02 07:05:54 +03:00
|
|
|
architecture: ["x86", "x86_64"]
|
|
|
|
|
2022-02-06 15:34:15 +03:00
|
|
|
timeout-minutes: 40
|
2022-02-02 07:05:54 +03:00
|
|
|
|
|
|
|
name: Python 3.${{ matrix.python-minor-version }} ${{ matrix.architecture }}
|
2021-12-10 16:52:46 +03:00
|
|
|
|
|
|
|
steps:
|
2022-02-02 07:31:20 +03:00
|
|
|
- name: Fix line endings
|
|
|
|
run: |
|
|
|
|
git config --global core.autocrlf input
|
|
|
|
|
2021-12-10 16:52:46 +03:00
|
|
|
- name: Checkout Pillow
|
2022-04-16 03:45:19 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-12-11 16:26:24 +03:00
|
|
|
|
2022-02-02 07:31:20 +03:00
|
|
|
- name: Install Cygwin
|
2022-04-16 03:45:19 +03:00
|
|
|
uses: cygwin/cygwin-install-action@v2
|
2021-12-10 16:52:46 +03:00
|
|
|
with:
|
2022-02-02 07:05:54 +03:00
|
|
|
platform: ${{ matrix.architecture }}
|
2021-12-10 16:52:46 +03:00
|
|
|
packages: >
|
2022-04-23 15:25:58 +03:00
|
|
|
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
|
2022-02-02 07:05:54 +03:00
|
|
|
python3${{ matrix.python-minor-version }}-devel
|
|
|
|
python3${{ matrix.python-minor-version }}-numpy
|
|
|
|
python3${{ matrix.python-minor-version }}-sip
|
2022-04-23 15:25:58 +03:00
|
|
|
python3${{ matrix.python-minor-version }}-tkinter
|
|
|
|
qt5-devel-tools subversion xorg-server-extra zlib-devel
|
2022-02-06 15:34:15 +03:00
|
|
|
|
|
|
|
- name: Add Lapack to PATH
|
|
|
|
uses: egor-tensin/cleanup-path@v1
|
|
|
|
with:
|
|
|
|
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack'
|
2022-04-20 17:17:45 +03:00
|
|
|
|
|
|
|
- name: pip cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
2022-04-21 17:26:12 +03:00
|
|
|
path: 'C:\cygwin\home\runneradmin\.cache\pip'
|
2022-04-22 15:25:46 +03:00
|
|
|
key: ${{ runner.os }}-cygwin-${{ matrix.architecture }}-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }}
|
2022-04-20 17:17:45 +03:00
|
|
|
restore-keys: |
|
2022-04-22 15:25:46 +03:00
|
|
|
${{ runner.os }}-cygwin-${{ matrix.architecture }}-pip3.${{ matrix.python-minor-version }}-
|
2021-12-11 16:26:24 +03:00
|
|
|
|
|
|
|
- name: Build system information
|
2022-04-29 17:53:19 +03:00
|
|
|
shell: dash.exe "{0}"
|
2022-02-02 07:31:20 +03:00
|
|
|
run: |
|
2022-04-23 15:22:33 +03:00
|
|
|
python3 .github/workflows/system-info.py
|
2021-12-11 16:26:24 +03:00
|
|
|
|
2022-02-02 07:14:31 +03:00
|
|
|
- name: Install dependencies
|
2021-12-11 03:08:28 +03:00
|
|
|
run: |
|
2022-04-23 15:28:57 +03:00
|
|
|
dash.exe -c "python3.${{ matrix.python-minor-version }} -m pip install -U pip"
|
2022-02-02 07:14:31 +03:00
|
|
|
bash.exe .ci/install.sh
|
2021-12-11 16:26:24 +03:00
|
|
|
|
2022-02-06 15:34:15 +03:00
|
|
|
- name: Install a different NumPy
|
2022-04-16 12:14:00 +03:00
|
|
|
if: matrix.architecture == 'x86_64'
|
2022-04-23 15:22:33 +03:00
|
|
|
shell: dash.exe -l "{0}"
|
2022-02-06 15:34:15 +03:00
|
|
|
run: |
|
2022-04-23 15:22:33 +03:00
|
|
|
python3.${{ matrix.python-minor-version }} -m pip install -U 'numpy!=1.21.*'
|
2022-02-06 15:34:15 +03:00
|
|
|
|
|
|
|
- name: Check imports
|
2022-04-23 15:22:33 +03:00
|
|
|
shell: dash.exe -l "{0}"
|
2022-02-06 15:34:15 +03:00
|
|
|
run: |
|
2022-04-23 15:22:33 +03:00
|
|
|
python3.${{ matrix.python-minor-version }} -c 'import numpy as np; print(np.__version__)'
|
2022-02-06 15:34:15 +03:00
|
|
|
|
2022-02-02 07:14:31 +03:00
|
|
|
- name: Build
|
2022-04-23 15:22:33 +03:00
|
|
|
shell: bash.exe --login -eo pipefail "{0}"
|
2022-01-07 22:34:30 +03:00
|
|
|
run: |
|
2022-04-23 15:22:33 +03:00
|
|
|
python3 -m coverage erase
|
|
|
|
make clean
|
|
|
|
CFLAGS="-coverage -Werror=implicit-function-declaration" python3 -m pip install -v --global-option="build_ext" .
|
|
|
|
python3 selftest.py
|
2022-01-07 22:34:30 +03:00
|
|
|
|
2022-02-06 15:34:15 +03:00
|
|
|
- name: Rebase dlls
|
2022-04-23 15:22:33 +03:00
|
|
|
shell: dash.exe -l "{0}"
|
2022-02-06 15:34:15 +03:00
|
|
|
run: |
|
2022-04-23 15:22:33 +03:00
|
|
|
/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)
|
2022-02-06 15:34:15 +03:00
|
|
|
|
2022-02-02 07:14:31 +03:00
|
|
|
- name: Test
|
2021-12-11 05:53:43 +03:00
|
|
|
run: |
|
2022-02-02 07:31:20 +03:00
|
|
|
bash.exe xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh
|
2021-12-11 16:26:24 +03:00
|
|
|
|
2022-02-02 07:09:49 +03:00
|
|
|
- name: Prepare to upload errors
|
|
|
|
if: failure()
|
|
|
|
run: |
|
2022-02-06 15:34:15 +03:00
|
|
|
dash.exe -c "mkdir -p Tests/errors"
|
2022-02-02 07:09:49 +03:00
|
|
|
|
|
|
|
- name: Upload errors
|
2022-04-16 03:45:19 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-02 07:09:49 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: errors
|
|
|
|
path: Tests/errors
|
|
|
|
|
2021-12-11 16:26:24 +03:00
|
|
|
- name: After success
|
|
|
|
run: |
|
2022-02-02 07:31:20 +03:00
|
|
|
bash.exe .ci/after_success.sh
|
2021-12-11 16:26:24 +03:00
|
|
|
|
|
|
|
- name: Upload coverage
|
2022-04-16 03:45:19 +03:00
|
|
|
uses: codecov/codecov-action@v3
|
2021-12-11 23:13:56 +03:00
|
|
|
with:
|
|
|
|
file: ./coverage.xml
|
|
|
|
flags: GHA_Cygwin
|
2022-02-02 07:05:54 +03:00
|
|
|
name: Cygwin Python 3.${{ matrix.python-minor-version }} ${{ matrix.architecture }}
|
2021-12-18 17:55:24 +03:00
|
|
|
|
2022-02-02 07:26:38 +03:00
|
|
|
success:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Cygwin Test Successful
|
|
|
|
steps:
|
|
|
|
- name: Success
|
|
|
|
run: echo Cygwin Test Successful
|