@ -33,16 +33,15 @@ notifications:
on_success : change
on_success : change
on_failure : change
on_failure : change
# container-based builds
#sudo: false
cache:
cache:
ccache : true
ccache : true
directories:
directories:
- $HOME/hombebrew_cache
- $HOME/hombebrew_cache
# opt-in Ubuntu Trusty
# opt-in Ubuntu Trusty
sudo : required
dist : trusty
dist : trusty
# container-based builds
sudo : false
addons:
addons:
coverity_scan:
coverity_scan:
@ -62,7 +61,7 @@ addons:
- sourceline : 'ppa:beineri/opt-qt551-trusty'
- sourceline : 'ppa:beineri/opt-qt551-trusty'
- sourceline : 'ppa:adrozdoff/cmake'
- sourceline : 'ppa:adrozdoff/cmake'
packages:
packages:
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- autoconf
- autoconf
- automake
- automake
- cmake
- cmake
@ -74,6 +73,7 @@ addons:
# Qt 5.5.1
# Qt 5.5.1
- qt55base
- qt55base
- qt55tools
- qt55tools
before_install:
before_install:
# only allow specific build for coverity scan, others will stop
# only allow specific build for coverity scan, others will stop
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" = "RC_1_0" -a "$gui" = true -a "$build_system" = "qmake" ]; then exit ; fi
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" = "RC_1_0" -a "$gui" = true -a "$build_system" = "qmake" ]; then exit ; fi
@ -102,54 +102,51 @@ before_install:
- echo $build_system
- echo $build_system
- echo $ltconf
- echo $ltconf
- echo $qbtconf
- echo $qbtconf
install:
install:
- |
#- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# build libtorrent from source
# build libtorrent from source
#if [ "$lt_branch" != "dist" ]; then
#if [ "$lt_branch" != "dist" ]; then
#cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch ;
#cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch
#cd libtorrent && ./autotool.sh && ./configure $ltconf && make install ;
#cd libtorrent && ./autotool.sh && ./configure $ltconf && make install
#fi ;
#fi
#fi
# ccache
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
dpkg-query -L ccache && export use_ccache=true ;
ccache -V && ccache --show-stats && ccache --zero-stats ;
fi ;
fi
- |
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
wget https://builds.shiki.hu/homebrew/version ;
# dependencies
brew update > /dev/null
brew install colormake ccache zlib
PATH="/usr/local/opt/ccache/libexec:$PATH"
brew link --force zlib
brew outdated "pkg-config" || brew upgrade "pkg-config"
wget https://builds.shiki.hu/homebrew/version
if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then
if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then
echo "Cached files are different from server. Downloading new ones." ;
echo "Cached files are different from server. Downloading new ones."
# First delete old files
# First delete old files
rm -r "$HOME/hombebrew_cache" ;
rm -r "$HOME/hombebrew_cache"
mkdir "$HOME/hombebrew_cache";
mkdir "$HOME/hombebrew_cache"
cp "version" $HOME/hombebrew_cache ;
cp "version" $HOME/hombebrew_cache
cd "$HOME/hombebrew_cache" ;
cd "$HOME/hombebrew_cache"
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar.rb ;
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar.rb
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.10.el_capitan.bottle.tar.gz ;
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.10.el_capitan.bottle.tar.gz
wget https://builds.shiki.hu/homebrew/qt5.rb ;
wget https://builds.shiki.hu/homebrew/qt5.rb
wget https://builds.shiki.hu/homebrew/qt5-5.7.1_1.el_capitan.bottle.tar.gz ;
wget https://builds.shiki.hu/homebrew/qt5-5.7.1_1.el_capitan.bottle.tar.gz
fi
fi
# dependencies
brew update > /dev/null ;
brew install colormake ccache ;
if [ "$build_system" = "cmake" ]; then
brew unlink cmake
brew install cmake;
fi
brew outdated "pkg-config" || brew upgrade "pkg-config" ;
# Copy custom libtorrent bottle to homebrew's cache so it can find and install it
# 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
# Also install our custom libtorrent formula by passing the local path to it
# These 2 files are restored from Travis' cache.
# These 2 files are restored from Travis' cache.
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.10.el_capitan.bottle.tar.gz" "$(brew --cache)" ;
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.10.el_capitan.bottle.tar.gz" "$(brew --cache)"
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb" ;
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb"
if [ "$build_system" = "cmake" ]; then
if [ "$build_system" = "cmake" ]; then
brew install qt5 ;
brew unlink cmake
brew link --force qt5 ;
brew install cmake
brew install qt5
brew link --force qt5
ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
ln -s /usr/local/opt/qt/plugins /usr/local/plugins
ln -s /usr/local/opt/qt/plugins /usr/local/plugins
else
else
@ -157,18 +154,17 @@ install:
# Copy custom qt5 bottle to homebrew's cache so it can find and install it
# Copy custom qt5 bottle to homebrew's cache so it can find and install it
# Also install our custom qt5 formula by passing the local path to it
# Also install our custom qt5 formula by passing the local path to it
# These 2 files are restored from Travis' cache.
# These 2 files are restored from Travis' cache.
cp "$HOME/hombebrew_cache/qt5-5.7.1_1.el_capitan.bottle.tar.gz" "$(brew --cache)" ;
cp "$HOME/hombebrew_cache/qt5-5.7.1_1.el_capitan.bottle.tar.gz" "$(brew --cache)"
brew install "$HOME/hombebrew_cache/qt5.rb" ;
brew install "$HOME/hombebrew_cache/qt5.rb"
brew link --force qt5 ;
brew link --force qt5
fi
fi
MY_CMAKE_OPENSSL_HINT="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/"
MY_CMAKE_OPENSSL_HINT="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/"
fi
# ccache
- |
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH" && export use_ccache=true ;
export use_ccache=true
ccache -V && ccache --show-stats && ccache --zero-stats ;
ccache -V && ccache --show-stats && ccache --zero-stats
fi ;
fi
fi
script:
script:
@ -184,9 +180,9 @@ script:
if [ "$build_system" = "qmake" ]; then
if [ "$build_system" = "qmake" ]; then
./bootstrap.sh && ./configure $qbtconf
./bootstrap.sh && ./configure $qbtconf
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
sed -i "" -e "s/^\(CC.*&&\).*$/\1 $CC/" src/Makefile ; # workaround for Qt & ccache: https://bugreports.qt.io/browse/QTBUG-31034
sed -i "" -e "s/^\(CC.*&&\).*$/\1 $CC/" src/Makefile # workaround for Qt & ccache: https://bugreports.qt.io/browse/QTBUG-31034
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile ;
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile ;
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile
fi
fi
fi
fi
- make && make install
- make && make install
@ -196,8 +192,8 @@ after_success:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd "$qbt_path/bin" ; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd "$qbt_path/bin" ; fi
- |
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
macdeployqt "$TRAVIS_BUILD_DIR/src/$qbt_exe.app" ;
macdeployqt "$TRAVIS_BUILD_DIR/src/$qbt_exe.app"
cd "$TRAVIS_BUILD_DIR/src/$qbt_exe.app/Contents/MacOS" ;
cd "$TRAVIS_BUILD_DIR/src/$qbt_exe.app/Contents/MacOS"
fi
fi
- ./$qbt_exe --version
- ./$qbt_exe --version