2 title: Testing PHP extensions on Travis-CI
8 Testing PECL extensions on Travis-CI has always been
9 cumbersome for me; build PHP in different versions and debug/threadsafe
10 flavors, install PECL dependencies and so on, which usually results in a mess
11 of command line scripts, repeated for every extension.
13 Enter [travis-pecl](https://github.com/m6w6/travis-pecl).
15 This tiny support bin comes with a Makefile and small PHP scripts to generate
16 the build matrix and check your package.xml file. It supports building PHP in
17 a wide variety of flavors, installing PECL dependencies from the PECL website
18 or from bundled [pharext](https://github.com/m6w6/pharext) packages and
19 running the testsuite with a comprehensive set of commands.
21 Let's look at a few commands with a properly set up environment from the test
26 - PHP=5.6 enable_debug=yes with_iconv=yes enable_json=yes
31 make -f travis/pecl/Makefile php
33 ### Install a PECL dependency:
35 make -f travis/pecl/Makefile pecl PECL=propro
37 ### Install a PECL dependency from a [pharext](https://github.com/m6w6/pharext) package, located in travis/:
39 make -f travis/pecl/Makefile pharext/raphf-phpng
41 ### Build the currently checked out extension:
43 make -f travis/pecl/Makefile ext PECL=http
45 ### Run the testsuite:
47 make -f travis/pecl/Makefile test
50 Finally, check out the [README](https://github.com/m6w6/travis-pecl/blob/master/README.md)
51 and have a look at a couple of complete examples here:
53 * [ext-apfd/gen_travis_yml.php](https://github.com/m6w6/ext-apfd/blob/master/gen_travis_yml.php)
54 * [ext-http/scripts/gen_travis_yml.php](https://github.com/m6w6/ext-http/blob/master/scripts/gen_travis_yml.php)