Skip to content

Commit 61a3b7b

Browse files
committed
Merge branch 'refs/heads/travis-ext'
2 parents 69fc249 + 5f11445 commit 61a3b7b

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ matrix:
1010
allow_failures:
1111
- php: hhvm
1212

13-
before_script:
14-
- composer install --dev --prefer-source
13+
install: ./travis-init.sh

travis-init.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
set -e
3+
set -o pipefail
4+
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
12+
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();')"
22+
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
34+
35+
composer install --dev --prefer-source

0 commit comments

Comments
 (0)