Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 127 lines (110 sloc) 4.307 kb
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <project name="joomla-platform" default="build" basedir=".">
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
4 <property name="source" value="libraries" />
0ff0d99 @realityking Add the legacy and compat folders to the phpmd check.
realityking authored
5 <property name="joomlasource" value="libraries/joomla,libraries/legacy,libraries/compat,libraries/platform.php,libraries/loader.php,libraries/import.php" />
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
6
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
7 <target name="clean" description="Clean up and create artifact directories">
8 <delete dir="${basedir}/build/api" />
9 <delete dir="${basedir}/build/code-browser" />
10 <delete dir="${basedir}/build/coverage" />
11 <delete dir="${basedir}/build/logs" />
12 <delete dir="${basedir}/build/pdepend" />
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
13
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
14 <mkdir dir="${basedir}/build/api" />
15 <mkdir dir="${basedir}/build/code-browser" />
16 <mkdir dir="${basedir}/build/coverage" />
17 <mkdir dir="${basedir}/build/logs" />
18 <mkdir dir="${basedir}/build/pdepend" />
19 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
20
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
21 <target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
22 <exec executable="phpunit" />
23 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
24
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
25 <target name="phpunit-legacy" description="Run legacy tests using PHPUnit and generates junit.legacy.xml and clover.legacy.xml">
26 <exec executable="phpunit">
65ceccc @LouisLandry Fixing unit tests after re-organization.
LouisLandry authored
27 <arg value="-c" />
28 <arg value="legacy.xml.dist" />
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
29 </exec>
30 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
31
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
32 <target name="parallelTasks" description="Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks in parallel using a maximum of 2 threads.">
33 <parallel threadCount="2">
34 <sequential>
35 <antcall target="pdepend" />
36 <antcall target="phpmd" />
37 </sequential>
38 <antcall target="phpcpd" />
39 <antcall target="phpcs" />
40 <antcall target="phpdoc" />
41 <antcall target="phploc" />
42 </parallel>
43 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
44
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
45 <target name="pdepend" description="Generate jdepend.xml and software metrics charts using PHP_Depend">
46 <exec executable="pdepend">
47 <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
48 <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
49 <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
50 <arg path="${source}" />
51 </exec>
52 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
53
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
54 <target name="phpmd" description="Generate pmd.xml using PHPMD">
55 <exec executable="phpmd">
56 <arg path="${joomlasource}" />
57 <arg value="xml" />
58 <arg value="${basedir}/build/phpmd.xml" />
59 <arg value="--reportfile" />
60 <arg value="${basedir}/build/logs/pmd.xml" />
61 </exec>
62 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
63
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
64 <target name="phpcpd" description="Generate pmd-cpd.xml using PHPCPD">
65 <exec executable="phpcpd">
66 <arg value="--log-pmd" />
67 <arg value="${basedir}/build/logs/pmd-cpd.xml" />
68 <arg path="${source}/joomla" />
69 </exec>
70 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
71
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
72 <target name="phploc" description="Generate phploc.csv">
73 <exec executable="phploc">
74 <arg value="--log-csv" />
75 <arg value="${basedir}/build/logs/phploc.csv" />
76 <arg path="${source}/joomla" />
77 </exec>
78 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
79
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
80 <target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
81 <exec executable="phpcs">
82 <arg value="--report=checkstyle" />
83 <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
84 <arg value="--standard=${basedir}/build/phpcs/Joomla" />
85 <arg value="--ignore=${source}/phpmailer,${source}/phputf8,${source}/simplepie/,${source}/config.example.php" />
86 <arg path="${source}" />
87 </exec>
88 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
89
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
90 <target name="phpdoc" description="Generate API documentation using PHPDocumentor">
91 <exec executable="phpdox">
92 <arg value="-c" />
93 <arg path="${source}" />
94 <arg value="-d" />
95 <arg path="${basedir}/build/api" />
96 <arg value="-x" />
97 <arg path="${basedir}/build/docs" />
98 <arg value="-g" />
99 <arg value="html" />
100 </exec>
101 </target>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
102
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
103 <target name="phpcb" description="Aggregate tool output with PHP_CodeBrowser">
104 <exec executable="phpcb">
105 <arg value="--log" />
106 <arg path="${basedir}/build/logs" />
107 <arg value="--source" />
108 <arg path="${source}" />
109 <arg value="--output" />
110 <arg path="${basedir}/build/code-browser" />
111 </exec>
112 </target>
113
4899ff7 @realityking Add a lint target to build.xml and fix an error found by it.
realityking authored
114 <target name="lint" description="Perform syntax check of sourcecode files">
115 <apply executable="php" failonerror="true">
116 <arg value="-l" />
117
118 <fileset dir="${source}">
119 <include name="**/*.php" />
120 <modified />
121 </fileset>
122 </apply>
123 </target>
124
b6db641 @LouisLandry Moving the legacy tests into their own suite.
LouisLandry authored
125 <target name="build" depends="clean,phpunit,phpunit-legacy,parallelTasks,phpcb" />
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
126 </project>
Something went wrong with that request. Please try again.