Skip to content

Commit 9c5d786

Browse files
committed
Merge pull request reactphp#259 from jmalloc/hhvm-no-extensions
Stop HHVM build from hanging
2 parents db3af2a + 9321bc9 commit 9c5d786

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ matrix:
99
allow_failures:
1010
- php: hhvm
1111

12-
before_script:
13-
- ./scripts/travis-init.sh
12+
install: ./scripts/travis-init.sh
1413

1514
script: php vendor/bin/phpunit --coverage-text

scripts/travis-init.sh

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,36 @@
11
#!/bin/bash
2+
set -e
3+
set -o pipefail
24

3-
sudo apt-get install -y libevent-dev
4-
if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "\$(php --re libevent | grep 'does not exist')" != "" ]; then
5-
wget http://pecl.php.net/get/libevent-0.0.5.tgz;
6-
tar -xzf libevent-0.0.5.tgz;
7-
cd libevent-0.0.5 && phpize && ./configure && make && sudo make install && cd ../;
8-
echo "extension=libevent.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`;
9-
fi
5+
if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then
6+
7+
# install "libevent' (used by 'event' and 'libevent' PHP extensions)
8+
sudo apt-get install -y libevent-dev
9+
10+
# install 'event' PHP extension
11+
echo "yes" | pecl install event
1012

11-
echo "yes" | pecl install event
13+
# install 'libevent' PHP extension
14+
curl http://pecl.php.net/get/libevent-0.0.5.tgz | tar -xz
15+
pushd libevent-0.0.5
16+
phpize
17+
./configure
18+
make
19+
make install
20+
popd
21+
echo "extension=libevent.so" >> "$(php -r 'echo php_ini_loaded_file();')"
1222

13-
(git clone --recursive https://github.com/m4rw3r/php-libev && cd php-libev && phpize && ./configure --with-libev && make && make install)
14-
echo "extension=libev.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
23+
# install 'libev' PHP extension
24+
git clone --recursive https://github.com/m4rw3r/php-libev
25+
pushd php-libev
26+
phpize
27+
./configure --with-libev
28+
make
29+
make install
30+
popd
31+
echo "extension=libev.so" >> "$(php -r 'echo php_ini_loaded_file();')"
32+
33+
fi
1534

1635
composer self-update
1736
composer install --dev --prefer-source

0 commit comments

Comments
 (0)