Skip to content

Commit 184ac3e

Browse files
committed
Update .travis.yml
Add build job with libtorrent RC_1_2 branch.
1 parent 78ab0e4 commit 184ac3e

1 file changed

Lines changed: 60 additions & 57 deletions

File tree

.travis.yml

Lines changed: 60 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@ dist: xenial
88

99
env:
1010
matrix:
11-
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
12-
#- lt_branch=dist gui=true
13-
#- lt_branch=dist gui=false
14-
- lt_branch=RC_1_0 gui=true build_system=cmake
15-
- lt_branch=RC_1_0 gui=false build_system=cmake
16-
- lt_branch=RC_1_0 gui=true build_system=qmake
17-
- lt_branch=RC_1_0 gui=false build_system=qmake
11+
- libt_branch=RC_1_1 gui=true build_system=qmake
12+
- libt_branch=RC_1_1 gui=false build_system=qmake
13+
- libt_branch=RC_1_1 gui=true build_system=cmake
14+
- libt_branch=RC_1_1 gui=false build_system=cmake
15+
- libt_branch=RC_1_2 gui=true build_system=qmake
1816
global:
1917
- secure: "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
2018
- coverity_branch: coverity_scan
2119

2220
matrix:
2321
allow_failures:
24-
- env: lt_branch=RC_1_0 gui=true build_system=cmake
25-
- env: lt_branch=RC_1_0 gui=false build_system=cmake
22+
- env: libt_branch=RC_1_1 gui=true build_system=cmake
23+
- env: libt_branch=RC_1_1 gui=false build_system=cmake
24+
- env: libt_branch=RC_1_2 gui=true build_system=qmake
2625

2726
branches:
2827
except:
@@ -44,7 +43,7 @@ addons:
4443
project:
4544
name: "qbittorrent/qBittorrent"
4645
description: "Build submitted via Travis CI"
47-
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf"
46+
build_command_prepend: "./bootstrap.sh && ./configure $qmake_conf"
4847
build_command: make
4948
branch_pattern: $coverity_branch
5049
notification_email: sledgehammer999@qbittorrent.org
@@ -55,69 +54,71 @@ addons:
5554
packages:
5655
# packages list: https://github.com/travis-ci/apt-package-safelist/blob/master/ubuntu-trusty
5756
- [autoconf, automake, colormake]
58-
- [ninja-build]
59-
- libssl-dev
6057
- [libboost-dev, libboost-system-dev]
58+
- libssl-dev
6159
- libtorrent-rasterbar-dev
6260
- [qtbase5-dev, qttools5-dev-tools, libqt5svg5-dev]
61+
- zlib1g-dev
62+
homebrew:
63+
update: true
64+
packages:
65+
- [ccache, colormake]
66+
- boost
67+
- libtorrent-rasterbar
68+
- openssl
69+
- qt
70+
- zlib
6371

6472
before_install:
6573
# only allow specific build for coverity scan, others will stop
66-
- 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
74+
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$libt_branch" = "RC_1_1" -a "$gui" = "true" -a "$build_system" = "qmake" ]; then exit ; fi
6775

6876
- shopt -s expand_aliases
6977
- alias make="colormake -j2" # Using nprocs/2 sometimes may fail (gcc is killed by system)
7078
- qbt_path="$HOME/qbt_install"
71-
- |
72-
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
73-
qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH=/opt/qt55/lib/pkgconfig:$PKG_CONFIG_PATH"
74-
else
75-
qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH"
76-
CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedefs -Wno-inconsistent-missing-override"
77-
fi
79+
- qmake_conf="$qmake_conf --prefix=$qbt_path"
80+
- cmake_conf="$cmake_conf -DCMAKE_INSTALL_PREFIX=$qbt_path"
7881

