diff --git a/.github/workflows/test-mingw.yml b/.github/workflows/test-msys2.yml similarity index 50% rename from .github/workflows/test-mingw.yml rename to .github/workflows/test-msys2.yml index 7f81ba2f89c..d677d7b7dbf 100644 --- a/.github/workflows/test-mingw.yml +++ b/.github/workflows/test-msys2.yml @@ -1,4 +1,4 @@ -name: Test MinGW +name: Test MSYS2 on: push: @@ -27,16 +27,24 @@ env: jobs: build: runs-on: windows-latest - + strategy: + fail-fast: false + matrix: + include: + # skip to save CI time: + # see https://github.com/python-pillow/Pillow/pull/6888#issuecomment-1400392821 + # - msystem: "UCRT64" + - msystem: "CLANG64" + - msystem: "MINGW64" defaults: run: shell: bash.exe --login -eo pipefail "{0}" env: - MSYSTEM: MINGW64 + MSYSTEM: ${{ matrix.msystem }} CHERE_INVOKING: 1 timeout-minutes: 30 - name: "MinGW" + name: MSYS2 ${{ matrix.msystem }} steps: - name: Checkout Pillow @@ -51,39 +59,50 @@ jobs: - name: Install dependencies run: | pacman -S --noconfirm \ - mingw-w64-x86_64-freetype \ - mingw-w64-x86_64-gcc \ - mingw-w64-x86_64-ghostscript \ - mingw-w64-x86_64-lcms2 \ - mingw-w64-x86_64-libavif \ - mingw-w64-x86_64-libimagequant \ - mingw-w64-x86_64-libjpeg-turbo \ - mingw-w64-x86_64-libraqm \ - mingw-w64-x86_64-libtiff \ - mingw-w64-x86_64-libwebp \ - mingw-w64-x86_64-openjpeg2 \ - mingw-w64-x86_64-python-numpy \ - mingw-w64-x86_64-python-olefile \ - mingw-w64-x86_64-python-pip \ - mingw-w64-x86_64-python-psutil \ - mingw-w64-x86_64-python-pytest \ - mingw-w64-x86_64-python-pytest-cov \ - mingw-w64-x86_64-python-pytest-timeout \ - mingw-w64-x86_64-python-pyqt6 + make \ + pactoys \ + subversion + + pacboy -S --noconfirm \ + freetype:p \ + gcc:p \ + ghostscript:p \ + lcms2:p \ + libimagequant:p \ + libjpeg-turbo:p \ + libraqm:p \ + libtiff:p \ + libwebp:p \ + openjpeg2:p \ + python-numpy:p \ + python-olefile:p \ + python-pip:p \ + python-pyqt6:p pushd depends && ./install_extra_test_images.sh && popd - name: Build Pillow - run: CFLAGS="-coverage" python3 -m pip install .[tests] + run: .ci/build.sh - name: Test Pillow - run: | - python3 selftest.py --installed - .ci/test.sh + run: .ci/test.sh + + - name: After success + run: .ci/after_success.sh - name: Upload coverage uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: files: ./coverage.xml flags: GHA_Windows - name: "MSYS2 MinGW" + name: MSYS2 ${{ matrix.msystem }} + + success: + permissions: + contents: none + needs: build + runs-on: ubuntu-latest + name: MSYS2 Test Successful + steps: + - name: Success + run: echo MSYS2 Test Successful diff --git a/.github/workflows/test-skipped.yml b/.github/workflows/test-skipped.yml index b0490ce9cc3..947d3671e45 100644 --- a/.github/workflows/test-skipped.yml +++ b/.github/workflows/test-skipped.yml @@ -34,9 +34,9 @@ jobs: - name: Success run: echo Tests not required for this change - test-mingw: + test-msys2: runs-on: ubuntu-slim - name: MinGW + name: MSYS2 steps: - name: Success run: echo Tests not required for this change diff --git a/docs/installation/building-from-source.rst b/docs/installation/building-from-source.rst index a0923066afd..15e7f1e4c3d 100644 --- a/docs/installation/building-from-source.rst +++ b/docs/installation/building-from-source.rst @@ -184,33 +184,45 @@ Many of Pillow's features require external libraries: .. tab:: Windows using MSYS2/MinGW - To build Pillow using MSYS2, make sure you run the **MSYS2 MinGW 32-bit** or - **MSYS2 MinGW 64-bit** console, *not* **MSYS2** directly. + The following instructions are for the **MSYS2 UCRT64** system. + To build Pillow on one of the other MSYS2 systems, replace all occurences of + ``mingw-w64-ucrt-x86_64`` with the corresponding prefix: - The following instructions target the 64-bit build, for 32-bit - replace all occurrences of ``mingw-w64-x86_64-`` with ``mingw-w64-i686-``. + .. list-table:: + :header-rows: 1 + + * - MSYS2 system + - Package prefix + * - **UCRT64** + - ``mingw-w64-ucrt-x86_64`` + * - **CLANG64** + - ``mingw-w64-clang-x86_64`` + * - **MINGW64** + - ``mingw-w64-x86_64`` + + Installing in **MSYS2 MSYS** is not supported. Make sure you have Python and GCC installed:: pacman -S \ - mingw-w64-x86_64-gcc \ - mingw-w64-x86_64-python \ - mingw-w64-x86_64-python-pip \ - mingw-w64-x86_64-python-setuptools + mingw-w64-ucrt-x86_64-gcc \ + mingw-w64-ucrt-x86_64-python3 \ + mingw-w64-ucrt-x86_64-python3-pip \ + mingw-w64-ucrt-x86_64-python3-setuptools - Prerequisites are installed on **MSYS2 MinGW 64-bit** with:: + Prerequisites are installed on **MSYS2 UCRT64** with:: pacman -S \ - mingw-w64-x86_64-libjpeg-turbo \ - mingw-w64-x86_64-zlib \ - mingw-w64-x86_64-libtiff \ - mingw-w64-x86_64-freetype \ - mingw-w64-x86_64-lcms2 \ - mingw-w64-x86_64-libwebp \ - mingw-w64-x86_64-openjpeg2 \ - mingw-w64-x86_64-libimagequant \ - mingw-w64-x86_64-libraqm \ - mingw-w64-x86_64-libavif + mingw-w64-ucrt-x86_64-libjpeg-turbo \ + mingw-w64-ucrt-x86_64-zlib \ + mingw-w64-ucrt-x86_64-libtiff \ + mingw-w64-ucrt-x86_64-freetype \ + mingw-w64-ucrt-x86_64-lcms2 \ + mingw-w64-ucrt-x86_64-libwebp \ + mingw-w64-ucrt-x86_64-openjpeg2 \ + mingw-w64-ucrt-x86_64-libimagequant \ + mingw-w64-ucrt-x86_64-libraqm \ + mingw-w64-ucrt-x86_64-libavif .. tab:: FreeBSD diff --git a/docs/installation/platform-support.rst b/docs/installation/platform-support.rst index 15916a1e25f..f20e76131c0 100644 --- a/docs/installation/platform-support.rst +++ b/docs/installation/platform-support.rst @@ -51,7 +51,7 @@ These platforms are built and tested for every change. | Windows Server 2025 | 3.12, 3.13, 3.14, 3.15, | x86-64 | | | PyPy3 | | | +----------------------------+---------------------+ -| | 3.14 (MinGW) | x86-64 | +| | 3.14 (CLANG64, MINGW64) | x86-64 | +----------------------------------+----------------------------+---------------------+