-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
100 lines (86 loc) · 3.55 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?xml version="1.0" encoding="UTF-8"?>
<project name="Eadrax" default="main">
<property name="basedir" value="${project.basedir}" />
<property name="appdir" value="${basedir}/src" />
<property name="builddir" value="${basedir}/build" />
<target name="clean" description="Prep project for CI">
<delete dir="${builddir}" />
<mkdir dir="${builddir}" />
</target>
<target name="phpspec" description="Run PHPSpec">
<exec command="bin/phpspec run" passthru="true" />
</target>
<target name="phpcs" description="Run PHP_CodeSniffer">
<phpcodesniffer standard="Kohana">
<fileset dir="${appdir}">
<include name="**/*.php" />
</fileset>
</phpcodesniffer>
</target>
<target name="phpcs-log" description="Run PHP_CodeSniffer with CI log">
<phpcodesniffer standard="Kohana">
<fileset dir="${appdir}">
<include name="**/*.php" />
</fileset>
<formatter type="checkstyle" outfile="${builddir}/checkstyle-result.xml" />
</phpcodesniffer>
</target>
<target name="pdepend" description="Run pdepend">
<phpdepend>
<fileset dir="${appdir}">
<include name="**/*.php" />
</fileset>
<logger type="jdepend-xml" outfile="${builddir}/jdepend.xml" />
<logger type="jdepend-chart" outfile="${builddir}/dependencies.svg" />
<logger type="overview-pyramid" outfile="${builddir}/overview-pyramid.svg" />
</phpdepend>
</target>
<target name="phpmd" description="Run phpmd">
<exec command="phpmd ${appdir} text codesize,unusedcode,naming,design" passthru="true" />
</target>
<target name="phpmd-log" description="Run phpmd with CI log">
<exec command="phpmd ${appdir} text codesize,unusedcode,naming,design --reportfile ${builddir}/pmd.xml" passthru="true" />
</target>
<target name="phpcpd" description="Run phpcpd">
<phpcpd>
<fileset dir="${appdir}">
<include name="**/*.php" />
</fileset>
</phpcpd>
</target>
<target name="phpcpd-log" description="Run phpcpd with CI log">
<phpcpd>
<fileset dir="${appdir}">
<include name="**/*.php" />
</fileset>
<formatter type="pmd" outfile="${builddir}/cpd.xml" />
</phpcpd>
</target>
<target name="phpdcd" description="Run phpdcd">
<exec command="phpdcd" passthru="true" />
</target>
<target name="phpdoc2" description="Run phpDocumentor2">
<exec command="phpdoc --title=Eadrax -t ${basedir}/docs/ -d ${appdir}/" passthru="true" />
</target>
<target name="main" description="Run tests - minimum requirement for a push">
<phingcall target="phpspec" />
</target>
<target name="all" description="Run everything" depends="clean">
<phingcall target="phpspec" />
<phingcall target="phpcs" />
<phingcall target="pdepend" />
<phingcall target="phpmd" />
<phingcall target="phpcpd" />
<phingcall target="phpdcd" />
<phingcall target="phpdoc2" />
</target>
<target name="all-log" description="Run everything with CI logs" depends="clean">
<phingcall target="phpspec" />
<phingcall target="phpcs-log" />
<phingcall target="pdepend" />
<phingcall target="phpmd-log" />
<phingcall target="phpcpd-log" />
<phingcall target="phpdcd" />
<phingcall target="phpdoc2" />
</target>
</project>