Skip to content

poetry: update various dev deps #411

poetry: update various dev deps

poetry: update various dev deps #411

Workflow file for this run

name: Test
on:
push:
pull_request:
jobs:
msys2:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- msystem: MINGW64
arch: x86_64
- msystem: MINGW32
arch: i686
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
git
mingw-w64-${{ matrix.arch }}-cairo
mingw-w64-${{ matrix.arch }}-python
mingw-w64-${{ matrix.arch }}-python-pip
mingw-w64-${{ matrix.arch }}-cc
mingw-w64-${{ matrix.arch }}-meson
mingw-w64-${{ matrix.arch }}-ninja
mingw-w64-${{ matrix.arch }}-pkg-config
- name: Install dependencies
shell: msys2 {0}
run: |
python -m pip install pytest coverage hypothesis setuptools wheel
- name: Build & Test with setuptools
shell: msys2 {0}
run: |
export SETUPTOOLS_USE_DISTUTILS=stdlib
export CFLAGS="-std=c90 -Wall -Wno-long-long -Werror -coverage"
PYTHONDEVMODE=1 python -m coverage run --branch setup.py test
python -m coverage xml -i
python setup.py sdist
python setup.py bdist_wheel
python setup.py install --root="$(pwd)"/_root_abs
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Build & Install with pip
shell: msys2 {0}
run: |
git clean -xfdf
export SETUPTOOLS_USE_DISTUTILS=stdlib
python -m pip install .
- name: Build & Test with meson
shell: msys2 {0}
run: |
git clean -xfdf
meson --werror _build
meson compile -C _build
meson test -v -C _build
ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y libcairo2-dev ninja-build
python -m pip install --upgrade setuptools
python -m pip install --upgrade pytest flake8 coverage hypothesis wheel poetry meson
python -m pip install --upgrade pygame || true
- name: Build & Test with setuptools
run: |
export CFLAGS="-Werror -coverage"
PYTHONDEVMODE=1 python -m coverage run --branch setup.py test
python -m coverage xml -i
python setup.py sdist
python setup.py bdist_wheel
python setup.py install --root="$(pwd)"/_root_abs
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Build & Install with pip
run: |
git clean -xfdf
python -m pip install .
- name: Build & Test with meson
run: |
git clean -xfdf
meson --werror _build
meson compile -C _build
meson test -v -C _build
- name: Build & Test with poetry
if: ${{ matrix.python-version != 'pypy-3.10' }}
run: |
git clean -xfdf
poetry install
poetry run python setup.py test
- name: Run linters
if: ${{ matrix.python-version != 'pypy-3.10' }}
run: |
poetry run flake8
poetry run mypy .
- name: Build docs
if: ${{ matrix.python-version != 'pypy-3.10' }}
run: |
poetry run python -m sphinx -W -a -E -b html -n docs docs/_build
msvc:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
architecture: ['x86', 'x64']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
allow-prereleases: true
- name: Download and extract Cairo Binary
run: |
python .ci/download-cairo-win32.py
- name: Build
env:
PKG_CONFIG: ${{ github.workspace }}/cairo-prebuild/bin/pkgconf.exe
PKG_CONFIG_PATH: ${{ github.workspace }}/cairo-prebuild/lib/pkgconfig
run: |
python -m pip install --upgrade pip
if (-not $?) { exit 1 }
python -m pip install --upgrade wheel
if (-not $?) { exit 1 }
python -m pip install --upgrade setuptools
if (-not $?) { exit 1 }
python -m pip install --upgrade pytest flake8 coverage hypothesis
if (-not $?) { exit 1 }
python -m pip install --upgrade pygame
python -X dev -m coverage run --branch setup.py test
if (-not $?) { exit 1 }
python -m coverage xml -i
if (-not $?) { exit 1 }
python -m flake8 .
if (-not $?) { exit 1 }
python setup.py sdist
if (-not $?) { exit 1 }
python setup.py bdist
if (-not $?) { exit 1 }
python setup.py install --root=_root
if (-not $?) { exit 1 }
python setup.py bdist_wheel
if (-not $?) { exit 1 }
python setup.py install --root=_root_setup
if (-not $?) { exit 1 }
python -m pip install .
if (-not $?) { exit 1 }
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- uses: actions/upload-artifact@v3
with:
name: wheels-${{ matrix.python-version }}
path: dist/pycairo*.whl
macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install pkg-config cairo python meson
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pytest coverage hypothesis wheel
- name: Build & Test with setuptools
run: |
PYTHONDEVMODE=1 python3 -m coverage run --branch setup.py test
python3 -m coverage xml -i
python3 setup.py sdist
python3 setup.py install --root="$(pwd)"/_root_abs
python3 setup.py bdist_wheel
python3 -m pip install .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Build & Install with pip
run: |
git clean -xfdf
python3 -m pip install .
- name: Build & Test with meson
run: |
git clean -xfdf
meson --werror _build
meson compile -C _build
meson test -v -C _build