8000 Travis improvements (backported from #74) · Undefined-Variables/event-loop@bdb08b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit bdb08b6

Browse files
jsorclue
authored andcommitted
Travis improvements (backported from reactphp#74)
This contains all changes from reactphp#74 squashed into a single commit: * Remove deprecated --dev option from composer install * Remove --prefer-source from composer install * Move composer install to .travis.yml * Enable container based infrastructure on travis * Enable travis cache * Add PHP 7.1 to test matrix * Adjust composer cache directory to only cache package files
1 parent acb1cd6 commit bdb08b6

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.travis.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,23 @@ php:
55
- 5.5
66
- 5.6
77
- 7.0
8+
- 7.1
89
- hhvm
910

10-
install: ./travis-init.sh
11+
sudo: false
12+
13+
addons:
14+
apt:
15+
packages:
16+
- libevent-dev # Used by 'event' and 'libevent' PHP extensions
17+
18+
cache:
19+
directories:
20+
- $HOME/.composer/cache/files
21+
22+
install:
23+
- ./travis-init.sh
24+
- composer install
1125

1226
script:
1327
- ./vendor/bin/phpunit --coverage-text

travis-init.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ set -o pipefail
55
if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
66
"$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]]; then
77

8-
# install "libevent" (used by 'event' and 'libevent' PHP extensions)
9-
sudo apt-get install -y libevent-dev
10-
118
# install 'event' PHP extension
129
echo "yes" | pecl install event
1310

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

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

3837
fi
39-
40-
composer install --dev --prefer-source

0 commit comments

Comments
 (0)
0