2015-07-29 07:23:12 +03:00
|
|
|
language: cpp
|
2013-07-02 07:55:58 +04:00
|
|
|
|
2015-09-01 09:48:10 +03:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
osx_image: xcode7
|
|
|
|
|
2013-07-02 07:55:58 +04:00
|
|
|
env:
|
2015-03-13 10:01:20 +03:00
|
|
|
matrix:
|
2015-06-28 09:16:32 +03:00
|
|
|
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
|
2015-12-07 05:14:39 +03:00
|
|
|
#- lt_branch=dist gui=true
|
|
|
|
#- lt_branch=dist gui=false
|
|
|
|
- lt_branch=RC_1_0 qt=5 gui=true
|
|
|
|
- lt_branch=RC_1_0 qt=5 gui=false
|
|
|
|
- lt_branch=RC_1_0 qt=4 gui=true
|
|
|
|
- lt_branch=RC_1_0 qt=4 gui=false
|
2015-03-13 10:01:20 +03:00
|
|
|
global:
|
2015-06-17 00:19:00 +03:00
|
|
|
- secure: "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
|
2015-03-13 10:01:20 +03:00
|
|
|
- coverity_branch: coverity_scan
|
2013-07-27 12:30:13 +04:00
|
|
|
|
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- search_encoding_windows
|
|
|
|
- v2_9_x
|
|
|
|
|
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: change
|
2015-03-13 10:01:20 +03:00
|
|
|
on_failure: change
|
2013-07-27 12:30:13 +04:00
|
|
|
|
2015-07-29 07:23:12 +03:00
|
|
|
# container-based builds
|
2016-03-17 09:14:57 +03:00
|
|
|
#sudo: false
|
2016-05-03 21:14:31 +03:00
|
|
|
cache: ccache
|
2016-03-17 09:14:57 +03:00
|
|
|
|
|
|
|
# opt-in Ubuntu Trusty
|
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
2015-07-29 07:23:12 +03:00
|
|
|
|
|
|
|
addons:
|
|
|
|
coverity_scan:
|
|
|
|
project:
|
|
|
|
name: "qbittorrent/qBittorrent"
|
|
|
|
description: "Build submitted via Travis CI"
|
2016-03-17 09:14:57 +03:00
|
|
|
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf"
|
2015-07-29 07:23:12 +03:00
|
|
|
build_command: make
|
|
|
|
branch_pattern: $coverity_branch
|
|
|
|
notification_email: sledgehammer999@qbittorrent.org
|
|
|
|
apt:
|
2016-03-17 09:14:57 +03:00
|
|
|
#sources:
|
2015-09-20 15:45:40 +03:00
|
|
|
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
2016-03-17 09:14:57 +03:00
|
|
|
#- ubuntu-toolchain-r-test
|
|
|
|
#- boost-latest
|
2015-07-29 07:23:12 +03:00
|
|
|
packages:
|
|
|
|
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
|
|
|
|
- autoconf
|
|
|
|
- automake
|
|
|
|
- colormake
|
|
|
|
- libssl-dev
|
2016-03-17 09:14:57 +03:00
|
|
|
- libboost-dev
|
|
|
|
- libboost-system-dev
|
|
|
|
# uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
|
2015-07-29 07:23:12 +03:00
|
|
|
#- libtorrent-rasterbar6
|
|
|
|
|
2013-07-27 12:30:13 +04:00
|
|
|
before_install:
|
2016-03-17 09:14:57 +03:00
|
|
|
# only allow specific build for coverity scan, others will stop
|
2015-09-01 09:48:10 +03:00
|
|
|
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" = "RC_1_0" -a "$gui" = true ]; then exit ; fi
|
2015-03-13 10:01:20 +03:00
|
|
|
|
2013-07-27 12:30:13 +04:00
|
|
|
- shopt -s expand_aliases
|
2015-07-29 07:23:12 +03:00
|
|
|
- alias make="colormake -j3" # Using nprocs/2 sometimes may fail (gcc is killed by system)
|
2016-03-17 09:14:57 +03:00
|
|
|
#- libt_path="$HOME/libt_install"
|
|
|
|
#- ltconf="$ltconf --prefix="$libt_path" --disable-geoip"
|
2015-07-29 07:23:12 +03:00
|
|
|
- qbt_path="$HOME/qbt_install"
|
2016-03-17 09:14:57 +03:00
|
|
|
- qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":$PKG_CONFIG_PATH"
|
|
|
|
|
|
|
|
# options for specific branches
|
|
|
|
- if [ "$qt" = 4 ]; then qbtconf="$qbtconf --with-qt4" ; fi
|
|
|
|
- if [ "$gui" = false ]; then qbtconf="$qbtconf --disable-gui" ; fi
|
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
|
|
|
# setup virtual display for after_success target
|
|
|
|
if [ "$gui" = true ]; then export "DISPLAY=:99.0" && /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 ; fi ;
|
|
|
|
fi
|
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
|
|
qbtconf="$qbtconf --disable-qt-dbus" ;
|
2015-09-01 09:48:10 +03:00
|
|
|
fi
|
2013-07-27 12:30:13 +04:00
|
|
|
|
2016-03-17 09:14:57 +03:00
|
|
|
# print settings
|
2015-06-28 09:16:32 +03:00
|
|
|
- echo $lt_branch
|
2013-07-27 12:30:13 +04:00
|
|
|
- echo $gui
|
2015-06-28 09:16:32 +03:00
|
|
|
- echo $ltconf
|
2015-07-29 07:23:12 +03:00
|
|
|
- echo $qbtconf
|
2013-07-02 07:55:58 +04:00
|
|
|
|
|
|
|
install:
|
2016-03-17 09:14:57 +03:00
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
|
|
|
# libtorrent
|
|
|
|
sudo add-apt-repository --yes ppa:qbittorrent-team/qbittorrent-stable ;
|
|
|
|
sudo apt-get update -qq ;
|
|
|
|
sudo apt-get install -qq libtorrent-rasterbar-dev ;
|
|
|
|
|
|
|
|
# build libtorrent from source
|
|
|
|
#if [ "$lt_branch" != "dist" ]; then
|
|
|
|
#cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch ;
|
|
|
|
#cd libtorrent && ./autotool.sh && ./configure $ltconf && make install ;
|
|
|
|
#fi ;
|
|
|
|
|
|
|
|
# Qt
|
|
|
|
if [ "$qt" = 4 ]; then sudo apt-get -qq install qt4-default libqt4-dev ; fi ;
|
|
|
|
if [ "$qt" = 5 ]; then sudo apt-get -qq install qt5-default qtbase5-dev qttools5-dev-tools ; fi ;
|
2016-05-03 21:14:31 +03:00
|
|
|
|
|
|
|
# ccache
|
|
|
|
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
|
|
|
|
dpkg-query -L ccache && export use_ccache=true ;
|
|
|
|
ccache -V && ccache --show-stats && ccache --zero-stats ;
|
|
|
|
fi ;
|
2016-03-17 09:14:57 +03:00
|
|
|
fi
|
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
|
|
# dependencies
|
2016-07-01 15:46:24 +03:00
|
|
|
brew update > /dev/null ;
|
|
|
|
brew install colormake ccache ;
|
2016-07-21 09:04:24 +03:00
|
|
|
brew outdated "pkg-config" || brew upgrade "pkg-config" ;
|
2016-09-12 02:29:40 +03:00
|
|
|
brew outdated "zlib" || brew upgrade "zlib" ;
|
2016-07-01 15:46:24 +03:00
|
|
|
# libtorrent-rasterbar 1.0.9
|
|
|
|
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/477d5060fa093883204d70323965375353e03084/Formula/libtorrent-rasterbar.rb ;
|
2016-03-17 09:14:57 +03:00
|
|
|
|
|
|
|
# Qt
|
2015-11-02 03:23:02 +03:00
|
|
|
if [ "$qt" = 4 ]; then brew install qt && ln -s /usr/local/Cellar/qt/4.8.7_2/plugins /usr/local ; fi ;
|
|
|
|
if [ "$qt" = 5 ]; then brew install qt5 && brew link --force qt5 && ln -s /usr/local/Cellar/qt5/5.6.0/plugins /usr/local ; fi ;
|
2016-05-03 21:14:31 +03:00
|
|
|
|
|
|
|
# ccache
|
|
|
|
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
|
|
|
|
export PATH="/usr/local/opt/ccache/libexec:$PATH" && export use_ccache=true ;
|
|
|
|
ccache -V && ccache --show-stats && ccache --zero-stats ;
|
|
|
|
fi ;
|
2016-03-17 09:14:57 +03:00
|
|
|
fi
|
2013-07-02 07:55:58 +04:00
|
|
|
|
|
|
|
script:
|
2016-03-17 09:14:57 +03:00
|
|
|
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # skip usual build when running coverity scan
|
|
|
|
- cd "$TRAVIS_BUILD_DIR" && ./bootstrap.sh && ./configure $qbtconf
|
2016-05-03 21:14:31 +03:00
|
|
|
- |
|
|
|
|
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/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile ;
|
|
|
|
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile ;
|
|
|
|
fi
|
2015-09-01 09:48:10 +03:00
|
|
|
- make && make install
|
2015-03-13 10:01:20 +03:00
|
|
|
|
2013-07-27 12:30:13 +04:00
|
|
|
after_success:
|
2015-09-01 09:48:10 +03:00
|
|
|
- if [ "$gui" = true ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
|
2016-03-17 09:14:57 +03:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd "$qbt_path/bin" ; fi
|
2015-11-02 03:23:02 +03:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cd "$TRAVIS_BUILD_DIR/src/" && macdeployqt "$qbt_exe.app" && cd "$qbt_exe.app/Contents/MacOS" ; fi
|
2015-09-01 09:48:10 +03:00
|
|
|
- ./$qbt_exe --version
|
2015-03-13 10:01:20 +03:00
|
|
|
|
2015-07-29 07:23:12 +03:00
|
|
|
after_script:
|
2016-03-17 09:14:57 +03:00
|
|
|
- if [ "$use_ccache" = true ]; then ccache --show-stats ; fi
|