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 1111 directories :
1212 - ${HOME}/.cache/pip
1313 - ${HOME}/.composer/cache/files
14+ - ${HOME}/php-ext
1415
1516env :
1617 global :
@@ -46,11 +47,28 @@ before_install:
4647 - mongod --version
4748 - mongo-orchestration --version
4849 - 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
4967
5068before_script :
5169 - mongo-orchestration start
5270 - 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
5472 - php --ri mongodb
5573 - composer install --no-interaction --no-progress --no-suggest
5674 - ulimit -c
You can’t perform that action at this time.
0 commit comments