Permalink
Browse files

Simplify the Travis set-up

  • Loading branch information...
remicollet authored and derickr committed Nov 15, 2017
1 parent 9e5ab0c commit ebf61f7bafef38f7d4500bb6b36896b886131150
Showing with 9 additions and 21 deletions.
  1. +1 −16 .travis.scripts/compile.sh
  2. +8 −5 .travis.yml
View
@@ -2,20 +2,5 @@
export CFLAGS="-Wall -Werror -Wextra -Wdeclaration-after-statement -Wmissing-field-initializers -Wshadow -Wno-unused-parameter -ggdb3"
phpize
./configure
make all install
EXTENSIONDIR=`php -r 'echo ini_get("extension_dir");'`
echo "zend_extension=${EXTENSIONDIR}/xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
echo "zend_extension=${EXTENSIONDIR}/xdebug.so" > /tmp/temp-php-config.ini
make all
if [ "${USE_OPCACHE}" = "0" ]; then
echo "Removing OPcache"
cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | grep -v opcache > /tmp/temp-without-opcache.ini
mv /tmp/temp-without-opcache.ini /home/travis/.phpenv/versions/$(phpenv version-name)/etc/php.ini
else
echo "Keeping OPcache"
echo "zend_extension=${EXTENSIONDIR}/opcache.so" >> /tmp/temp-php-config.ini
echo "opcache.enable=1" >> /tmp/temp-php-config.ini
echo "opcache.enable_cli=1" >> /tmp/temp-php-config.ini
echo "opcache.enable=1" >> /home/travis/.phpenv/versions/$(phpenv version-name)/etc/php.ini
echo "opcache.enable_cli=1" >> /home/travis/.phpenv/versions/$(phpenv version-name)/etc/php.ini
fi
View
@@ -25,12 +25,15 @@ notifications:
derick@xdebug.org
script:
- MYPHP=`make findphp`
- export PATH=`dirname $MYPHP`:$PATH
- export TEST_PHP_ARGS="-dfoo=1 -n -dzend_extension=opcache.so -dopcache.enable=${USE_OPCACHE} -dopcache.enable_cli=${USE_OPCACHE} -dzend_extension=xdebug.so"
- export TEST_PHP_EXECUTABLE=`make findphp`
- export PATH=`dirname $TEST_PHP_EXECUTABLE`:$PATH
- TEST_PHP_ARGS="-n -d foo=1"
- if [[ "$USE_OPCACHE" == "1" ]]; then TEST_PHP_ARGS="$TEST_PHP_ARGS -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1"; fi
- export TEST_PHP_ARGS="$TEST_PHP_ARGS -d zend_extension=$PWD/modules/xdebug.so"
- export SKIP_IPV6_TESTS=1
- $MYPHP -c /tmp/temp-php-config.ini -v
- REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=$MYPHP $MYPHP -c /tmp/temp-php-config.ini -dxdebug.auto_trace=0 run-tests.php -q -x --show-diff
- export REPORT_EXIT_STATUS=1
- $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS -v
- $TEST_PHP_EXECUTABLE -n run-tests.php -q -x --show-diff
after_script:
- ./.travis.scripts/show-errors.sh

0 comments on commit ebf61f7

Please sign in to comment.