|
| 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 | + needs: build |
| 103 | + runs-on: ubuntu-latest |
| 104 | + name: Cygwin Test Successful |
| 105 | + steps: |
| 106 | + - name: Success |
| 107 | + run: echo Cygwin Test Successful |
0 commit comments