7982
# options for specific branches
80-
- if [ "$gui" = false ]; then qbtconf="$qbtconf --disable-gui" ; fi
8183
- |
8284
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
8385
# setup virtual display for after_success target
84-
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 ;
86+
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 ;
87+
fi
88+
- |
89+
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
90+
CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedefs -Wno-inconsistent-missing-override"
91+
92+
openssl_root_path="/usr/local/opt/openssl"
93+
qmake_conf="$qmake_conf PKG_CONFIG_PATH=$openssl_root_path/lib/pkgconfig:$PKG_CONFIG_PATH"
94+
cmake_conf="$cmake_conf -DOPENSSL_ROOT_DIR=$openssl_root_path"
95+
fi
96+
- |
97+
if [ "$gui" = "false" ]; then
98+
qmake_conf="$qmake_conf --disable-gui"
99+
cmake_conf="$cmake_conf -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=ON"
85100
fi
86101
87102
# print settings
88-
- echo $lt_branch
103+
- echo $libt_branch
89104
- echo $gui
90105
- echo $build_system
91-
- echo $ltconf
92-
- echo $qbtconf
106+
- echo $qmake_conf
107+
- echo $cmake_conf
93108

94109
install:
95-
#- |
96-
#if [ "$TRAVIS_OS_NAME" = "linux" ]; then
97-
# build libtorrent from source
98-
#if [ "$lt_branch" != "dist" ]; then
99-
#cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch
100-
#cd libtorrent && ./autotool.sh && ./configure $ltconf && make install
101-
#fi
102-
#fi
103110
- |
104111
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
105112
# dependencies
106-
brew update > /dev/null
107-
brew outdated "pkg-config" || brew upgrade "pkg-config"
108-
brew install colormake ccache zlib qt openssl libtorrent-rasterbar
109-
110113
PATH="/usr/local/opt/ccache/libexec:$PATH"
111-
brew link --force zlib qt
112114
113-
if [ "$build_system" = "cmake" ]; then
114-
brew outdated cmake || brew upgrade cmake
115-
brew install ninja
115+
brew outdated cmake || brew upgrade cmake
116+
brew outdated pkg-config || brew upgrade pkg-config
117+
brew link --force qt zlib
116118
119+
if [ "$build_system" = "cmake" ]; then
117120
sudo ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
118121
sudo ln -s /usr/local/opt/qt/plugins /usr/local/plugins
119-
120-
MY_CMAKE_OPENSSL_HINT="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/"
121122
fi
122123
fi
123124
- |
@@ -126,29 +127,31 @@ install:
126127
ccache -M 512M
127128
ccache -V && ccache --show-stats && ccache --zero-stats
128129
fi
130+
- |
131+
# build libtorrent from source
132+
if [ "$libt_branch" = "RC_1_2" ]; then
133+
cd "$HOME"
134+
git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $libt_branch
135+
cd libtorrent && mkdir _build && cd _build
136+
CXXFLAGS="$CXXFLAGS -std=c++14" cmake -Ddeprecated-functions=OFF -DOPENSSL_ROOT_DIR="$openssl_root_path" ../
137+
make && sudo make install
138+
fi
129139
130140
script:
131141
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # skip usual build when running coverity scan
132142
- |
133143
cd "$TRAVIS_BUILD_DIR"
134-
if [ "$build_system" = "cmake" ]; then
135-
mkdir build
136-
cd build
137-
if [ "$gui" = "false" ]; then
138-
DISABLE_GUI_OPTION="-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=ON"
139-
fi
140-
cmake $DISABLE_GUI_OPTION -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
141-
-G "Ninja" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ..
142-
BUILD_TOOL="ninja"
143-
fi
144144
if [ "$build_system" = "qmake" ]; then
145-
./bootstrap.sh && ./configure $qbtconf CXXFLAGS="$CXXFLAGS"
146-
BUILD_TOOL="make"
145+
./bootstrap.sh
146+
./configure $qmake_conf CXXFLAGS="$CXXFLAGS"
147+
else
148+
mkdir build && cd build
149+
cmake $cmake_conf ../
147150
fi
148-
- $BUILD_TOOL && $BUILD_TOOL install
151+
- make && make install
149152

150153
after_success:
151-
- if [ "$gui" = true ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
154+
- if [ "$gui" = "true" ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
152155
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd "$qbt_path/bin" ; fi
153156
- |
154157
if [ "$TRAVIS_OS_NAME" = "osx" ]; then

0 commit comments

Comments
 (0)