Skip to content

Commit

Permalink
Add travis test on Mac for php.
Browse files Browse the repository at this point in the history
  • Loading branch information
TeBoring committed Oct 3, 2016
1 parent bcb32c0 commit 858db7a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ env:
- CONFIG=ruby21
- CONFIG=ruby22
- CONFIG=jruby
- CONFIG=php5.5_mac
matrix:
exclude:
# It's nontrivial to programmatically install a new JDK from the command
Expand Down
28 changes: 19 additions & 9 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -347,20 +347,25 @@ use_php() {
cp "/usr/bin/phpize$VERSION" $PHPIZE
}

build_php5.5_c() {
use_php 5.5
cd php/tests && /bin/bash ./test.sh && cd ../..
}

build_php5.5() {
use_php 5.5
rm -rf vendor
cp -r /usr/local/vendor-5.5 vendor
./vendor/bin/phpunit
}

build_php5.6_c() {
use_php 5.6
build_php5.5_c() {
use_php 5.5
cd php/tests && /bin/bash ./test.sh && cd ../..
}
build_php5.5_c() {
use_php 5.5
cd php/tests && /bin/bash ./test.sh && cd ../..
}

build_php5.5_mac() {
curl -s https://php-osx.liip.ch/install.sh | bash -s 5.5
export PATH="/usr/local/php5-5.5.38-20160831-100002/bin:$PATH"
cd php/tests && /bin/bash ./test.sh && cd ../..
}

Expand All @@ -371,8 +376,8 @@ build_php5.6() {
./vendor/bin/phpunit
}

build_php7.0_c() {
use_php 7.0
build_php5.6_c() {
use_php 5.6
cd php/tests && /bin/bash ./test.sh && cd ../..
}

Expand All @@ -383,6 +388,11 @@ build_php7.0() {
./vendor/bin/phpunit
}

build_php7.0_c() {
use_php 7.0
cd php/tests && /bin/bash ./test.sh && cd ../..
}

build_php_all() {
build_php5.5
build_php5.6
Expand Down

0 comments on commit 858db7a

Please sign in to comment.