2016-05-29 15:41:12 +02:00
|
|
|
language: php
|
|
|
|
php:
|
|
|
|
- 5.4
|
|
|
|
- 5.5
|
|
|
|
- 5.6
|
|
|
|
- 7
|
|
|
|
- hhvm
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
allow_failures:
|
|
|
|
- php: hhvm
|
|
|
|
|
2016-08-05 17:51:23 +02:00
|
|
|
# test installation and run all tests with these databases
|
|
|
|
env:
|
2016-08-05 18:08:47 +02:00
|
|
|
matrix:
|
|
|
|
- DB=mysql
|
|
|
|
- DB=postgres
|
2016-05-29 15:41:12 +02:00
|
|
|
|
2016-07-12 16:54:40 +02:00
|
|
|
services:
|
|
|
|
- memcached
|
2016-08-05 17:51:23 +02:00
|
|
|
# - mysql we use mariadb instead installed via addons below
|
|
|
|
- postgres
|
2016-05-29 15:41:12 +02:00
|
|
|
|
2016-07-25 10:08:03 +02:00
|
|
|
addons:
|
|
|
|
mariadb: '10.0'
|
|
|
|
|
2016-05-30 18:31:46 +02:00
|
|
|
sudo: required
|
2016-05-30 18:43:03 +02:00
|
|
|
dist: trusty
|
2016-07-12 16:54:40 +02:00
|
|
|
# this fixes hhvm builds according to https://docs.travis-ci.com/user/languages/php#HHVM-versions-on-Trusty
|
2016-07-11 21:38:36 +02:00
|
|
|
group: edge
|
2016-05-30 18:27:31 +02:00
|
|
|
|
2016-05-29 15:41:12 +02:00
|
|
|
before_script:
|
2016-07-19 14:18:16 +02:00
|
|
|
- sudo apt-get update -qq
|
|
|
|
- sudo apt-get install -y myrepos libpcre3-dev
|
|
|
|
- case $(phpenv version-name) in
|
|
|
|
"5.4")
|
|
|
|
yes "" | pecl install memcache;
|
|
|
|
echo "extension=memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
|
|
|
yes "" | pecl install apcu-4.0.11;
|
|
|
|
echo "extension=apcu.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
|
|
|
yes "" | pecl install igbinary;
|
|
|
|
echo "extension=igbinary.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
|
|
|
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
|
|
|
;;
|
|
|
|
"5.5"|"5.6")
|
|
|
|
yes "" | pecl install memcache;
|
|
|
|
yes "" | pecl install apcu-4.0.11;
|
|
|
|
yes "" | pecl install igbinary;
|
|
|
|
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
|
|
|
;;
|
|
|
|
"7")
|
|
|
|
yes "" | pecl install apcu;
|
|
|
|
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
|
|
|
;;
|
|
|
|
"hhvm")
|
|
|
|
;;
|
|
|
|
esac
|
2016-08-05 18:29:36 +02:00
|
|
|
- phpenv config-rm xdebug.ini
|
2016-08-06 09:26:11 +02:00
|
|
|
- php -m
|
2016-08-06 09:45:53 +02:00
|
|
|
- php -r 'var_dump(extension_loaded("pgsql"));'
|
|
|
|
- php -r 'var_dump(get_loaded_extensions());'
|
2016-05-29 15:41:12 +02:00
|
|
|
#- composer update --prefer-source $LOWEST_DEPS
|
2016-05-30 18:19:48 +02:00
|
|
|
- mr --trust-all --stats up
|
2016-07-19 13:40:55 +02:00
|
|
|
- (cd activesync; mr --trust-all --stats up)
|
2016-07-11 22:12:31 +02:00
|
|
|
# installing phpunit in version suitable for used PHP version
|
2016-07-11 22:17:24 +02:00
|
|
|
- composer update phpunit/phpunit
|
2016-07-19 14:18:16 +02:00
|
|
|
# create data directory
|
|
|
|
- sudo mkdir /var/lib/egroupware
|
|
|
|
- sudo chown travis /var/lib/egroupware
|
2016-05-29 15:41:12 +02:00
|
|
|
|
|
|
|
script:
|
2016-08-05 17:51:23 +02:00
|
|
|
# install egroupware (PostgreSQL need some specific handling as it is not the default and we can not create users via sql)
|
2016-08-05 18:08:47 +02:00
|
|
|
- case $DB in
|
|
|
|
postgres)
|
2016-08-05 18:29:36 +02:00
|
|
|
php doc/rpm-build/post_install.php --db_type pgsql --db_port 5432 --db_user postgres --db_pass '' --db_root postgres --db_root_pw ''
|
2016-08-05 18:08:47 +02:00
|
|
|
--source_dir `pwd` --start_db '' --autostart_db '' --start_webserver '' --webserver_user ''
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
php doc/rpm-build/post_install.php
|
|
|
|
--source_dir `pwd` --start_db '' --autostart_db '' --start_webserver '' --webserver_user ''
|
|
|
|
;;
|
|
|
|
esac
|
2016-07-19 14:18:16 +02:00
|
|
|
#- mysql -uroot -e 'show tables' egroupware
|
2016-07-19 14:01:56 +02:00
|
|
|
# Ubuntu has problems with #!/usr/bin/env php -dapc.enable=1, it stalls forever
|
|
|
|
- php -dapc.enable_cli=1 doc/test-cli.php
|
2016-07-11 22:12:31 +02:00
|
|
|
- ./doc/php_syntax_check.sh
|
2016-05-29 15:41:12 +02:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
2016-07-19 14:01:56 +02:00
|
|
|
- $HOME/.composer/cache
|