-
Notifications
You must be signed in to change notification settings - Fork 54
/
.travis.yml
36 lines (31 loc) · 2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
language: php
dist: trusty
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
env:
- 'BSON=0 MSGPACK=0'
- 'BSON=0 MSGPACK=1'
- 'BSON=mongo MSGPACK=0'
- 'BSON=mongodb MSGPACK=0'
- 'BSON=mongodb MSGPACK=1'
before_script:
- sh -c "if [ $MSGPACK -eq 1 -a $(phpenv version-name) \< 7.0 ]; then wget https://github.com/msgpack/msgpack-php/archive/php5.zip -O php-msgpack.zip && unzip php-msgpack.zip && mv msgpack-php-php5 msgpack-php; fi"
- sh -c "if [ $MSGPACK -eq 1 -a $(phpenv version-name) \> 6.0 ]; then wget https://github.com/msgpack/msgpack-php/archive/master.zip -O php-msgpack.zip && unzip php-msgpack.zip && mv msgpack-php-master msgpack-php; fi"
- sh -c "if [ $MSGPACK -eq 1 ]; then cd msgpack-php/ && phpize && ./configure && make && make install; fi"
- sh -c "if [ $MSGPACK -eq 1 ]; then echo \"extension=msgpack.so\" >> `php --ini | grep \"Loaded Configuration\" | sed -e \"s|.*:\s*||\"`; fi"
- sh -c "if [ $MSGPACK -eq 0 ]; then echo \"Not Installing MSGPack Extension\"; fi"
- sh -c "if [ $BSON = mongo -a $(phpenv version-name) \< 7.0 ]; then wget https://github.com/mongodb/mongo-php-driver-legacy/archive/master.zip -O php-mongo.zip && unzip php-mongo.zip; fi"
- sh -c "if [ $BSON = mongo -a $(phpenv version-name) \< 7.0 ]; then cd mongo-php-driver-legacy-master/ && phpize && ./configure && make && make install; fi"
- sh -c "if [ $BSON = mongo -a $(phpenv version-name) \< 7.0 ]; then echo \"extension=mongo.so\" >> `php --ini | grep \"Loaded Configuration\" | sed -e \"s|.*:\s*||\"`; fi"
- sh -c "if [ $BSON = mongodb ]; then git clone --depth=50 --recursive https://github.com/mongodb/mongo-php-driver/; fi"
- sh -c "if [ $BSON = mongodb ]; then cd mongo-php-driver/ && git submodule status --recursive && ./.travis.scripts/before_script.sh; fi"
- sh -c "if [ $BSON = 0 ]; then echo \"Not Installing Mongo or MongoDB Extension\"; fi"
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
script:
- vendor/bin/phpunit