Browse Source

Fix building in macOS on TravisCI

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
e4ffe7aa32
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 37
      .travis.yml

37
.travis.yml

@ -130,29 +130,17 @@ install:
fi fi
- | - |
if [ "$libt_branch" = "RC_1_2" ] && [ "$TRAVIS_OS_NAME" = "osx" ]; then if [ "$libt_branch" = "RC_1_2" ] && [ "$TRAVIS_OS_NAME" = "osx" ]; then
wget https://builds.shiki.hu/travis/brew/version # building libtorrent manually should be faster than using the official bottle
if ! cmp --quiet "version" "$HOME/travis/brew/version" ; then # because the bottle will also pull in a lot of updated dependencies and prolong the overall time
echo "Cached files are different from server. Downloading new ones." pushd "$HOME"
# First delete old files git clone --single-branch --branch RC_1_2 https://github.com/arvidn/libtorrent.git
rm -r "$HOME/travis/brew" cd libtorrent
mkdir "$HOME/travis/brew" git checkout tags/v1.2.10
cp "version" $HOME/travis/brew
cd "$HOME/travis/brew" cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -Ddeprecated-functions=OFF -DOPENSSL_ROOT_DIR="$openssl_root_path" ./
wget https://builds.shiki.hu/travis/brew/libtorrent-rasterbar.rb make
wget https://builds.shiki.hu/travis/brew/f01f8d840b6eaf05df8df811815128ae6e7227977b1cba4825f0a1fb73a4d9f0--libtorrent-rasterbar-1.2.6.high_sierra.bottle.tar.gz sudo make install
fi popd
# Copy custom libtorrent bottle to homebrew's download 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/travis/brew/f01f8d840b6eaf05df8df811815128ae6e7227977b1cba4825f0a1fb73a4d9f0--libtorrent-rasterbar-1.2.6.high_sierra.bottle.tar.gz" "$(brew --cache)/downloads"
brew uninstall libtorrent-rasterbar
brew install "$HOME/travis/brew/libtorrent-rasterbar.rb"
# NOTE about the bottle name
# The part before the "--" characters is a sha256 hash of the string
# of the URL homebrew itself would use to download the bottle.
# In this case the URL is the following:
# http://127.0.0.1/libtorrent-rasterbar-1.2.6.high_sierra.bottle.tar.gz
fi fi
script: script:
@ -168,7 +156,8 @@ script:
mkdir build && cd build mkdir build && cd build
cmake $cmake_conf ../ cmake $cmake_conf ../
fi fi
- make && make install - make
- make install
after_success: after_success:
- if [ "$gui" = "true" ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi - if [ "$gui" = "true" ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi

Loading…
Cancel
Save