Skip to content

Travis improvements (backported from #74) #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm

install: ./travis-init.sh
sudo: false

addons:
apt:
packages:
- libevent-dev # Used by 'event' and 'libevent' PHP extensions

cache:
directories:
- $HOME/.composer/cache/files

install:
- ./travis-init.sh
- composer install

script:
- ./vendor/bin/phpunit --coverage-text
11 changes: 4 additions & 7 deletions travis-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ set -o pipefail
if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
"$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]]; then

# install "libevent" (used by 'event' and 'libevent' PHP extensions)
sudo apt-get install -y libevent-dev

# install 'event' PHP extension
echo "yes" | pecl install event

# install 'libevent' PHP extension (does not support php 7)
if [[ "$TRAVIS_PHP_VERSION" != "7.0" ]]; then
if [[ "$TRAVIS_PHP_VERSION" != "7.0" &&
"$TRAVIS_PHP_VERSION" != "7.1" ]]; then
curl http://pecl.php.net/get/libevent-0.1.0.tgz | tar -xz
pushd libevent-0.1.0
phpize
Expand All @@ -24,7 +22,8 @@ if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
fi

# install 'libev' PHP extension (does not support php 7)
if [[ "$TRAVIS_PHP_VERSION" != "7.0" ]]; then
if [[ "$TRAVIS_PHP_VERSION" != "7.0" &&
"$TRAVIS_PHP_VERSION" != "7.1" ]]; then
git clone --recursive https://github.com/m4rw3r/php-libev
pushd php-libev
phpize
Expand All @@ -36,5 +35,3 @@ if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
fi

fi

composer install --dev --prefer-source