From: Chris Wright Date: Sun, 14 Dec 2014 14:37:43 +0000 (+0000) Subject: Add travis config X-Git-Tag: v0.6.0RC1~19^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=7f158e111eb753a090eac95e55b586d58c97d3ca;p=m6w6%2Fext-pq Add travis config --- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..296407f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: c + +addons: + postgresql: "9.3" + +before_install: + - sudo apt-get update -qq + - sudo apt-get install -qq libpq-dev + +before_script: + - sudo ./travis/compile-php.sh + - sudo ./travis/compile-raphf.sh + - sudo ./travis/compile-ext.sh + - sudo ./travis/configure-postgres.sh + +script: + - REPORT_EXIT_STATUS=1 $HOME/bin/php ./run-tests.php -p $HOME/bin/php --show-diff diff --git a/travis/compile-ext.sh b/travis/compile-ext.sh new file mode 100755 index 0000000..17b6be8 --- /dev/null +++ b/travis/compile-ext.sh @@ -0,0 +1,10 @@ +#!/bin/sh -x + +set -e + +$HOME/bin/phpize +./configure --with-php-config=$HOME/bin/php-config --with-pq + +make -j2 --quiet install + +echo 'extension=pq.so' > $HOME/php.d/20-pq.ini diff --git a/travis/compile-php.sh b/travis/compile-php.sh new file mode 100755 index 0000000..63c8142 --- /dev/null +++ b/travis/compile-php.sh @@ -0,0 +1,14 @@ +#!/bin/sh -x + +set -e +TARGET_PHP_REF="PHP-5.6" + +mkdir -p $HOME/php +mkdir -p $HOME/php.d +git clone --depth=1 --branch=$TARGET_PHP_REF https://github.com/php/php-src $HOME/php/src + +cd $HOME/php/src +./buildconf --force +./configure --prefix=$HOME --with-config-file-scan-dir=$HOME/php.d --disable-all --enable-maintainer-zts --enable-json --with-mhash + +make -j2 --quiet install diff --git a/travis/compile-raphf.sh b/travis/compile-raphf.sh new file mode 100755 index 0000000..99aa4b0 --- /dev/null +++ b/travis/compile-raphf.sh @@ -0,0 +1,13 @@ +#!/bin/sh -x + +set -e + +git clone --depth 1 https://github.com/php/pecl-php-raphf $HOME/raphf +cd $HOME/raphf + +$HOME/bin/phpize +./configure --with-php-config=$HOME/bin/php-config --with-pq + +make -j2 --quiet install + +echo 'extension=raphf.so' > $HOME/php.d/10-raphf.ini diff --git a/travis/configure-postgres.sh b/travis/configure-postgres.sh new file mode 100755 index 0000000..de5355c --- /dev/null +++ b/travis/configure-postgres.sh @@ -0,0 +1,4 @@ +#!/bin/sh -x + +psql -c 'create database pq_test;' -U postgres +echo ' ./tests/_setup.inc