Skip to content

HTTPS clone URL

Subversion checkout URL

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