diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3427537..faf136d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,27 +94,16 @@ 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 @@ -122,43 +111,46 @@ jobs: 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