forked from edgardmessias/yii2-firebird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (55 loc) · 2.36 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- nightly
env:
- FB=2.1
- FB=2.5
# run build against hhvm but allow them to fail
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail
matrix:
fast_finish: true
allow_failures:
- php: 7.0
- php: nightly
# faster builds on new travis setup not using sudo
sudo: true
# cache vendor dirs
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
- sudo apt-get update -qq
- sudo apt-get install -qq firebird$FB-super firebird$FB-dev expect
- if [[ "$FB" == "2.1" ]]; then export DEBIAN_FRONTEND=readline; fi
- if [[ "$FB" == "2.1" ]]; then expect tests/ci/travis/dpkg_firebird2.1.exp; fi
- if [[ "$FB" == "2.1" ]]; then export DEBIAN_FRONTEND=dialog; fi
- if [[ "$FB" == "2.5" ]]; then export FIREBIRD_SERVER_CONFIG=/etc/default/firebird$FB; fi
- if [[ "$FB" == "2.5" ]]; then sudo sed /ENABLE_FIREBIRD_SERVER=/s/no/yes/ -i $FIREBIRD_SERVER_CONFIG; fi
- if [[ "$FB" == "2.5" ]]; then cat $FIREBIRD_SERVER_CONFIG | grep ENABLE_FIREBIRD_SERVER; fi
- sudo service firebird$FB-super start
- export URL_SVN_EXT=https://github.com/php/php-src/branches/PHP-$(phpenv version-name)/ext
- if [[ $(phpenv version-name) == "7.0" ]]; then export URL_SVN_EXT="https://github.com/php/php-src/branches/PHP-7.0.0/ext"; fi
- if [[ $(phpenv version-name) == "nightly" ]]; then export URL_SVN_EXT="https://github.com/php/php-src/trunk/ext"; fi
- svn checkout $URL_SVN_EXT php-ext -q
- (cd php-ext/pdo_firebird/; phpize && ./configure && make && sudo make install)
install:
- echo "extension=pdo_firebird.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- travis_retry composer self-update && composer --version
- travis_retry composer global require "fxp/composer-asset-plugin:~1.0.0" --prefer-source --no-interaction
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install --prefer-source --no-interaction
before_script:
# show some versions and env information
- isql-fb -z -q -i /dev/null
# initialize databases
- echo "CREATE DATABASE 'localhost:/tmp/TEST.FDB' USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 16384 DEFAULT CHARACTER SET UTF8;" > /tmp/create_test.sql
- isql-fb -i /tmp/create_test.sql
- cat /tmp/create_test.sql
script:
- phpunit