Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1d1a275
implements ArrayAccess, Iterator for config container.
c9s Apr 19, 2012
752a880
Update testing sample package.ini
c9s Apr 19, 2012
086fe31
Update test config
c9s Apr 19, 2012
b6f00a0
Add new INIParser class.
c9s Apr 19, 2012
fe71f60
ant-build CI config files
c9s May 23, 2012
18c0930
Merge branch 'master' into develop
c9s May 23, 2012
f48cc3f
Fix LibraryInstaller
c9s May 23, 2012
235798a
Fix package.ini style
c9s May 23, 2012
4bed0b9
Rename packages
c9s Jun 9, 2012
ecf3db0
progress handler setter
c9s Jun 9, 2012
1bc7ccd
check download size
c9s Jun 9, 2012
9b9bc2a
Rename bundle command to install command.
c9s Jun 9, 2012
e4a3cf5
Update todo
c9s Jun 9, 2012
04aa0d8
--quiet option support (curl downloader)
c9s Jun 9, 2012
c3a881c
Merge branch 'develop' of git.corneltek.com:php/Onion into develop
c9s Jun 14, 2012
41fe0e5
Update readme
c9s Jun 14, 2012
d215cb2
update readme for new command
c9s Jun 14, 2012
1252c72
Fix CurlKit class name
c9s Jun 19, 2012
185f1df
Remove PEARX tests
c9s Jun 19, 2012
b3a3887
remove tmp files
c9s Jun 19, 2012
aac1b01
Add tests/tmp to .gitignore file
c9s Jun 19, 2012
bb0ea97
Remvoe TestApp tests
c9s Jun 19, 2012
61c5ec1
Add new_package.ini
c9s Jun 19, 2012
0d59eec
remove var_dump
c9s Jun 19, 2012
b2367d0
rename getDownloader to createDownloader
c9s Jun 19, 2012
451c9a7
add base option to installer command
c9s Jun 19, 2012
fd5d944
document installer flow in doc/InstallerFlow.md
c9s Jun 19, 2012
e379380
use Onion\Installer
c9s Jun 19, 2012
828e2dd
Add workspace option to main Installer
c9s Jun 19, 2012
8687062
Update onion binary
c9s Jun 20, 2012
704953b
Let quiet option works!
c9s Jun 20, 2012
e50e312
Update onion binary
c9s Jun 20, 2012
167c786
Fix progress bar
c9s Jun 20, 2012
c1d806f
bump version
c9s Jun 23, 2012
43f7187
Build package.xml at 2012-06-23
c9s Jun 23, 2012
bd2d4ec
add script role
jaceju Jun 26, 2012
f680cee
Enable shell script role and fix installation.
jaceju Jun 26, 2012
8a9fd39
Use only bin folder to put shell script.
jaceju Jun 26, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ant-build CI config files
  • Loading branch information
c9s committed May 23, 2012
commit fe71f60e7a94526269037607d67263e7de67df99
185 changes: 185 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8"?>


<project name="Onion" default="build">

<taskdef resource="net/sf/antcontrib/antlib.xml"/>

<target name="build"
depends="prepare,bundle,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdox,phpunit,phpcb,package"/>

<target name="build-parallel"
depends="prepare,lint,tools-parallel,phpunit,phpcb"/>

<target name="tools-parallel" description="Run tools in parallel">
<parallel threadCount="2">
<sequential>
<antcall target="pdepend"/>
<antcall target="phpmd-ci"/>
</sequential>
<antcall target="phpcpd"/>
<antcall target="phpcs-ci"/>
<antcall target="phploc"/>
<antcall target="phpdox"/>
</parallel>
</target>

<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/api"/>
<delete dir="${basedir}/build/code-browser"/>
<delete dir="${basedir}/build/coverage"/>
<delete dir="${basedir}/build/logs"/>
<delete dir="${basedir}/build/pdepend"/>
</target>

<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/code-browser"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
<mkdir dir="${basedir}/build/phpdox"/>
</target>

<target name="lint" description="Perform syntax check of sourcecode files">
<apply executable="php" failonerror="true">
<arg value="-l" />

<fileset dir="${basedir}/src">
<include name="**/*.php" />
<modified />
</fileset>

<fileset dir="${basedir}/tests">
<include name="**/*.php" />
<modified />
</fileset>
</apply>
</target>

