Skip to content
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

GHA: Test MSYS2/CLANG64 #6888

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/mergify.yml
Expand Up @@ -7,7 +7,7 @@ pull_request_rules:
- status-success=Test Successful
- status-success=Docker Test Successful
- status-success=Windows Test Successful
- status-success=MinGW
- status-success=MSYS2 Test Successful
- status-success=Cygwin Test Successful
- status-success=continuous-integration/appveyor/pr
actions:
Expand Down
81 changes: 0 additions & 81 deletions .github/workflows/test-mingw.yml

This file was deleted.

104 changes: 104 additions & 0 deletions .github/workflows/test-msys2.yml
@@ -0,0 +1,104 @@
name: Test MSYS2

on:
push:
paths-ignore:
- ".github/workflows/docs.yml"
- "docs/**"
pull_request:
paths-ignore:
- ".github/workflows/docs.yml"
- "docs/**"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

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: ${{ matrix.msystem }}
CHERE_INVOKING: 1

timeout-minutes: 30
name: MSYS2 ${{ matrix.msystem }}

steps:
- name: Checkout Pillow
uses: actions/checkout@v3

- name: Set up shell
run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH
shell: pwsh

- name: Install dependencies
run: |
pacman -S --noconfirm \
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 \
python3-cffi:p \
python3-numpy:p \
python3-olefile:p \
python3-pip:p \
python3-setuptools:p \
python-pyqt6:p

python3 -m pip install pyroma pytest pytest-cov pytest-timeout

pushd depends && ./install_extra_test_images.sh && popd

- name: Build Pillow
run: SETUPTOOLS_USE_DISTUTILS="stdlib" .ci/build.sh

- name: Test Pillow
run: .ci/test.sh

- name: After success
run: .ci/after_success.sh

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: GHA_Windows
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
49 changes: 32 additions & 17 deletions docs/installation.rst
Expand Up @@ -285,29 +285,44 @@ 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 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:

.. 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-python3 \
mingw-w64-x86_64-python3-pip \
mingw-w64-x86_64-python3-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-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

https://www.msys2.org/docs/python/ states that setuptools >= 60 does not work with
MSYS2. To workaround this, before installing Pillow you must run::
Expand Down Expand Up @@ -472,7 +487,7 @@ These platforms are built and tested for every change.
| Windows Server 2022 | 3.8, 3.9, 3.10, 3.11, | x86-64 |
| | 3.12, PyPy3 | |
| +----------------------------+---------------------+
| | 3.9 (MinGW) | x86-64 |
| | 3.9 (CLANG64, MINGW64) | x86-64 |
| +----------------------------+---------------------+
| | 3.8, 3.9 (Cygwin) | x86-64 |
+----------------------------------+----------------------------+---------------------+
Expand Down