|
1 | | -notifications: |
2 | | - email: |
3 | | - on_success: change |
4 | | - on_failure: change |
5 | | - |
6 | 1 | language: |
7 | | -# linux |
8 | | -- cpp |
9 | | - |
10 | | -# osx |
11 | | -# - objective-c |
| 2 | + - cpp |
12 | 3 |
|
13 | 4 | env: |
14 | | -# linux |
15 | | -# libtorrent 0.15.10 |
16 | | -- lt=APT debug=false gui=true |
17 | | -- lt=APT debug=false gui=false |
18 | | -# libtorrent 0.16.x |
19 | | -- lt=repo debug=false gui=true |
20 | | -- lt=repo debug=false gui=false |
| 5 | + # use libtorrent 0.15.10 |
| 6 | + - lt_source=from_dist gui=true |
| 7 | + - lt_source=from_dist gui=false |
| 8 | + # use libtorrent 0.16.X from RC_0_16 svn branch |
| 9 | + - lt_source=from_svn gui=true |
| 10 | + - lt_source=from_svn gui=false |
| 11 | + |
| 12 | +branches: |
| 13 | + except: |
| 14 | + - search_encoding_windows |
| 15 | + - v2_9_x |
| 16 | + |
| 17 | +notifications: |
| 18 | + email: |
| 19 | + on_success: change |
| 20 | + on_failure: change |
| 21 | + |
| 22 | +before_install: |
| 23 | + - shopt -s expand_aliases |
| 24 | + - alias sudo="sudo " |
| 25 | + # Using nprocs/2 sometimes may fail (gcc is killed by system), just use two threads |
| 26 | + - alias make="colormake -j2 " |
| 27 | + |
| 28 | + # Also setup a virtual display for after_success target when gui == true |
| 29 | + - 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 |
| 30 | + - ltconf=" --with-libgeoip=system" |
| 31 | + |
| 32 | + - echo settings |
| 33 | + - echo $lt_source |
| 34 | + - echo $ltconf |
| 35 | + - echo $gui |
| 36 | + - echo $qbtconf |
| 37 | + |
| 38 | + - sudo apt-get -qq update |
| 39 | + # Travis can stall during heavy load if these packages are installed in one step - split the command |
| 40 | + - sudo apt-get -qq install debhelper qconf colormake libssl-dev libgeoip-dev |
| 41 | + - sudo apt-get -qq install libboost-dev libboost-filesystem-dev libboost-system-dev |
| 42 | + - sudo apt-get -qq install libqt4-dev |
21 | 43 |
|
22 | 44 | install: |
23 | | -# linux, osx |
24 | | -#- (cd src/geoip && wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz && gzip -d GeoIP.dat.gz) |
25 | | - |
26 | | -# linux |
27 | | -- shopt -s expand_aliases |
28 | | -- alias sudo="sudo " |
29 | | -- alias make=colormake |
30 | | -- export MAKEFLAGS="-j $((`nproc` / 2))" |
31 | | - |
32 | | -- if $debug; then qtc="--enable-debug"; ltc="--enable-debug"; fi |
33 | | -- if ! $gui; then qtc="$qtc --disable-gui"; fi |
34 | | -- ltc="$ltc --with-libgeoip" |
35 | | - |
36 | | -- echo settings |
37 | | -- echo $lt |
38 | | -- echo $debug |
39 | | -- echo $gui |
40 | | -- echo $qtc |
41 | | -- echo $ltc |
42 | | - |
43 | | -- sudo apt-get -qq update |
44 | | -- sudo apt-get -qq install debhelper libboost-dev libboost-filesystem-dev libboost-system-dev libqt4-dev qconf colormake libgeoip-dev |
45 | | -- if [[ "$lt" == "APT" ]]; then sudo apt-get -qq install libtorrent-rasterbar-dev; fi |
46 | | -- if [[ "$lt" == "repo" ]]; then sudo apt-get -qq build-dep libtorrent-rasterbar-dev && svn checkout svn://svn.code.sf.net/p/libtorrent/code/branches/RC_0_16 && (cd RC_0_16 && ./autotool.sh && ./configure $ltc && sudo make install); fi |
47 | | - |
48 | | -# osx |
49 | | -# - export MAKEFLAGS="-j 4" |
50 | | -# - brew update |
51 | | -# - brew install libtorrent-rasterbar qt boost |
| 45 | + - if [[ "$lt_source" == "from_dist" ]]; then sudo apt-get -qq install libtorrent-rasterbar-dev; fi |
| 46 | + - if [[ "$lt_source" == "from_svn" ]]; then cd .. && svn co svn://svn.code.sf.net/p/libtorrent/code/branches/RC_0_16 ./libtorrent && (cd libtorrent && ./autotool.sh && ./configure $ltconf && sudo make install) && sudo ldconfig /usr/local/lib && cd $TRAVIS_BUILD_DIR ; fi |
52 | 47 |
|
53 | 48 | script: |
54 | | -# linux, osx |
55 | | -- mkdir -p build && cd build && mkdir -p install |
56 | | - |
57 | | -# linux |
58 | | -- (cd .. && qt-qconf) |
59 | | -- ../configure $qtc && sudo make install |
60 | | - |
61 | | -# osx |
62 | | -# - qmake ../qbittorrent.pro && make |
| 49 | + - qt-qconf |
| 50 | + - ./configure $qbtconf && sudo make install |
| 51 | + |
| 52 | +after_success: |
| 53 | + - if $gui ; then qbittorrent --version ; else qbittorrent-nox --version ; fi |
0 commit comments