Use caching on travis.

This commit is contained in:
Patrick von Reth 2015-09-04 16:43:12 +02:00
parent 42871d35c4
commit 21784b68aa
1 changed files with 20 additions and 15 deletions

View File

@ -8,7 +8,11 @@ before_install: |-
if [ "$TRAVIS_OS_NAME" == "osx" ]
then
brew update
brew install qt5 ninja
brew install ninja
if [ ! -d /usr/local/opt/qt5 ]
then
brew install qt5
fi
fi
if [ "$TRAVIS_OS_NAME" == "linux" ]
then
@ -19,21 +23,21 @@ before_install: |-
sudo apt-get install -q ninja-build cmake
source /opt/qt53/bin/qt53-env.sh
fi
if [ ! -d ~/my_work ]
if [ ! -d ~/snore_work ]
then
mkdir -p ~/my_work
mkdir -p ~/my_work/git
cd ~/my_work/git
mkdir -p ~/snore_work
mkdir -p ~/snore_work/git
cd ~/snore_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/
mkdir -p ~/snore_work/build
cd ~/snore_work/build
mkdir -p ~/snore_work/build/extra-cmake-modules
cd ~/snore_work/build/extra-cmake-modules
cmake -G"Ninja" ~/snore_work/git/extra-cmake-modules -DCMAKE_INSTALL_PREFIX=~/snore_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/
mkdir -p ~/snore_work/build/snoregrowl && cd ~/snore_work/build/snoregrowl
cmake -G"Ninja" ~/snore_work/git/SnoreGrowl -DCMAKE_INSTALL_PREFIX=~/snore_work/installs/
ninja install
fi
@ -47,17 +51,18 @@ script: |-
cd build
if [ "$TRAVIS_OS_NAME" == "osx" ]
then
cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/my_work/installs/ -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5
cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/snore_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/
cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/snore_work/installs/
fi
ninja install
cache:
directories:
$HOME/my_work
- $HOME/snore_work
- /usr/local/opt/qt5
notifications: