qBittorrent/.travis.yml

92 lines
3.3 KiB
YAML
Raw Normal View History

language: cpp
env:
2015-03-13 10:01:20 +03:00
matrix:
# 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_1_0 gui=true
- lt_branch=RC_1_0 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
# container-based builds
sudo: false
cache:
directories:
- $HOME/.ccache
addons:
coverity_scan:
project:
name: "qbittorrent/qBittorrent"
description: "Build submitted via Travis CI"
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf"
build_command: make
branch_pattern: $coverity_branch
notification_email: sledgehammer999@qbittorrent.org
apt:
packages:
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- autoconf
- automake
- colormake
- libssl-dev
- libboost-dev
- libboost-system-dev
- libqt4-dev
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
#- libtorrent-rasterbar6
2013-07-27 12:30:13 +04:00
before_install:
# 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 10:01:20 +03:00
2013-07-27 12:30:13 +04:00
- shopt -s expand_aliases
- if ! [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then dpkg-query -L ccache && export PATH="/usr/lib/ccache/:$PATH" ; fi
- alias make="colormake -j3" # Using nprocs/2 sometimes may fail (gcc is killed by system)
- libt_path="$HOME/libt_install"
- qbt_path="$HOME/qbt_install"
2015-07-30 23:45:35 +03:00
- ltconf="$ltconf --prefix="$libt_path" --disable-geoip"
- qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":$PKG_CONFIG_PATH"
2013-07-27 12:30:13 +04:00
# Options for specific branches
2013-07-27 12:30:13 +04:00
# Also setup a virtual display for after_success target when gui == true
- 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
2013-07-27 12:30:13 +04:00
# Print settings
- echo $lt_branch
2013-07-27 12:30:13 +04:00
- echo $gui
- echo $ltconf
- echo $qbtconf
- ccache -V && ccache --show-stats && ccache --zero-stats
install:
- if ! [ "$lt_branch" == "dist" ]; then cd "$HOME" && pwd && 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 && make install && cd "$TRAVIS_BUILD_DIR" ; fi
script:
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # Skip usual build when running coverity scan
2015-03-13 10:01:20 +03:00
- ./bootstrap.sh && ./configure $qbtconf
- make install
2015-03-13 10:01:20 +03:00
2013-07-27 12:30:13 +04:00
after_success:
- cd "$qbt_path/bin"
- export LD_PRELOAD="$libt_path/lib/libtorrent-rasterbar.so:$LD_PRELOAD"
- if $gui ; then ./qbittorrent --version ; else ./qbittorrent-nox --version ; fi
2015-03-13 10:01:20 +03:00
after_script:
- ccache --show-stats