Skip to content

Commit 4931ba0

Browse files
authored
Update .travis.yml
1 parent 9c78d31 commit 4931ba0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.travis.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,25 @@ php:
2424
jobs:
2525
fast_finish: true
2626

27+
cache:
28+
directories:
29+
- "${HOME}/.phpenv/"
30+
2731
before_install:
28-
- "phpenv config-rm xdebug.ini"
32+
- |
33+
# Using PHP ZTS
34+
PHP_VERSION="$(php -r 'echo PHP_VERSION;')"
35+
if ! [ -f "${HOME}/.phpenv/php-zts-built" ]; then
36+
echo "Building PHP ZTS ${PHP_VERSION} ..."
37+
git clone git://github.com/php-build/php-build.git "${HOME}/.phpenv/plugins/php-build"
38+
phpenv install --verbose --force "${PHP_VERSION}"
39+
rm -rf "${HOME}/.phpenv/plugins/php-build"
40+
touch "${HOME}/.phpenv/php-zts-built"
41+
fi
42+
phpenv rehash
43+
phpenv global "${PHP_VERSION}"
44+
phpenv config-rm xdebug.ini
45+
php -v
2946
3047
install:
3148
- "phpize"

0 commit comments

Comments
 (0)