Skip to content

Commit

Permalink
Switch to GHA.
Browse files Browse the repository at this point in the history
  • Loading branch information
anntzer committed Oct 5, 2021
1 parent 163a369 commit af8a7ee
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 120 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: build

on: [push, pull_request]

jobs:
build:
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
python-version: ["3.7", "3.8", "3.9"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build & install
shell: bash
run: |
set -x
python -mpip install --upgrade pip setuptools &&
case "$(python -c 'import sys; print(sys.platform)')" in
linux)
sudo PY_VERS="${{ matrix.python-version }}" tools/build-manylinux-wheel.sh &&
sudo apt update &&
sudo apt install ghostscript inkscape \
texlive-latex-{base,recommended,extra} texlive-fonts-recommended cm-super dvipng &&
pip install 'pycairo<1.20' # 1.20 requires too-recent cairo for Ubuntu 16.04.
;;
darwin)
# Don't install inkscape: building it from source is a bit silly.
export HOMEBREW_NO_INSTALL_CLEANUP=1 &&
brew install cairo pkg-config &&
PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig tools/build-macos-wheel.sh &&
brew install ghostscript
;;
win32)
# Don't install inkscape (see note in run-mpl-test-suite.py).
# Skip known-bad version of numpy.
git clone --depth 1 https://github.com/anntzer/pycairo-windows-wheels &&
python -mpip install --find-links pycairo-windows-wheels --prefer-binary pycairo &&
python tools/build-windows-wheel.py &&
choco install --no-progress ghostscript &&
pip install 'numpy!=1.19.4'
;;
*)
exit 1
;;
esac &&
python -mpip install dist/*.whl &&
python tools/ensure-mpl-test-data.py &&
# pytest 6.2 is incompatible with matplotlib<3.4
# pytest-{instafail,timeout} useful for hanging tests.
python -mpip install 'pytest<6.2' pytest-instafail pytest-timeout
- name: Test
shell: bash
run: |
set -x &&
python -mpip list &&
# Skip tests triggering to-be-investigated fatal error on Windows :(
(
if [[ "$(python -c 'import sys; print(sys.platform)')" != win32 ]]; then
./run-mpl-test-suite.py --tolerance=50 --instafail --timeout=300 --capture=no --verbose
fi
) &&
PYTHONFAULTHANDLER=1 PYTHONIOENCODING=utf-8 ./run-examples.py
- uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/*.whl
if: ${{ always() }}
7 changes: 2 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
A (new) cairo backend for Matplotlib
====================================

| |GitHub| |PyPI| |Fedora Rawhide| |Azure Pipelines|
| |GitHub| |PyPI| |Fedora Rawhide|
.. |GitHub|
image:: https://img.shields.io/badge/github-anntzer%2Fmplcairo-brightgreen
Expand All @@ -13,9 +13,6 @@ A (new) cairo backend for Matplotlib
.. |Fedora Rawhide|
image:: https://repology.org/badge/version-for-repo/fedora_rawhide/python:mplcairo.svg?header=Fedora%20Rawhide
:target: fedora-package_
.. |Azure Pipelines|
image:: https://img.shields.io/azure-devops/build/matplotlib/86ce5a4c-000c-483c-88a3-8b5612c62517/3
:target: https://dev.azure.com/matplotlib/mplcairo/_build/latest?definitionId=3
.. _fedora-package: https://src.fedoraproject.org/rpms/python-mplcairo

Expand Down Expand Up @@ -203,7 +200,7 @@ Windows
The following additional dependencies are required:

- VS2019 (The exact minimum version is unknown, but it is known that mplcairo
fails to build on the Azure ``vs2017-win2016`` agent and requires the
fails to build on the Github Actions ``windows-2016`` agent and requires the
``windows-2019`` agent.)

- cairo headers and import and dynamic libraries (``cairo.lib`` and
Expand Down
115 changes: 0 additions & 115 deletions azure-pipelines.yml

This file was deleted.

0 comments on commit af8a7ee

Please sign in to comment.