diff --git a/.travis.yml b/.travis.yml index 714f87155..bf64751f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: python sudo: false +env: PYTHON=python git: submodules: false @@ -14,7 +15,11 @@ matrix: python: 3.7 - os: osx language: generic - env: PYTHON_VERSION=3 + env: PYTHON=python3 + - os: windows + # Windows doesn't support python or even generic language + language: cpp + env: PYTHON=/c/Python37/python addons: apt: @@ -22,8 +27,13 @@ addons: - ttf-dejavu before_install: - # As setup.py doesn't use pip, setuptools is not updated before installing dependencies - - python$PYTHON_VERSION -m pip install --upgrade setuptools + - 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 @@ -36,5 +46,11 @@ before_install: - 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$PYTHON_VERSION setup.py test + - $PYTHON setup.py test