From 867d69d0f293712259621001276c0e2c52ced2e6 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Fri, 11 Nov 2016 17:54:54 +0200 Subject: [PATCH] Travis: Use custom libtorrent formula and bottle for OSX. Caches libtorrent 1.0.10 built with c++11 enabled. --- .travis.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac4caa6a9..7150e64dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,10 @@ notifications: # container-based builds #sudo: false -cache: ccache +cache: + ccache: true + directories: + - $HOME/hombebrew_cache # opt-in Ubuntu Trusty sudo: required @@ -117,12 +120,25 @@ install: fi - | if [ "$TRAVIS_OS_NAME" = "osx" ]; then + mkdir -p "$HOME/hombebrew_cache" ; + wget http://builds.shiki.hu/homebrew/version ; + if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then + echo "Cached files are different from server. Downloading new ones." ; + cp "version" $HOME/hombebrew_cache ; + cd "$HOME/hombebrew_cache" ; + wget http://builds.shiki.hu/homebrew/libtorrent-rasterbar.rb ; + wget http://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.10.yosemite.bottle.tar.gz ; + fi + # dependencies brew update > /dev/null ; brew install colormake ccache ; brew outdated "pkg-config" || brew upgrade "pkg-config" ; - # libtorrent-rasterbar 1.0.9 - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/477d5060fa093883204d70323965375353e03084/Formula/libtorrent-rasterbar.rb ; + # Copy custom libtorrent bottle to homebrew's cache so it can find and install it + # Also install our custom libtorrent formula by passing the local path to it + # These 2 files are restored from Travis' cache. + cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.10.yosemite.bottle.tar.gz" "$(brew --cache)" ; + brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb" ; # Qt if [ "$qt" = 4 ]; then brew install qt && ln -s /usr/local/Cellar/qt/4.8.7_2/plugins /usr/local ; fi ;