Skip to content

Commit e61b239

Browse files
committed
travis-ci
1 parent 5c33625 commit e61b239

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sudo: false
2+
language: php
3+
php:
4+
- 5.5
5+
- 5.6
6+
script: ./travis.sh

ext/tests/fixtures/go/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
all: test.so
2+
3+
test.so: test.go ../../../../php-go/*
4+
GOPATH=$$(pwd)/../../../../../../../../ go build -o test.so -buildmode c-shared

travis.sh

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
3+
eval "$(gimme 1.5.2)"
4+
5+
set -xe
6+
7+
mkdir "$(pwd)/gopath"
8+
export GOPATH="$(pwd)/gopath"
9+
10+
go env
11+
12+
mkdir -p gopath/src/github.com/arnaud-lb
13+
ln -s $(pwd) gopath/src/github.com/arnaud-lb/php-go
14+
cd gopath/src/github.com/arnaud-lb/php-go
15+
16+
(
17+
cd ext
18+
./prepare-tests.sh
19+
20+
echo "extension = $(pwd)/modules/phpgo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
21+
phpenv config-rm xdebug.ini
22+
23+
phpize
24+
CFLAGS="-Wall -Werror" ./configure
25+
make
26+
27+
PHP=$(which php)
28+
REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE="$PHP" "$PHP" run-tests.php -q --show-diff
29+
)

0 commit comments

Comments
 (0)