Page MenuHomeDevCentral

Improve Ant build file
Closed, ResolvedPublic

Description

Some suggested changes for Ant build.xml:

  • we MUST run composer update: if new dependencies are added, we NEED them
  • try to run in // the static analysis tools: we've several cores on the servers
  • we don't need documentation for -phab Jenkins job, only for full-build (-php), but we still need unit test code coverage (we wouldn't if Phabricator would be more greedy for coverage)

Event Timeline

On CI container slaves, I suggest, we disable XDebug by default, and wrap phpunit to use a configuration file with XDebug:

Remove PHPUnit symlink and XDebug config
$ mv /usr/local/etc/php/conf.d/xdebug.ini /opt/php-xdebug.ini
$ rm /usr/local/bin/phpunit
$ cat > /usr/local/bin/phpunit
[…]
$ chmod +x /usr/local/bin/phpunit
/usr/local/bin/phpunit
#!/bin/sh
php -c /opt/php-xdebug.ini /opt/phpunit.phar $@

So everything will run without XDebug, excepted PHPUnit.

/usr/local/bin/phpunit
#!/usr/bin/env bash
if [[ "$@" =~ "--no-coverage" ]]; then
        OPTS=""
else
        OPTS="-c /opt/php-xdebug.ini"
fi
php $OPTS /opt/phpunit.phar $@