diff --git a/.travis.yml b/.travis.yml index 84377f7..87cf3be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,18 +10,19 @@ script: before_install: - brew update -- brew install python@2 +- travis/download-homebrew +- export PATH="/usr/local/opt/python@2/bin:$PATH" +- travis/download-python - brew tap cartr/qt4 - brew tap-pin cartr/qt4 - brew install pyside install: -#- export PATH=/usr/local/bin:$PATH -- export PATH="/usr/local/opt/python@2/bin:$PATH" - export QT_PREFERRED_BINDING="PySide" - pip2 install twisted appnope pyobjc py2app before_deploy: +#- travis/cache-homebrew - pip2 install dmgbuild - mkdir dist_dmg - mv resources/macos_vlc_install.command resources/.macos_vlc_install.command diff --git a/travis/cache-homebrew b/travis/cache-homebrew new file mode 100755 index 0000000..d9dcc38 --- /dev/null +++ b/travis/cache-homebrew @@ -0,0 +1,6 @@ +#!/bin/sh + +mkdir travis-cache +if [ ! -f homebrew-cache.tar.gz ]; then + tar czf travis-cache/homebrew-cache.tar.gz --directory /usr/local/Cellar pkg-config readline sqlite gdbm makedepend openssl python@2 +fi diff --git a/travis/cache-python b/travis/cache-python new file mode 100755 index 0000000..f7d1e65 --- /dev/null +++ b/travis/cache-python @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ ! -f python-cache.tar.gz ]; then + tar czf travis-cache/python-cache.tar.gz --directory /usr/local/lib/python2.7 site-packages +fi diff --git a/travis/download-homebrew b/travis/download-homebrew new file mode 100755 index 0000000..dd23237 --- /dev/null +++ b/travis/download-homebrew @@ -0,0 +1,13 @@ +#!/bin/sh + +curl -L "https://dl.bintray.com/alby128/Syncplay/homebrew-cache.tar.gz" -o homebrew-cache.tar.gz +if [ -f homebrew-cache.tar.gz ]; then + if ! tar tf homebrew-cache.tar.gz &>/dev/null; then + rm homebrew-cache.tar.gz + exit 0 + fi + tar zxf homebrew-cache.tar.gz --directory /usr/local/Cellar + brew unlink pkg-config + brew link pkg-config + brew link --force readline sqlite gdbm makedepend python@2 +fi diff --git a/travis/download-python b/travis/download-python new file mode 100755 index 0000000..870f07e --- /dev/null +++ b/travis/download-python @@ -0,0 +1,10 @@ +#!/bin/sh + +curl -L "https://dl.bintray.com/alby128/Syncplay/python-cache.tar.gz" -o python-cache.tar.gz +if [ -f python-cache.tar.gz ]; then + if ! tar tf python-cache.tar.gz &>/dev/null; then + rm python-cache.tar.gz + exit 0 + fi + tar zxf python-cache.tar.gz --directory /usr/local/lib/python2.7 +fi