2021-09-06 15:07:53 +03:00
|
|
|
name: Test MinGW
|
|
|
|
|
2023-03-04 16:44:56 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- ".github/workflows/docs.yml"
|
|
|
|
- "docs/**"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- ".github/workflows/docs.yml"
|
|
|
|
- "docs/**"
|
|
|
|
workflow_dispatch:
|
2021-09-06 15:07:53 +03:00
|
|
|
|
2022-07-04 04:19:58 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2023-01-12 23:18:56 +03:00
|
|
|
concurrency:
|
2022-09-26 15:16:33 +03:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-09-06 15:07:53 +03:00
|
|
|
jobs:
|
2021-09-12 10:10:31 +03:00
|
|
|
build:
|
2022-01-30 06:40:30 +03:00
|
|
|
runs-on: windows-latest
|
2021-09-06 15:07:53 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
mingw: ["MINGW32", "MINGW64"]
|
|
|
|
include:
|
|
|
|
- mingw: "MINGW32"
|
|
|
|
name: "MSYS2 MinGW 32-bit"
|
|
|
|
package: "mingw-w64-i686"
|
|
|
|
- mingw: "MINGW64"
|
|
|
|
name: "MSYS2 MinGW 64-bit"
|
|
|
|
package: "mingw-w64-x86_64"
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash.exe --login -eo pipefail "{0}"
|
|
|
|
env:
|
|
|
|
MSYSTEM: ${{ matrix.mingw }}
|
|
|
|
CHERE_INVOKING: 1
|
|
|
|
|
|
|
|
timeout-minutes: 30
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Pillow
|
2022-03-04 12:04:12 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-09-06 15:07:53 +03:00
|
|
|
|
|
|
|
- name: Set up shell
|
|
|
|
run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH
|
|
|
|
shell: pwsh
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
pacman -S --noconfirm \
|
|
|
|
${{ matrix.package }}-freetype \
|
2022-02-23 15:28:23 +03:00
|
|
|
${{ matrix.package }}-gcc \
|
2021-09-06 15:07:53 +03:00
|
|
|
${{ matrix.package }}-ghostscript \
|
|
|
|
${{ matrix.package }}-lcms2 \
|
|
|
|
${{ matrix.package }}-libimagequant \
|
|
|
|
${{ matrix.package }}-libjpeg-turbo \
|
|
|
|
${{ matrix.package }}-libraqm \
|
|
|
|
${{ matrix.package }}-libtiff \
|
|
|
|
${{ matrix.package }}-libwebp \
|
|
|
|
${{ matrix.package }}-openjpeg2 \
|
2023-01-28 17:40:11 +03:00
|
|
|
${{ matrix.package }}-python3-cffi \
|
|
|
|
${{ matrix.package }}-python3-numpy \
|
|
|
|
${{ matrix.package }}-python3-olefile \
|
|
|
|
${{ matrix.package }}-python3-pip \
|
2023-02-08 01:46:01 +03:00
|
|
|
${{ matrix.package }}-python3-setuptools
|
2021-09-06 15:07:53 +03:00
|
|
|
|
2023-01-12 23:18:56 +03:00
|
|
|
if [ ${{ matrix.package }} == "mingw-w64-x86_64" ]; then
|
|
|
|
pacman -S --noconfirm \
|
|
|
|
${{ matrix.package }}-python-pyqt6
|
|
|
|
fi
|
|
|
|
|
2021-10-18 16:06:07 +03:00
|
|
|
python3 -m pip install pyroma pytest pytest-cov pytest-timeout
|
2021-09-06 15:07:53 +03:00
|
|
|
|
|
|
|
pushd depends && ./install_extra_test_images.sh && popd
|
|
|
|
|
|
|
|
- name: Build Pillow
|
2023-05-03 01:29:20 +03:00
|
|
|
run: SETUPTOOLS_USE_DISTUTILS="stdlib" CFLAGS="-coverage" python3 -m pip install --global-option="build_ext" .
|
2021-09-06 15:07:53 +03:00
|
|
|
|
|
|
|
- name: Test Pillow
|
|
|
|
run: |
|
|
|
|
python3 selftest.py --installed
|
|
|
|
python3 -c "from PIL import Image"
|
|
|
|
python3 -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests
|
|
|
|
|
|
|
|
- name: Upload coverage
|
2022-09-24 04:33:16 +03:00
|
|
|
uses: codecov/codecov-action@v3
|
|
|
|
with:
|
|
|
|
file: ./coverage.xml
|
|
|
|
flags: GHA_Windows
|
|
|
|
name: ${{ matrix.name }}
|
2021-09-06 15:07:53 +03:00
|
|
|
|
|
|
|
success:
|
2022-07-04 04:19:58 +03:00
|
|
|
permissions:
|
|
|
|
contents: none
|
2021-09-12 10:10:31 +03:00
|
|
|
needs: build
|
2021-09-06 15:07:53 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: MinGW Test Successful
|
|
|
|
steps:
|
|
|
|
- name: Success
|
|
|
|
run: echo MinGW Test Successful
|