forked from extern/egroupware
93 lines
2.8 KiB
YAML
93 lines
2.8 KiB
YAML
language: php
|
|
php:
|
|
- 5.4
|
|
- 5.5
|
|
- 5.6
|
|
- 7
|
|
- hhvm
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
allow_failures:
|
|
- php: hhvm
|
|
|
|
# test installation and run all tests with these databases
|
|
env:
|
|
matrix:
|
|
- DB=mysql
|
|
- DB=postgres
|
|
|
|
services:
|
|
- memcached
|
|
# - mysql we use mariadb instead installed via addons below
|
|
- postgres
|
|
|
|
addons:
|
|
mariadb: '10.0'
|
|
|
|
sudo: required
|
|
dist: trusty
|
|
# this fixes hhvm builds according to https://docs.travis-ci.com/user/languages/php#HHVM-versions-on-Trusty
|
|
group: edge
|
|
|
|
before_script:
|
|
- 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
|
|
- phpenv config-rm xdebug.ini
|
|
#- php -m
|
|
- curl https://svn.stylite.de/fix_mrconfig 2>/dev/null | php
|
|
- mr --trust-all --stats up
|
|
- (cd activesync; mr --trust-all --stats up)
|
|
# installing phpunit in version suitable for used PHP version
|
|
- composer update phpunit/phpunit
|
|
# create data directory
|
|
- sudo mkdir /var/lib/egroupware
|
|
- sudo chown travis /var/lib/egroupware
|
|
|
|
script:
|
|
# install egroupware (PostgreSQL need some specific handling as it is not the default and we can not create users via sql)
|
|
- case $DB in
|
|
postgres)
|
|
/usr/bin/php --version;
|
|
`which php`;
|
|
psql -U postgres -c 'create database egroupware';
|
|
php doc/rpm-build/post_install.php --db_type pgsql --db_port 5432 --db_user postgres --db_pass ''
|
|
--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
|
|
#- mysql -uroot -e 'show tables' egroupware
|
|
# Ubuntu has problems with #!/usr/bin/env php -dapc.enable=1, it stalls forever
|
|
- php -dapc.enable_cli=1 doc/test-cli.php
|
|
- ./doc/php_syntax_check.sh
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache
|