mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-05 16:37:47 +03:00
b02602fa18
🎉🐑☽🗔 Fix #821.
57 lines
2.3 KiB
YAML
57 lines
2.3 KiB
YAML
language: python
|
|
sudo: false
|
|
env: PYTHON=python
|
|
|
|
git:
|
|
submodules: false
|
|
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
python: 3.5
|
|
- os: linux
|
|
python: 3.6
|
|
- dist: xenial
|
|
python: 3.7
|
|
- os: osx
|
|
language: generic
|
|
env: PYTHON=python3
|
|
- os: windows
|
|
# Windows doesn't support python or even generic language
|
|
language: cpp
|
|
env: PYTHON=/c/Python37/python
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- ttf-dejavu
|
|
|
|
before_install:
|
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export "PATH=$PATH;C:\msys64\mingw64\bin"; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install -y python dejavufonts; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then wget "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20180531.tar.xz"; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then 7z e msys2-base-x86_64-20180531.tar.xz; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then 7z x -y msys2-base-x86_64-20180531.tar -oc:\\; fi
|
|
# We need powershell because Travis' bash and MSYS2's bash rely on conflicting libraries
|
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then powershell "C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-gtk3 --noconfirm'"; fi
|
|
|
|
# Pango 1.38+ is needed to make @font-face work, remove these two lines when it's available on Travis
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir -p ~/.fonts; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget "https://github.com/Kozea/Ahem/blob/master/Ahem.ttf?raw=true" -O ~/.fonts/Ahem.ttf; fi
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap caskroom/fonts; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew pin numpy gdal postgis; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask install font-dejavu-sans; fi
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cairo pango gdk-pixbuf libffi; fi
|
|
|
|
# As setup.py doesn't use pip, setuptools is not updated before installing dependencies
|
|
- $PYTHON -m pip install --upgrade pip setuptools
|
|
|
|
# Upgrade cffi to avoid errors while installing cairocffi
|
|
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then $PYTHON -m pip install --upgrade cffi; fi
|
|
|
|
script:
|
|
- $PYTHON setup.py test
|