Skip to content

Instantly share code, notes, and snippets.

@whatthejeff
Created August 18, 2013 13:00
Show Gist options
  • Save whatthejeff/6261532 to your computer and use it in GitHub Desktop.
Save whatthejeff/6261532 to your computer and use it in GitHub Desktop.
.travis.yaml for PHP extensions
language: php
php:
- 5.3
- 5.4
- 5.5
before_script:
- phpize
- ./configure --enable-EXTENSION_NAME
- make
- sed -i -e 's/save_or_mail_results();//g' -e 's/\($failed_test_data\['\''test_name'\''\] . $failed_test_data\['\''info'\''\]\)/str_repeat('\''='\'', 80) . "\\n" . \1 . "\\n" . str_repeat('\''='\'', 80) . "\\n" . file_get_contents(realpath($failed_test_data['\''output'\'']), FILE_BINARY) . "\\n" . str_repeat('\''='\'', 80) . "\\n" . file_get_contents(realpath($failed_test_data['\''diff'\'']), FILE_BINARY)/g' run-tests.php
- sed -i -e 's/-\(@if test ! -z\)/\1/' -e 's/rm $(top_builddir)\/tmp-php.ini;//' Makefile
script: REPORT_EXIT_STATUS=1 make test
@whatthejeff
Copy link
Author

To disable Xdebug, change:

sed -i -e 's/-\(@if test ! -z\)/\1/' -e 's/rm $(top_builddir)\/tmp-php.ini;//' Makefile

to:

sed -i -e 's/-\(@if test ! -z\)/\1/' -e 's/rm $(top_builddir)\/tmp-php.ini;//' -e 's/^\(.*TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \\\)/\t\t$(SED) -i '\''s\/^\\(.*xdebug.so\\)\/;\\1\/'\'' $\(top_builddir\)\/tmp-php.ini; \\\n\1/' Makefile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment