diff --git a/.travis.yml b/.travis.yml index 7632745..57e6021 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,17 +2,17 @@ language: generic os: - osx - linux -osx_image: xcode7.3 +osx_image: xcode8.3 sudo: required install: -- if [ "$TRAVIS_OS_NAME" = "osx" ]; then bash package/prepare_osx.sh; fi -- if [ "$TRAVIS_OS_NAME" = "linux" ]; then bash package/prepare_linux.sh; fi +- if [ "$TRAVIS_OS_NAME" = "osx" ]; then package/prepare_osx.sh; fi +- if [ "$TRAVIS_OS_NAME" = "linux" ]; then package/prepare_linux.sh; fi script: - if [ "$TRAVIS_OS_NAME" = "osx" ]; then python3 -B -m pytest -vs; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -s '-screen 0 640x480x24 +extension GLX' pytest -vs; fi before_deploy: - export FILENAME=manuskript-$TRAVIS_BRANCH-$TRAVIS_OS_NAME.zip -- if [ "$TRAVIS_OS_NAME" = "osx" ]; then bash package/build_osx.sh; fi +- if [ "$TRAVIS_OS_NAME" = "osx" ]; then package/build_osx.sh; fi deploy: - provider: releases api_key: diff --git a/package/prepare_osx.sh b/package/prepare_osx.sh index 4c2bf9b..8f937a1 100755 --- a/package/prepare_osx.sh +++ b/package/prepare_osx.sh @@ -1,12 +1,21 @@ #!/bin/bash -set -ev +set -ev # display each line executed along with output brew update -# upgrade to python 3.x +# Upgrade to python 3.x brew upgrade python brew install enchant -brew postinstall python # this installs pip +brew postinstall python # this installs pip sudo -H pip3 install --upgrade pip setuptools wheel pip3 install pyinstaller PyQt5 lxml pyenchant pytest pytest-faulthandler -brew install qt hunspell -# fooling PyEnchant as described in the wiki: https://github.com/olivierkes/manuskript/wiki/Package-manuskript-for-OS-X +brew install hunspell +# Fooling PyEnchant as described in the wiki. +# https://github.com/olivierkes/manuskript/wiki/Package-manuskript-for-OS-X sudo touch /usr/local/share/aspell +# +# Note that if qt install is terminated by Travis CI then it is likely +# building from source instead of pouring from a homebrew bottle. +# Fix by choosing lowest osx_image value [1] for xcode that has a +# homebrew qt bottle [2]. +# [1] https://docs.travis-ci.com/user/reference/osx#os-x-version +# [2] https://formulae.brew.sh/formula/qt +brew install qt