File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 11
11
directories :
12
12
- ${HOME}/.cache/pip
13
13
- ${HOME}/.composer/cache/files
14
+ - ${HOME}/php-ext
14
15
15
16
env :
16
17
global :
@@ -46,11 +47,28 @@ before_install:
46
47
- mongod --version
47
48
- mongo-orchestration --version
48
49
- export MO_PATH=`python -c 'import mongo_orchestration; from os import path; print(path.dirname(mongo_orchestration.__file__));'`
50
+ - |
51
+ INI=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
52
+ # tpecl is a helper to compile and cache php extensions
53
+ tpecl () {
54
+ local ext_name=$1
55
+ local ext_so=$2
56
+ local ext_dir=$(php -r "echo ini_get('extension_dir');")
57
+ local ext_cache=~/php-ext/$(basename $ext_dir)/$ext_name
58
+ if [[ -e $ext_cache/$ext_so ]]; then
59
+ echo extension = $ext_cache/$ext_so >> $INI
60
+ else
61
+ mkdir -p $ext_cache
62
+ echo yes | pecl install -f $ext_name &&
63
+ cp $ext_dir/$ext_so $ext_cache
64
+ fi
65
+ }
66
+ export -f tpecl
49
67
50
68
before_script :
51
69
- mongo-orchestration start
52
70
- pushd ${MO_PATH} && ${TRAVIS_BUILD_DIR}/.travis/mo.sh configurations/servers/clean.json start && popd
53
- - pecl install -f mongodb-${DRIVER_VERSION}
71
+ - tpecl mongodb-${DRIVER_VERSION} mongodb.so
54
72
- php --ri mongodb
55
73
- composer install --no-interaction --no-progress --no-suggest
56
74
- ulimit -c
You can’t perform that action at this time.
0 commit comments