1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(travis): make travis build exit as soon as test fails

Also add `pkg-config` to travis build script for Linux.
This commit is contained in:
Zetok Zalbavar 2016-07-03 11:41:21 +01:00
parent 4eed2549aa
commit 4872eb3cc3
No known key found for this signature in database
GPG Key ID: C953D3880212068A
3 changed files with 74 additions and 24 deletions

View File

@ -5,13 +5,8 @@ os:
- linux
- osx
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash ./verify-commit-messages.sh "$TRAVIS_COMMIT_RANGE"; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash ./.travis/build-ubuntu_14_04.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -i ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -b ; fi
before_deploy:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -d ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -dmg ; fi
- bash ./.travis/travis.sh
deploy:
provider: releases
api_key:

View File

@ -21,29 +21,31 @@ sudo add-apt-repository -y ppa:beineri/opt-qt532-trusty
sudo apt-get update -qq
# install needed Qt, OpenAL, opus, qrencode, GTK tray deps, sqlcipher
sudo apt-get install -y build-essential \
sudo apt-get install -y \
automake \
autotools-dev \
build-essential \
check \
checkinstall \
libgdk-pixbuf2.0-dev \
libglib2.0-dev \
libgtk2.0-dev \
libopenal-dev \
libopus-dev \
libqrencode-dev \
libsqlcipher-dev \
libtool \
libvpx-dev \
libxss-dev qrencode \
qt53base \
qt53script \
qt53svg \
qt53tools \
qt53xmlpatterns \
libopenal-dev \
libxss-dev qrencode \
libqrencode-dev \
libglib2.0-dev \
libgdk-pixbuf2.0-dev \
libgtk2.0-dev \
libsqlcipher-dev \
libtool \
autotools-dev \
automake \
checkinstall \
check \
libopus-dev \
libvpx-dev
pkg-config || yes
# Qt
source /opt/qt53/bin/qt53-env.sh
source /opt/qt53/bin/qt53-env.sh || yes
# ffmpeg
if [ ! -e "libs" ]; then mkdir libs; fi
@ -56,7 +58,40 @@ cd ../ffmpeg
wget http://ffmpeg.org/releases/ffmpeg-2.8.5.tar.bz2
tar xf ffmpeg*
cd ffmpeg*
./configure --prefix="$PREFIX_DIR" --enable-shared --disable-static --disable-programs --disable-protocols --disable-doc --disable-sdl --disable-avfilter --disable-avresample --disable-filters --disable-iconv --disable-network --disable-muxers --disable-postproc --disable-swresample --disable-swscale-alpha --disable-dct --disable-dwt --disable-lsp --disable-lzo --disable-mdct --disable-rdft --disable-fft --disable-faan --disable-vaapi --disable-vdpau --disable-zlib --disable-xlib --disable-bzlib --disable-lzma --disable-encoders --disable-yasm --enable-memalign-hack
./configure --prefix="$PREFIX_DIR" \
--disable-avfilter \
--disable-avresample \
--disable-bzlib \
--disable-dct \
--disable-doc \
--disable-dwt \
--disable-encoders \
--disable-faan \
--disable-fft \
--disable-filters \
--disable-iconv \
--disable-lsp \
--disable-lzma \
--disable-lzo \
--disable-mdct \
--disable-muxers \
--disable-network \
--disable-postproc \
--disable-programs \
--disable-protocols \
--disable-rdft \
--disable-sdl \
--disable-static \
--disable-swresample \
--disable-swscale-alpha \
--disable-vaapi \
--disable-vdpau \
--disable-xlib \
--disable-yasm \
--disable-zlib \
--enable-shared \
--enable-memalign-hack
make -j$(nproc)
make install
cd ../../

20
.travis/travis.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
#
# Script that runs all the necessary tests on travis.
#
# Exits as soon as there's a failure in test.
set -e
if [[ "$TRAVIS_OS_NAME" == "linux" ]]
then
# osx cannot into extended regexp for grep, thus verify only on Linux
bash ./verify-commit-messages.sh "$TRAVIS_COMMIT_RANGE"
bash ./.travis/build-ubuntu_14_04.sh
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]
then
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -i
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -b
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -d
bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -dmg
fi