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

CI: Split MINGW to own workflow, remove redundant job #5709

Merged
merged 3 commits into from Sep 12, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions .github/mergify.yml
Expand Up @@ -7,6 +7,7 @@ pull_request_rules:
- status-success=Test Successful
- status-success=Docker Test Successful
- status-success=Windows Test Successful
- status-success=MinGW Test Successful
- status-success=continuous-integration/appveyor/pr
actions:
merge:
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/test-mingw.yml
@@ -0,0 +1,84 @@
name: Test MinGW

on: [push, pull_request]

jobs:
msys:
hugovk marked this conversation as resolved.
Show resolved Hide resolved
runs-on: windows-2019
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
uses: actions/checkout@v2

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

- name: Install dependencies
run: |
pacman -S --noconfirm \
${{ matrix.package }}-python3-cffi \
${{ matrix.package }}-python3-numpy \
${{ matrix.package }}-python3-olefile \
${{ matrix.package }}-python3-pip \
${{ matrix.package }}-python3-pyqt5 \
${{ matrix.package }}-python3-setuptools \
${{ matrix.package }}-freetype \
${{ 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 \
subversion

python3 -m pip install pyroma pytest pytest-cov

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

- name: Build Pillow
run: CFLAGS="-coverage" python3 setup.py build_ext install

- 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
run: |
python3 -m pip install codecov
bash <(curl -s https://codecov.io/bash) -F GHA_Windows
env:
CODECOV_NAME: ${{ matrix.name }}

success:
needs: msys
hugovk marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
name: MinGW Test Successful
steps:
- name: Success
run: echo MinGW Test Successful
8 changes: 0 additions & 8 deletions .github/workflows/test-valgrind.yml
Expand Up @@ -42,11 +42,3 @@ jobs:
sudo chown -R 1000 $GITHUB_WORKSPACE
docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
sudo chown -R runner $GITHUB_WORKSPACE

success:
needs: build
runs-on: ubuntu-latest
name: Valgrind Test Successful
steps:
- name: Success
run: echo Valgrind Test Successful
75 changes: 2 additions & 73 deletions .github/workflows/test-windows.yml
Expand Up @@ -17,6 +17,7 @@ jobs:
# PyPy 7.3.4+ only ships 64-bit binaries for Windows
- python-version: "pypy-3.7"
architecture: "x64"

timeout-minutes: 30

name: Python ${{ matrix.python-version }} ${{ matrix.architecture }}
Expand Down Expand Up @@ -195,80 +196,8 @@ jobs:
name: ${{ steps.wheel.outputs.dist }}
path: dist\*.whl

msys:
runs-on: windows-2019

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:
- uses: actions/checkout@v2

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

- name: Install Dependencies
run: |
pacman -S --noconfirm \
${{ matrix.package }}-python3-cffi \
${{ matrix.package }}-python3-numpy \
${{ matrix.package }}-python3-olefile \
${{ matrix.package }}-python3-pip \
${{ matrix.package }}-python3-pyqt5 \
${{ matrix.package }}-python3-setuptools \
${{ matrix.package }}-freetype \
${{ 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 \
subversion

python3 -m pip install pyroma pytest pytest-cov

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

- name: Build Pillow
run: CFLAGS="-coverage" python3 setup.py build_ext install

- 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
run: |
python3 -m pip install codecov
bash <(curl -s https://codecov.io/bash) -F GHA_Windows
env:
CODECOV_NAME: ${{ matrix.name }}

success:
needs: [build, msys]
needs: build
runs-on: ubuntu-latest
name: Windows Test Successful
steps:
Expand Down