update travis script

This commit is contained in:
Patrick von Reth 2015-09-04 16:27:16 +02:00
parent a3f9e8cd99
commit 9575e47046
1 changed files with 54 additions and 29 deletions

View File

@ -1,42 +1,67 @@
language: cpp
os:
- osx
- linux
- osx
- linux
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install qt5 ninja; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:beineri/opt-qt521; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:kubuntu-ppa/backports ; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq update; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -q qt52base qt52tools qt52quick1 qt52quickcontrols ninja-build cmake; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then source /opt/qt52/bin/qt52-env.sh ;fi
- mkdir -p ~/git && cd ~/git
- git clone -q git://anongit.kde.org/extra-cmake-modules.git
- git clone -q https://github.com/Snorenotify/SnoreGrowl.git
- mkdir -p ~/build
- mkdir -p ~/build/extra-cmake-modules && cd ~/build/extra-cmake-modules
- cmake -G"Ninja" ~/git/extra-cmake-modules -DCMAKE_INSTALL_PREFIX=~/installs/
- ninja install
- mkdir -p ~/build/snoregrowl && cd ~/build/snoregrowl
- cmake -G"Ninja" ~/git/SnoreGrowl -DCMAKE_INSTALL_PREFIX=~/installs/
- ninja install
before_install: |-
if [ "$TRAVIS_OS_NAME" == "osx" ]
then
brew update
brew install qt5 ninja
fi
if [ "$TRAVIS_OS_NAME" == "linux" ]
then
sudo add-apt-repository -y ppa:beineri/opt-qt532
sudo add-apt-repository -y ppa:kubuntu-ppa/backports
sudo apt-get -qq update
sudo apt-get install -q qt53base qt53tools qt53quick1 qt53quickcontrols qt53websockets qt53multimedia
sudo apt-get install -q ninja-build cmake
source /opt/qt53/bin/qt53-env.sh
fi
if [ ! -d ~/my_work ]
then
mkdir -p ~/my_work
mkdir -p ~/my_work/git
cd ~/my_work/git
git clone -q git://anongit.kde.org/extra-cmake-modules.git
git clone -q https://github.com/Snorenotify/SnoreGrowl.git
mkdir -p ~/my_work/build
cd ~/my_work/build
mkdir -p ~/my_work/build/extra-cmake-modules
cd ~/my_work/build/extra-cmake-modules
cmake -G"Ninja" ~/my_work/git/extra-cmake-modules -DCMAKE_INSTALL_PREFIX=~/my_work/installs/
ninja install
mkdir -p ~/my_work/build/snoregrowl && cd ~/my_work/build/snoregrowl
cmake -G"Ninja" ~/my_work/git/SnoreGrowl -DCMAKE_INSTALL_PREFIX=~/my_work/installs/
ninja install
fi
compiler:
- clang
#- gcc
- gcc
script: |-
cd $TRAVIS_BUILD_DIR
mkdir build
cd build
if [ "$TRAVIS_OS_NAME" == "osx" ]
then
cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/my_work/installs/ -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5
fi
if [ "$TRAVIS_OS_NAME" == "linux" ]
then
cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/my_work/installs/
fi
ninja install
cache:
directories:
$HOME/my_work
script:
- cd $TRAVIS_BUILD_DIR
- mkdir build
- cd build
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/installs/ -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 ;fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/installs/ ;fi
- ninja install
notifications:
irc: "chat.freenode.net#snorenotify"
irc: "chat.freenode.net#snorenotify"
# addons:
# apt: