-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
77 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.