Files
yii2/tests/data/travis/memcache-setup.sh
Alexander Makarov a4a22ae1fb Partially fix travis builds (#17456)
* Use xenial since trusty has issues installing MySQL
* 5.4 and 5.5 are available on trusty only so these are set to allow failures for now
* Skip memcached and memcache on PHP 5.6 since it's compiled wrong. See https://travis-ci.community/t/unable-to-load-dynamic-library-memcached-so/2232/16
* Ignore failure to update MySQL (it could be up to date already)
2019-07-23 15:46:06 +03:00

21 lines
669 B
Bash
Executable File

#!/bin/sh -e
if (php --version | grep -i HipHop > /dev/null); then
echo "skipping memcache on HHVM"
else
mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc
# memcache is not available on PHP 7, memcacheD is.
if [ $(phpenv version-name) = '5.4' ] || [ $(phpenv version-name) = '5.5' ] ]; then
echo "extension=memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
else
echo "skipping memcache on php 7"
fi
if [ $(phpenv version-name) = '5.6' ]; then
echo "skipping memcache on php 5.6 since it is broken for xenial"
else
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
fi
fi