fix build

This commit is contained in:
DavidBadura 2015-12-24 10:39:08 +00:00
parent da58e8033e
commit 0d00df6710
7 changed files with 38 additions and 18 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
composer.phar composer.phar
composer.lock composer.lock
vendor/ vendor/
build/

View File

@ -1,11 +1,21 @@
language: php language: php
addons:
apt:
packages:
- cmake
- libgnutls-dev
- libuuid1
- uuid
- uuid-dev
sudo: false sudo: false
cache: cache:
directories: directories:
- $HOME/.composer/cache - $HOME/.composer/cache
- vendor - vendor
- build
php: php:
- 5.4 - 5.4
@ -33,14 +43,15 @@ matrix:
- php: 5.6 - php: 5.6
env: TASKWARRIOR=2.5.0 env: TASKWARRIOR=2.5.0
before_install:
- composer self-update
install: install:
- bash build.sh $TASKWARRIOR
- ln -s build/taskwarrior-$TASKWARRIOR task - ln -s build/taskwarrior-$TASKWARRIOR task
- chmod +x ./task - chmod +x ./task
- ./task --version - ./task --version
before_script: before_script:
- composer self-update
- composer update $PREFER_LOWEST - composer update $PREFER_LOWEST
script:
- vendor/bin/phpunit

22
build.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
TASKWARRIOR=$1
[ -d build ] || mkdir build
if [ -f build/taskwarrior-$TASKWARRIOR ]
then
exit;
fi
cd build
wget http://taskwarrior.org/download/task-$TASKWARRIOR.tar.gz || exit
gunzip task-$TASKWARRIOR.tar.gz
tar xf task-$TASKWARRIOR.tar
cd task-$TASKWARRIOR
cmake -DCMAKE_BUILD_TYPE=release .
make
cd ..
cp task-$TASKWARRIOR/src/task ./taskwarrior-$TASKWARRIOR
sudo rm -Rf task-$TASKWARRIOR*
cd ..

View File

@ -1,14 +0,0 @@
#!/bin/bash
TASKWARRIOR=$1
wget http://taskwarrior.org/download/task-$TASKWARRIOR.tar.gz
gunzip task-$TASKWARRIOR.tar.gz
tar xf task-$TASKWARRIOR.tar
cd task-$TASKWARRIOR
sudo apt-get install cmake build-essential uuid-dev libgnutls-dev libreadline6-dev --force-yes
sudo cmake -DCMAKE_BUILD_TYPE=release .
sudo make
cd ..
cp task-$TASKWARRIOR/src/task ./taskwarrior-$TASKWARRIOR
sudo rm -Rf task-$TASKWARRIOR*

Binary file not shown.

Binary file not shown.

Binary file not shown.