Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] Parallel Travis builds #846

Merged
merged 7 commits into from Jul 15, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 10 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,20 @@ php:

services:
- mongodb
- memcached

before_install:
- ./unit-tests/ci/install_memcached.sh
- ./unit-tests/ci/install_apc.sh
- ./unit-tests/ci/install_mongo.sh
- phpenv config-add ./unit-tests/ci/memcache.ini
- phpenv config-add ./unit-tests/ci/mongo.ini
- ./unit-tests/ci/install_prereqs.sh
- ./unit-tests/ci/setup_dbs.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 ../../..
- 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 ..
- 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
- psql -U postgres phalcon_test -q -f unit-tests/schemas/postgresql/phalcon_test.sql
- sqlite3 /tmp/phalcon_test.sqlite < unit-tests/schemas/sqlite/phalcon_test.sql
- git submodule --quiet update --init --recursive
- (cd php-tests/library/Mustache; git checkout master )
- (cd php-tests/library/Twig; git checkout master )
- (cd unit-tests/engines/; git clone -q git://github.com/bobthecow/mustache.php.git & git clone -q git://github.com/fabpot/Twig.git & wait)
- (cd ext; export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks -Wall"; phpize && ./configure --enable-phalcon && make -j2 && sudo make install && phpenv config-add ../unit-tests/ci/phalcon.ini)
- ulimit -c unlimited || true

script:
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
3 changes: 3 additions & 0 deletions unit-tests/ci/igbinary.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extension=igbinary.so
igbinary.compact_strings=Off

20 changes: 0 additions & 20 deletions unit-tests/ci/install_apc.sh

This file was deleted.

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.

15 changes: 15 additions & 0 deletions unit-tests/ci/install_prereqs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#! /bin/sh

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
phpenv config-add "$DIR/apc.ini"
fi

pecl install igbinary < /dev/null && phpenv config-add $(DIR)/igbinary.ini &

phpenv config-add $(DIR)/memcache.ini
phpenv config-add $(DIR)/mongo.ini
wait
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
8 changes: 8 additions & 0 deletions unit-tests/ci/setup_dbs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#! /bin/sh

DIR=$(readlink -enq $(dirname $0))

(mysql -uroot -e 'create database phalcon_test charset=utf8 collate=utf8_unicode_ci;' && mysql -uroot phalcon_test < "$DIR/../schemas/mysql/phalcon_test.sql") &
(psql -c 'create database phalcon_test;' -U postgres && psql -U postgres phalcon_test -q -f "$DIR/../schemas/postgresql/phalcon_test.sql") &
sqlite3 /tmp/phalcon_test.sqlite < "$DIR/../schemas/sqlite/phalcon_test.sql"
wait