2013-07-02 11:55:58 +08:00
language :
2013-07-27 16:30:13 +08:00
- cpp
2013-07-02 11:55:58 +08:00
env :
2015-03-13 15:01:20 +08:00
matrix :
2015-06-28 14:16:32 +08:00
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
#- lt_branch=dist gui=true
#- lt_branch=dist gui=false
- lt_branch=RC_0_16 gui=true
- lt_branch=RC_0_16 gui=false
- lt_branch=RC_1_0 gui=true
- lt_branch=RC_1_0 gui=false
2015-03-13 15:01:20 +08:00
global :
2015-06-17 05:19:00 +08:00
- secure : "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
2015-03-13 15:01:20 +08:00
- coverity_branch : coverity_scan
2013-07-27 16:30:13 +08:00
branches :
except :
- search_encoding_windows
- v2_9_x
notifications :
email :
on_success : change
2015-03-13 15:01:20 +08:00
on_failure : change
2013-07-27 16:30:13 +08:00
before_install :
2015-06-28 14:16:32 +08:00
# Only allow specific build for coverity scan, others will stop
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [[ "$lt_branch" == "RC_1_0" && "$gui" == "true" ]]; then exit ; fi
2015-03-13 15:01:20 +08:00
2013-07-27 16:30:13 +08:00
- shopt -s expand_aliases
- alias sudo="sudo "
# Using nprocs/2 sometimes may fail (gcc is killed by system), just use two threads
- alias make="colormake -j2 "
# Also setup a virtual display for after_success target when gui == true
2015-06-28 14:16:32 +08:00
- if ! $gui; then qbtconf="$qbtconf --disable-gui" ; else 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
2015-04-06 00:53:17 +08:00
- qbtconf="$qbtconf --with-qt4"
2013-07-27 16:30:13 +08:00
- ltconf=" --with-libgeoip=system"
2015-06-28 14:16:32 +08:00
# Options for specific branches
- if [[ "$lt_branch" == "RC_0_16" ]]; then qbtconf="$qbtconf --with-libtorrent-rasterbar0.16" ; fi
# Print settings
- echo $lt_branch
2013-07-27 16:30:13 +08:00
- echo $gui
- echo $qbtconf
2015-06-28 14:16:32 +08:00
- echo $ltconf
2013-07-27 16:30:13 +08:00
- sudo apt-get -qq update
2015-06-28 14:16:32 +08:00
# Travis may stall during heavy load if these packages are installed in one step - split the command
2014-04-20 05:00:23 +08:00
- sudo apt-get -qq install debhelper autoconf automake colormake libssl-dev libgeoip-dev
2015-06-28 14:16:32 +08:00
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
2013-10-24 03:16:23 +08:00
#- sudo apt-get -qq install libboost-dev libboost-filesystem-dev libboost-system-dev
- sudo apt-get -qq install libboost-dev libboost-system-dev
2015-03-13 15:01:20 +08:00
- sudo apt-get -qq install libqt4-dev
2013-07-02 11:55:58 +08:00
install :
2015-06-28 14:16:32 +08:00
- if ! [ "$lt_branch" == "dist" ]; then cd .. && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch --single-branch ; fi
- if ! [ "$lt_branch" == "dist" ]; then cd libtorrent && ./autotool.sh && ./configure $ltconf && sudo make install && sudo ldconfig /usr/local/lib && cd $TRAVIS_BUILD_DIR ; fi
2013-07-02 11:55:58 +08:00
script :
2015-06-28 14:16:32 +08:00
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # Skip usual build when running coverity scan
2015-03-13 15:01:20 +08:00
- ./bootstrap.sh && ./configure $qbtconf
- sudo make install
2013-07-27 16:30:13 +08:00
after_success :
- if $gui ; then qbittorrent --version ; else qbittorrent-nox --version ; fi
2015-03-13 15:01:20 +08:00
addons :
coverity_scan :
project :
2015-06-17 05:19:00 +08:00
name : "qbittorrent/qBittorrent"
2015-03-13 15:01:20 +08:00
description : "Build submitted via Travis CI"
2015-06-28 14:16:32 +08:00
build_command_prepend : "./bootstrap.sh && ./configure $qbtconf"
2015-03-13 15:01:20 +08:00
build_command : make
branch_pattern : $coverity_branch
2015-06-17 05:19:00 +08:00
notification_email : sledgehammer999@qbittorrent.org