Skip to content

Commit

Permalink
attempt to fix mingw test
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Sep 11, 2023
1 parent 31ecd56 commit dde52da
Showing 1 changed file with 32 additions and 40 deletions.
72 changes: 32 additions & 40 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,71 +94,63 @@ jobs:
CODECOV_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }}

msys:
runs-on: windows-2019
runs-on: windows-latest

strategy:
fail-fast: false
matrix:
msystem: [ "mingw64" ]
python-version: ["3"]
include:
- msystem: "mingw64"
name: "MSYS2 MinGW 64-bit"
package: "mingw-w64-x86_64"
env: x86_64

name: ${{ matrix.name }} python ${{ matrix.python-version }}
name: MinGW

defaults:
run:
shell: msys2 {0}
shell: bash.exe --login -eo pipefail "{0}"

env:
MSYSTEM: ${{ matrix.msystem }}
MSYSTEM: mingw64
CHERE_INVOKING: 1

timeout-minutes: 30

steps:
- uses: actions/checkout@v3

- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
base-devel
git
${{ matrix.package }}-toolchain
${{ matrix.package }}-python${{ matrix.python-version }}-pip
${{ matrix.package }}-python${{ matrix.python-version }}-setuptools
${{ matrix.package }}-libjpeg-turbo
${{ matrix.package }}-libtiff
${{ matrix.package }}-libpng
${{ matrix.package }}-openjpeg2
${{ matrix.package }}-libavif
- name: Set up shell
run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH
shell: pwsh

- name: Install dependencies
run: |
pacman -S --noconfirm \
base-devel \
git \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-toolchain \
mingw-w64-x86_64-python3-pip \
mingw-w64-x86_64-python3-setuptools \
mingw-w64-x86_64-libjpeg-turbo \
mingw-w64-x86_64-libtiff \
mingw-w64-x86_64-libpng \
mingw-w64-x86_64-openjpeg2 \
mingw-w64-x86_64-zlib \
mingw-w64-x86_64-libavif
- name: Install Dependencies
run: |
python${{ matrix.python-version }} -m pip install pytest pytest-cov pillow mock
python3 -m pip install pytest pytest-cov pillow mock
- name: Build pillow-avif-plugin
run: SETUPTOOLS_USE_DISTUTILS="stdlib" CFLAGS="-coverage" python${{ matrix.python-version }} -m pip install .
run: SETUPTOOLS_USE_DISTUTILS="stdlib" CFLAGS="-coverage" python3 -m pip install .

- name: Test pillow-avif-plugin
run: |
python${{ matrix.python-version }} -m pytest -vx --cov pillow_avif --cov tests --cov-report term --cov-report xml tests
python3 -m pytest -vx --cov pillow_avif --cov tests --cov-report term --cov-report xml tests
- name: Upload coverage
run: |
python${{ matrix.python-version }} -m pip install codecov
bash <(curl -s https://codecov.io/bash) -F GHA_Windows
env:
CODECOV_NAME: ${{ matrix.name }}

uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: GHA_Windows
name: "MSYS2 MinGW"
success:
needs: [build, msys]
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
name: Test Successful
steps:
- name: Success
Expand Down

0 comments on commit dde52da

Please sign in to comment.