Skip to content

Commit

Permalink
Merge pull request #819 from sjinks/ci-cleanup
Browse files Browse the repository at this point in the history
Simplify .travis.yml
  • Loading branch information
Phalcon committed Jul 10, 2013
2 parents d5f1dcd + 6d40fdf commit 660ba13
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 52 deletions.
24 changes: 8 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,22 @@ php:

services:
- mongodb
- memcached

before_install:
- ./unit-tests/ci/install_memcached.sh
- phpenv config-add ./unit-tests/ci/memcache.ini
- phpenv config-add ./unit-tests/ci/mongo.ini
- ./unit-tests/ci/install_apc.sh
- ./unit-tests/ci/install_mongo.sh

before_script:
- git submodule init
- git submodule update
- cd php-tests/library/Mustache
- git checkout master
- cd ../../..
- cd php-tests/library/Twig
- git checkout master
- cd ../../..
- ( cd php-tests/library/Mustache; git checkout master )
- ( cd php-tests/library/Twig; git checkout master )
- mkdir -p unit-tests/engines
- cd unit-tests/engines/
- git clone https://github.com/bobthecow/mustache.php.git
- git clone git://github.com/fabpot/Twig.git
- cd ../../ext
- export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks"
- phpize && ./configure --enable-phalcon && make && sudo make install
- echo "extension=phalcon.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
- cd ..
- ( cd unit-tests/engines/; git clone git://github.com/bobthecow/mustache.php.git; git clone git://github.com/fabpot/Twig.git )
- ( cd ext; export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks"; phpize && ./configure --enable-phalcon && make && sudo make install )
- phpenv config-add ./unit-tests/ci/phalcon.ini
- mysql -uroot -e 'create database phalcon_test charset=utf8 collate=utf8_unicode_ci;'
- mysql -uroot phalcon_test < unit-tests/schemas/mysql/phalcon_test.sql
- psql -c 'create database phalcon_test;' -U postgres
Expand Down
2 changes: 2 additions & 0 deletions unit-tests/ci/apc.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extension=apc.so
apc.enable_cli=On
1 change: 1 addition & 0 deletions unit-tests/ci/apcu.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apc.enable_cli=On
22 changes: 6 additions & 16 deletions unit-tests/ci/install_apc.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
#! /bin/sh

if [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.3" ]; then
wget -q http://pecl.php.net/get/apc-3.1.9.tgz
tar -xzf apc-3.1.9.tgz
( cd APC-3.1.9 && phpize && ./configure --enable-apc && make && sudo make install )
echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
elif [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.5" ]; then
wget -q http://pecl.php.net/get/apcu-4.0.1.tgz
tar xzf apcu-4.0.1.tgz
( cd apcu-4.0.1 && phpize && ./configure && make && sudo make install )
echo "extension=apcu.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
DIR=$(readlink -enq $(dirname $0))

if [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.5" ]; then
pecl install apcu < /dev/null || ( pecl config-set preferred_state beta; pecl install apcu < /dev/null )
phpenv config-add "$DIR/apcu.ini"
else
wget -q http://pecl.php.net/get/apc-3.1.13.tgz
tar -xzf apc-3.1.13.tgz
( cd APC-3.1.13 && phpize && ./configure --enable-apc && make && sudo make install )
echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
phpenv config-add "$DIR/apc.ini"
fi

echo "apc.enable_cli = On" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
13 changes: 0 additions & 13 deletions unit-tests/ci/install_memcached.sh

This file was deleted.

7 changes: 0 additions & 7 deletions unit-tests/ci/install_mongo.sh

This file was deleted.

1 change: 1 addition & 0 deletions unit-tests/ci/memcache.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension=memcache.so
1 change: 1 addition & 0 deletions unit-tests/ci/mongo.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension=mongo.so
1 change: 1 addition & 0 deletions unit-tests/ci/phalcon.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extension=phalcon.so

0 comments on commit 660ba13

Please sign in to comment.