Skip to content

Commit 7a359c5

Browse files
committed
Install uv extension on PHP 7
1 parent 072b557 commit 7a359c5

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ cache:
2626
directories:
2727
- $HOME/.composer/cache/files
2828

29+
before_install:
30+
- sudo add-apt-repository ppa:ondrej/php -y
31+
- sudo apt-get update -q
32+
- sudo apt-get install libuv1-dev
33+
2934
install:
3035
- ./travis-init.sh
3136
- composer install

travis-init.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,17 @@ if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
3434
echo "extension=libev.so" >> "$(php -r 'echo php_ini_loaded_file();')"
3535
fi
3636

37+
# install 'libev' PHP extension (does not support php 7)
38+
if [[ "$TRAVIS_PHP_VERSION" = "7.0" ||
39+
"$TRAVIS_PHP_VERSION" = "7.1" ]]; then
40+
git clone --recursive https://github.com/bwoebi/php-uv
41+
pushd php-uv
42+
phpize
43+
./configure
44+
make
45+
make install
46+
popd
47+
echo "extension=uv.so" >> "$(php -r 'echo php_ini_loaded_file();')"
48+
fi
49+
3750
fi

0 commit comments

Comments
 (0)