1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 08:27:22 +03:00
WeasyPrint/.travis.yml
2020-04-05 23:10:14 +02:00

59 lines
2.2 KiB
YAML

language: python
env: PYTHON=python
git:
submodules: false
jobs:
include:
- os: linux
python: 3.5
- os: linux
python: 3.6
- dist: bionic
python: 3.7
- dist: bionic
python: 3.8
- os: osx
language: generic
env:
- HOMEBREW_NO_AUTO_UPDATE=1
- PYTHON=python3
- os: windows
# Windows doesn't support python or even generic language
language: cpp
env: PYTHON=/c/Python38/python
allow_failures:
- os: windows
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 homebrew/cask-fonts; 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