-
Notifications
You must be signed in to change notification settings - Fork 160
/
.travis.yml
75 lines (58 loc) · 2.55 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
language: c
env:
- MO_PHP_VERSION=7.2.2
- MO_PHP_VERSION=7.1.2
- MO_PHP_VERSION=7.0.16
- MO_PHP_VERSION=5.6.30
- MO_PHP_VERSION=5.5.38
- MO_PHP_VERSION=5.4.37
services:
- mysql
- redis-server
- mongodb
- memcached
- elasticsearch
cache:
directories:
- php_source
- php_build
before_install:
# install software
- sudo apt-get install netcat-traditional
- printf "2\n"| sudo update-alternatives --config nc
- sudo apt-get install libmemcached-tools
# restart redis
- sudo redis-server /etc/redis/redis.conf --port 6380
# set mysql table
- mysql -e 'CREATE DATABASE IF NOT EXISTS molten;' -u root
- mysql -e 'CREATE TABLE molten.configs (
`key` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
`value` varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`key`)
) ENGINE=InnoDB;' -u root
- mysql -e 'insert into molten.configs(`key`, `value`) values(1, 2)' -u root
- MO_PHP_SRC=${TRAVIS_BUILD_DIR}/php_source/php-${MO_PHP_VERSION}
- MO_PHP_PATH=${TRAVIS_BUILD_DIR}/php_build/php-${MO_PHP_VERSION}
- MO_PHP_BIN=${MO_PHP_PATH}/bin/php
- MO_PHP_PECL=${MO_PHP_PATH}/bin/pecl
- MO_PHP_TEST=${TRAVIS_BUILD_DIR}/tests
- MO_EXTENSION_NEW=level
# build PHP without ZTS by ourselves...
- mkdir -p php_source php_build
- (cd php_source && ls -l php-${MO_PHP_VERSION}.tar.bz2 || ../.travis/php_get.sh ${MO_PHP_VERSION})
- (cd php_source && ls -l ${MO_PHP_BIN} || ../.travis/php_build.sh ${TRAVIS_BUILD_DIR}/php_build php-${MO_PHP_VERSION}.tar.bz2)
# install composer install vendor
- (.travis/composer_install.sh $MO_PHP_VERSION $MO_PHP_TEST)
- (cd tests && curl -s http://getcomposer.org/installer|$MO_PHP_BIN && $MO_PHP_BIN composer.phar install)
# install extension
- (sh .travis/ext_install.sh $MO_PHP_PATH $MO_PHP_VERSION)
before_script:
- sleep 10
# build a new extension for level id test
#- .travis/ext_build.sh ${MO_PHP_PATH} $MO_EXTENSION_NEW
# build normal extension
- .travis/ext_build.sh ${MO_PHP_PATH}
script:
- (REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=${MO_PHP_BIN} ${MO_PHP_BIN} -n run-tests.php -q -n -d extension=molten.so -d extension=redis.so -d extension=mongodb.so -d extension=memcached.so --show-diff)
#- (REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=${MO_PHP_BIN} ${MO_PHP_BIN} -n run-tests.php -q -n -d extension=${MO_EXTENSION_NEW}.so -d extension=redis.so -d extension=mongodb.so -d extension=memcached.so --show-diff)
after_script: