Test platform is
-
PHP 5.3.18RC1 (cli) (built: Oct 4 2012 04:16:53)
-
PEAR::Net_Growl 2.6.0
-
Windows XP / Vista
-
Growl for Windows 2.0.9.1
-
git version 1.7.11.msysgit.0
Dependencies
Sismo requires PHP 5.3 but also SQLite3.
Warning
|
Don’t forget to load extension in your php.ini |
extension=php_sqlite3.dll
Prepare environment
mkdir C:\UwAmp\bin\php\php-5.3.18\data\sismo
set SISMO_DATA_PATH=/UwAmp/bin/php/php-5.3.18/data/sismo
mkdir C:\UwAmp\bin\php\php-5.3.18\cfg\sismo
set SISMO_CONFIG_PATH=/UwAmp/bin/php/php-5.3.18/cfg/sismo/config.php
Configuration
<?php
$projects = array();
// create a Growl notifier (for MacOS X only; does not run on Windows)
$notifier = new Sismo\Notifier\GrowlNotifier('pa$$word');
$phpciProject = new Sismo\GithubProject('PHP_CompatInfo (local)', 'C:\home\github\php-compat-info', $notifier, 'phpci-local');
$phpciProject->setCommand('/UwAmp/bin/php/php-5.3.18/phpunit.bat -c tests/phpunit.xml');
$projects[] = $phpciProject;
return $projects;
?>
Caution
|
Take care to fully qualified the repository URL
but not as the linux format (even if Windows accept this format).
|
First run
C:\UwAmp\bin\php\php-5.3.18>php \UwAmp\www\sismo\sismo.php --verbose build
Building Project "PHP_CompatInfo (local)" (into "28e3ab")
OUT Running "git clone --progress --recursive "C:\home\github\php-compat-info" "/UwAmp/bin/php/php-5.3.18/data/sismo/build/28e3ab" --branch "master""
OUT Cloning into '/UwAmp/bin/php/php-5.3.18/data/sismo/build/28e3ab'...
OUT done.
OUT Running "git fetch origin"
OUT Running "git submodule update --init --recursive"
OUT Running "git checkout "origin/master""
OUT
ERR Note: checking out 'origin/master'.
ERR
ERR You are in 'detached HEAD' state. You can look around, make experimental
ERR changes and commit them, and you can discard any commits you make in this
ERR state without impacting any branches by performing another checkout.
ERR
ERR If you want to create a new branch to retain commits you create, you may
ERR do so (now or later) by using -b with the checkout command again. Example:
ERR
ERR git checkout -b new_branch_name
ERR
ERR HEAD is now at c42b9f2... PHP_Timer dependency became optional since its break PHP 5.2 compatibility (in version 1.0.4)
ERR
OUT Running "git reset --hard "c42b9f2ca3069bd0ddd2abbba2a248e14623547c""
OUT HEAD is now at c42b9f2 PHP_Timer dependency became optional since its break PHP 5.2 compatibility (in version 1.0.4)
OUT Running "git show -s --pretty=format:%H%n%an%n%ci%n%s%n "c42b9f2ca3069bd0ddd2abbba2a248e14623547c""
OUT c42b9f2ca3069bd0ddd2abbba2a248e14623547c
OUT Laurent Laville
OUT 2012-10-13 18:10:13 +0200
OUT PHP_Timer dependency became optional since its break PHP 5.2 compatibility (in version 1.0.4)
OUT
OUT C:\UwAmp\bin\php\php-5.3.18\data\sismo\build\28e3ab>/UwAmp/bin/php/php-5.3.18/phpunit.bat -c tests/phpunit.xml
OUT PHPUnit 3.7.7 by Sebastian Bergmann.
OUT
OUT Configuration read from C:\UwAmp\bin\php\php-5.3.18\data\sismo\build\28e3ab\tests\phpunit.xml
OUT
OUT ............................................................... 63 / 679 ( 9%)
OUT ........................................SS......SS..SSSSSSSSSSS 126 / 679 ( 18%)
OUT SSS......SSSSSSS....................SSSSSSS.............SSSSSSS 189 / 679 ( 27%)
OUT ......SSSSSSSSSSSSSS.............SSSSSSSSSSSSSSSSSSSSSSSSSSSS.. 252 / 679 ( 37%)
OUT ...........SSSSSSSSSSSSSSSSSSSSS......SSSSSSS......SSSSSSSSSSSS 315 / 679 ( 46%)
OUT SS.............SSSSSSSSSSSSSS......SSSSSSSSSSSSSSSSSSSSSSSSSSSS 378 / 679 ( 55%)
OUT SSSSSSSSSSSSSSSSSSSSS.............SSSSSSS......SSSSSSSSSSSSSSSS 441 / 679 ( 64%)
OUT SSSSS.............SSSSSSS......SSSSSSS......SSSSSSSSSSSSSSSSSSS 504 / 679 ( 74%)
OUT SSSSSSSSSSSSSSSS......SSSSSSS......SSSSSSSSSSSSSSSSSSSSSSSSSSSS 567 / 679 ( 83%)
OUT .............SSSSSSS......SSSSSSS.............SSSSSSS......SSSS 630 / 679 ( 92%)
OUT SSSSSSSSSS.............SSS.
OUT
OUT Time: 28 seconds, Memory: 200.50Mb
OUT
OUT OK, but incomplete or skipped tests!
OUT Tests: 397, Assertions: 4024, Skipped: 336.
OUT
Warning
|
But with none notification on GrowlForWindows. |
Growl notifier compatible MacOS X and Windows
<?php
// load the Sismo\Contrib\GrowlNotifier resource
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'GrowlNotifier.php';
$projects = array();
// create a Growl notifier compatible MacOS X and Windows
// defaults are: host = localhost, port = 9887, protocol = UDP
$notifier = new Sismo\Contrib\GrowlNotifier();
$phpciProject = new Sismo\GithubProject('PHP_CompatInfo (local)', 'C:\home\github\php-compat-info', $notifier, 'phpci-local');
$phpciProject->setCommand('/UwAmp/bin/php/php-5.3.18/phpunit.bat -c tests/phpunit.xml');
$projects[] = $phpciProject;
return $projects;
?>
Configure the GrowlNotifier
Note
|
See all options of PEAR::Net_Growl in the User Manual available online at http://growl.laurent-laville.org, or download a copy (different format) to read it offline. |
If you want to use the new GNTP protocol that allow more than just the old/basic UDP
<?php
// load the Sismo\Contrib\GrowlNotifier resource
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'GrowlNotifier.php';
$projects = array();
// create a Growl notifier compatible MacOS X and Windows
// host = localhost, port = 23053, protocol = GNTP
$application = 'sismo';
$notifications = array(
Sismo\Contrib\GrowlNotifier::NOTIFY_SUCCESS => array(
'sticky' => true,
'priority' => \Net_Growl::PRIORITY_NORMAL,
),
Sismo\Contrib\GrowlNotifier::NOTIFY_FAILURE => array(
'sticky' => true,
'priority' => \Net_Growl::PRIORITY_HIGH,
)
);
$password = 'pa$$word';
$options = array(
'protocol' => 'gntp',
);
$notifier = new Sismo\Contrib\GrowlNotifier($application, $notifications, $password, $options);
$phpciProject = new Sismo\GithubProject('PHP_CompatInfo (local)', 'C:\home\github\php-compat-info', $notifier, 'phpci-local');
$phpciProject->setCommand('/UwAmp/bin/php/php-5.3.18/phpunit.bat -c tests/phpunit.xml');
$projects[] = $phpciProject;
return $projects;
?>
Another run will display such notification in the top right corner (default) of the desktop
<?php
// load the Sismo\Contrib\GrowlNotifier resource
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'GrowlNotifier.php';
$projects = array();
$application = 'sismo';
$notifications = array(
Sismo\Contrib\GrowlNotifier::NOTIFY_SUCCESS => array(
'sticky' => true,
'icon' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pass.png',
),
Sismo\Contrib\GrowlNotifier::NOTIFY_FAILURE => array(
'sticky' => true,
'icon' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fail.png',
)
);
$password = 'pa$$word';
$options = array(
'protocol' => 'gntp',
'AppIcon' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'sismo_icon.png',
);
$notifier = new Sismo\Contrib\GrowlNotifier($application, $notifications, $password, $options);
$phpciProject = new Sismo\GithubProject('PHP_CompatInfo (local)', 'C:\home\github\php-compat-info', $notifier, 'phpci-local');
$phpciProject->setCommand('/UwAmp/bin/php/php-5.3.18/phpunit.bat -c tests/phpunit.xml');
$projects[] = $phpciProject;
return $projects;
?>
Another run will display such notification in the bottom right corner of the desktop
If you change the message format, with setMessageFormat("[%status_code%]\n%slug% (%short_sha%)\n%message%\n%author%") you will have a little different display
And the main panel of Growl for Windows became
There are lot of more configurable options with PEAR::Net_Growl, and now with the new sismo Growl notifier.