TravisCI: Install latest zlib and switch to container-based infrastructure.

This commit is contained in:
sledgehammer999 2017-05-30 23:07:39 +03:00
commit 8ffc72b626
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -34,16 +34,15 @@ notifications:
on_success: change on_success: change
on_failure: change on_failure: change
# container-based builds
#sudo: false
cache: cache:
ccache: true ccache: true
directories: directories:
- $HOME/hombebrew_cache - $HOME/hombebrew_cache
# opt-in Ubuntu Trusty # opt-in Ubuntu Trusty
sudo: required
dist: trusty dist: trusty
# container-based builds
sudo: false
addons: addons:
coverity_scan: coverity_scan:
@ -55,10 +54,12 @@ addons:
branch_pattern: $coverity_branch branch_pattern: $coverity_branch
notification_email: sledgehammer999@qbittorrent.org notification_email: sledgehammer999@qbittorrent.org
apt: apt:
#sources: sources:
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json # sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
#- ubuntu-toolchain-r-test #- ubuntu-toolchain-r-test
#- boost-latest #- boost-latest
- sourceline: 'ppa:qbittorrent-team/qbittorrent-stable'
- sourceline: 'ppa:beineri/opt-qt551-trusty'
packages: packages:
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise # packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- autoconf - autoconf
@ -67,8 +68,13 @@ addons:
- libssl-dev - libssl-dev
- libboost-dev - libboost-dev
- libboost-system-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 - libtorrent-rasterbar-dev
#- libtorrent-rasterbar6 # Qt 5.5.1
- qt55base
- qt55tools
# Qt 4.8
- qt4-default
- libqt4-dev
before_install: before_install:
# only allow specific build for coverity scan, others will stop # only allow specific build for coverity scan, others will stop
@ -79,7 +85,7 @@ before_install:
#- libt_path="$HOME/libt_install" #- libt_path="$HOME/libt_install"
#- ltconf="$ltconf --prefix="$libt_path" --disable-geoip" #- ltconf="$ltconf --prefix="$libt_path" --disable-geoip"
- qbt_path="$HOME/qbt_install" - qbt_path="$HOME/qbt_install"
- qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":$PKG_CONFIG_PATH" - qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":/opt/qt55/lib/pkgconfig:$PKG_CONFIG_PATH"
# options for specific branches # options for specific branches
- if [ "$qt" = 4 ]; then qbtconf="$qbtconf --with-qt4" ; fi - if [ "$qt" = 4 ]; then qbtconf="$qbtconf --with-qt4" ; fi
@ -88,6 +94,9 @@ before_install:
if [ "$TRAVIS_OS_NAME" = "linux" ]; then if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# setup virtual display for after_success target # 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 ; 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 ;
# Qt 5
PATH=/opt/qt55/bin:${PATH}
fi fi
# print settings # print settings
@ -97,31 +106,23 @@ before_install:
- echo $qbtconf - echo $qbtconf
install: install:
- | #- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then #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 # build libtorrent from source
#if [ "$lt_branch" != "dist" ]; then #if [ "$lt_branch" != "dist" ]; then
#cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch ; #cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch ;
#cd libtorrent && ./autotool.sh && ./configure $ltconf && make install ; #cd libtorrent && ./autotool.sh && ./configure $ltconf && make install ;
#fi ; #fi ;
#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 ;
# ccache
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
dpkg-query -L ccache && export use_ccache=true ;
ccache -V && ccache --show-stats && ccache --zero-stats ;
fi ;
fi
- | - |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then if [ "$TRAVIS_OS_NAME" = "osx" ]; then
# dependencies
brew update > /dev/null
brew install colormake ccache zlib
PATH="/usr/local/opt/ccache/libexec:$PATH"
brew link --force zlib
brew outdated "pkg-config" || brew upgrade "pkg-config"
wget https://builds.shiki.hu/homebrew/version ; wget https://builds.shiki.hu/homebrew/version ;
if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then
echo "Cached files are different from server. Downloading new ones." ; echo "Cached files are different from server. Downloading new ones." ;
@ -136,10 +137,6 @@ install:
wget https://builds.shiki.hu/homebrew/qt5-5.7.1_1.el_capitan.bottle.tar.gz ; wget https://builds.shiki.hu/homebrew/qt5-5.7.1_1.el_capitan.bottle.tar.gz ;
fi fi
# dependencies
brew update > /dev/null ;
brew install colormake ccache ;
brew outdated "pkg-config" || brew upgrade "pkg-config" ;
# Copy custom libtorrent bottle to homebrew's cache so it can find and install it # Copy custom libtorrent bottle to homebrew's cache so it can find and install it
# Also install our custom libtorrent formula by passing the local path to it # Also install our custom libtorrent formula by passing the local path to it
# These 2 files are restored from Travis' cache. # These 2 files are restored from Travis' cache.
@ -156,12 +153,11 @@ install:
brew install "$HOME/hombebrew_cache/qt5.rb" ; brew install "$HOME/hombebrew_cache/qt5.rb" ;
brew link --force qt5 ; brew link --force qt5 ;
fi fi
fi
# ccache - |
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH" && export use_ccache=true ; export use_ccache=true
ccache -V && ccache --show-stats && ccache --zero-stats ; ccache -V && ccache --show-stats && ccache --zero-stats
fi ;
fi fi
script: script: