forked from phalcon/cphalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
123 lines (109 loc) · 3.47 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
language: php
dist: trusty
sudo: required
php:
- 5.5
- 5.6
matrix:
fast_finish: true
allow_failures:
- php: nightly
include:
- php: 7.0
env: ZEND_BACKEND="--backend=ZendEngine3"
- php: 7.1
env: ZEND_BACKEND="--backend=ZendEngine3"
- php: nightly
env: ZEND_BACKEND="--backend=ZendEngine3"
git:
depth: 1
cache:
apt: true
ccache: true
timeout: 691200
directories:
- .temp
- $HOME/.ccache
- $HOME/.composer/cache
services:
- mongodb
- memcached
- redis-server
- postgresql
- beanstalkd
- mysql
env:
global:
- TEST_BT_HOST="127.0.0.1"
- TEST_BT_PORT="11300"
- TEST_MC_HOST="127.0.0.1"
- TEST_MC_PORT="11211"
- TEST_MC_WEIGHT="1"
- TEST_DB_SQLITE_NAME="/tmp/phalcon_test.sqlite"
- TEST_DB_MYSQL_HOST="127.0.0.1"
- TEST_DB_MYSQL_PORT="3306"
- TEST_DB_MYSQL_USER="root"
- TEST_DB_MYSQL_PASSWD=""
- TEST_DB_MYSQL_NAME="phalcon_test"
- TEST_DB_MYSQL_CHARSET="utf8"
- TEST_DB_POSTGRESQL_HOST="127.0.0.1"
- TEST_DB_POSTGRESQL_PORT="5432"
- TEST_DB_POSTGRESQL_USER="postgres"
- TEST_DB_POSTGRESQL_PASSWD=""
- TEST_DB_POSTGRESQL_NAME="phalcon_test"
- TEST_DB_MYSQL_DSN="mysql:host=127.0.0.1;dbname=phalcon_test"
- TEST_DB_MONGO_HOST="127.0.0.1"
- TEST_DB_MONGO_PORT="27017"
- TEST_DB_MONGO_USER="admin"
- TEST_DB_MONGO_PASSWD=""
- TEST_DB_MONGO_NAME="phalcon_test"
- TEST_RS_HOST="127.0.0.1"
- TEST_RS_PORT="6379"
- ZEND_DONT_UNLOAD_MODULES=1
- CC="ccache gcc"
- PATH="$PATH:~/bin"
before_install:
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
- sudo ln -s /home/travis/.phpenv/versions/$(phpenv version-name)/bin/phpize /usr/bin/
- sudo ln -s /home/travis/.phpenv/versions/$(phpenv version-name)/bin/php-config /usr/bin/
- export PHP_MAJOR="$(echo $TRAVIS_PHP_VERSION | cut -d '.' -f 1,2)"
install:
- travis_retry composer install --prefer-source --no-interaction --ignore-platform-reqs
- bash tests/_ci/install_prereqs_$PHP_MAJOR.sh
- bash tests/_ci/install_zephir_parser.sh
- bash tests/_ci/install_zephir.sh
- '( zephir fullclean && zephir generate $ZEND_BACKEND )'
- (export PRE_PHP_INCLUDES=`php-config --includes`; cd ext/; for file in `find kernel -name "*.h"`; do $CC "$file" -I. $PRE_PHP_INCLUDES -o "$file.ghc"; done)
- (cd ext; export CFLAGS="-g3 -O0 -std=gnu90 -Wall"; /usr/bin/phpize &> /dev/null && ./configure --silent --enable-phalcon &> /dev/null && make --silent -j"$(getconf _NPROCESSORS_ONLN)" &> /dev/null && make --silent install)
- phpenv config-add tests/_ci/phalcon.ini
- phpenv config-add tests/_ci/redis.ini
- php -m
- pecl list
- php --ri phalcon
before_script:
- bash tests/_ci/setup_dbs.sh &> /dev/null
- ulimit -c unlimited -S || true
- echo '/tmp/core_%e.%p' | sudo tee /proc/sys/kernel/core_pattern &> /dev/null
- echo "opcache.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
script:
- vendor/bin/phpcs
- vendor/bin/phpunit --bootstrap tests/_ci/phpunit.php --debug unit-tests/
- vendor/bin/codecept build
- vendor/bin/codecept run -v -n
after_failure:
- bash tests/_ci/after_failure.sh
notifications:
email:
recipients:
- build@phalconphp.com
on_success: change
on_failure: always
addons:
apt:
packages:
- gdb
- re2c
- beanstalkd
- mysql-server-5.6
- mysql-server-core-5.6
- mysql-client-5.6