Travis: Use custom libtorrent formula and bottle for OSX.

Caches libtorrent 1.0.10 built with c++11 enabled.
This commit is contained in:
sledgehammer999 2016-11-11 17:54:54 +02:00
parent fd5d1583de
commit f2d8b8e319

View File

@ -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 ;