Commit Graph

8 Commits

Author SHA1 Message Date
Ben Ramsey e6ac8b0ef2 Add Dockerfile for HHVM image with PECL UUID installed 2016-02-14 02:17:34 -06:00
Ben Ramsey b822c113fa Update Docker build script to include libsodium 2016-02-13 23:21:18 -06:00
Ben Ramsey 47964f2cca Remove code-coverage logging from PHPUnit config 2016-02-13 20:28:50 -06:00
Ben Ramsey cdeed9e65a Apply coding standards to tests, as well 2015-12-17 12:09:17 -06:00
Ben Ramsey a9d17e7b54 Change PHP build env targets and move composer command to Docker image 2015-12-16 16:28:07 -06:00
Ben Ramsey 62a7237165 Fix directory name created from unzipping the XDebug package 2015-12-15 16:35:55 -06:00
Ben Ramsey 2b06ff6e3f Update the Docker image build script for PHP 7.0.0 2015-12-15 15:48:02 -06:00
Ben Ramsey 6d712900f4 Modify Travis CI builds to run tests on multiple CPU architectures
The ramsey/uuid library has requirements to run on 32-bit and 64-bit
systems, as well as little-endian and big-endian systems. Travis CI only
provides hardware for testing 64-bit, little-endian CPU architectures,
but they recently announced support for Docker[^1].

After some research, I found it is possible to use [QEMU][] with
[chroot][] jails on Travis CI to emulate other CPU architectures and run
tests through these chroot jails[^2]. Unfortunately, it takes an awful
long time to set up a chroot jail, build PHP within it, and run the
tests. It wasn't reasonable to expect to do this on every single push to
the ramsey/uuid repository. This is where Docker comes in.

I was able to create chroot jails for each architecture and version of
PHP combination I need to test and then turn these into Docker images,
which Travis is able to download and run fairly quickly. The instances
on which Travis CI is running their Docker services do not currently
support phpenv or php-build, so I needed to masquerade as a Python
project and specify all PHP versions and CPU architectures in
environment variables in my `.travis.yml` configuration. I run
`composer install` and report to Coveralls outside of the Docker images,
but all tests are run within the Docker images.

The Docker image I created for PHP 7.0.0RC4 on MIPS architecture
produces segfaults when attempting to build PHP with Phar. PHP builds
okay without Phar, but then it produces segfaults when running any PHP
script on the image, so I'm leaving out 7.0.0RC4 on MIPS for now.

The Docker images for use with ramsey/uuid tests are available here:
<https://hub.docker.com/r/benramsey/ramsey-uuid/>.

[^1]: "Using Docker on Travis
CI," <http://blog.travis-ci.com/2015-08-19-using-docker-on-travis-ci/>
[^2]: "Running Travis CI tests on ARM architecture,"
<https://www.tomaz.me/2013/12/02/running-travis-ci-tests-on-arm.html>

[qemu]: http://wiki.qemu.org/Main_Page
[chroot]: https://en.wikipedia.org/wiki/Chroot
2015-10-07 22:59:11 -05:00