<target name="phploc" description="Measure project size using PHPLOC">
<exec executable="phploc">
<arg value="--log-csv" />
<arg value="${basedir}/build/logs/phploc.csv" />
<arg path="${basedir}/src" />
</exec>
</target>

<target name="pdepend" description="Calculate software metrics using PHP_Depend">
<exec executable="pdepend">
<arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
<arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
<arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
<arg path="${basedir}/src" />
</exec>
</target>

<target name="phpmd"
description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing.">
<exec executable="phpmd">
<arg path="${basedir}/src" />
<arg value="text" />
<arg value="${basedir}/build/phpmd.xml" />
</exec>
</target>

<target name="phpmd-ci" description="Perform project mess detection using PHPMD creating a log file for the continuous integration server">
<exec executable="phpmd">
<arg path="${basedir}/src" />
<arg value="xml" />
<arg value="${basedir}/build/phpmd.xml" />
<arg value="--reportfile" />
<arg value="${basedir}/build/logs/pmd.xml" />
</exec>
</target>

<target name="phpcs"
description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
<exec executable="phpcs">
<arg value="--standard=${basedir}/build/phpcs.xml" />
<arg path="${basedir}/src" />
</exec>
</target>

<target name="phpcs-ci" description="Find coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server">
<exec executable="phpcs" output="/dev/null">
<arg value="--report=checkstyle" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=${basedir}/build/phpcs.xml" />
<arg path="${basedir}/src" />
</exec>
</target>

<target name="phpcpd" description="Find duplicate code using PHPCPD">
<exec executable="phpcpd">
<arg value="--log-pmd" />
<arg value="${basedir}/build/logs/pmd-cpd.xml" />
<arg path="${basedir}/src" />
</exec>
</target>

<target name="phpdox" description="Generate API documentation using phpDox">
<exec executable="phpdox"/>
</target>

<target name="bundle">
<if>
<available file="package.ini"/>
<then>
<exec executable="onion" failonerror="true">
<arg value="-q"/>
<arg value="bundle"/>
</exec>
</then>
</if>
</target>

<target name="package">
<if>
<available file="scripts/compile.sh"/>
<then>
<exec executable="bash" failonerror="true">
<arg value="scripts/compile.sh"/>
</exec>
</then>
</if>
<if>
<available file="package.ini"/>
<then>
<exec executable="onion" failonerror="true">
<arg value="-d"/>
<arg value="build"/>
</exec>
</then>
</if>
</target>

<!-- may we have a simple condition for phpunit.xml and phpunit-ci.xml ? -->
<target name="phpunit" description="Run unit tests with PHPUnit">

<if>
<available file="phpunit-ci.xml"/>
<then>
<exec executable="phpunit" failonerror="true">
<arg value="--configuration"/>
<arg value="${basedir}/phpunit-ci.xml"/>
</exec>
</then>
<else>
<exec executable="phpunit" failonerror="true"/>
</else>
</if>

</target>

<target name="phpcb" description="Aggregate tool output with PHP_CodeBrowser">
<exec executable="phpcb">
<arg value="--log" />
<arg path="${basedir}/build/logs" />
<arg value="--source" />
<arg path="${basedir}/src" />
<arg value="--output" />
<arg path="${basedir}/build/code-browser" />
</exec>
</target>
</project>
16 changes: 16 additions & 0 deletions phpdox.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpdox xmlns="http://phpdox.de/config" silent="false">
<project name="Onion" source="src" workdir="build/phpdox">
<collector publiconly="false">
<include mask="*.php" />
<exclude mask="*Autoload.php" />
</collector>

<generator output="build">
<build engine="html" enabled="true" output="api"/>
<build engine="graph" enabled="true" output="graph">
<dot executable="/usr/bin/dot" render="true" format="png" />
</build>
</generator>
</project>
</phpdox>
29 changes: 29 additions & 0 deletions phpunit-ci.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="tests/bootstrap.php"
backupGlobals="false"
colors="true"
verbose="true">
<php>

<!-- Unit Testing Variables -->
<!--
<var name="VAR" value="Values" />
-->

</php>

<testsuites>
<testsuite name="PHPUnit">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>

<logging>
<log type="coverage-html" target="build/coverage" title="Onion"
charset="UTF-8" yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="junit" target="build/logs/junit.xml"
logIncompleteSkipped="false"/>
</logging>
</phpunit>