This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
executable file
·71 lines (61 loc) · 2.35 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="accountview" default="build">
<target name="build" depends="build-parallel"/>
<target name="build-parallel" depends="prepare,tools-parallel"/>
<target name="tools-parallel" description="Run tools in parallel">
<parallel threadCount="4">
<antcall target="lint"/>
<antcall target="phploc"/>
<antcall target="phpunit-unittests"/>
</parallel>
</target>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/api"/>
<delete dir="${basedir}/build/clover"/>
<delete dir="${basedir}/build/coverage"/>
<delete dir="${basedir}/build/logs"/>
</target>
<target name="prepare" depends="clean"
description="Prepare for build">
<mkdir dir="${basedir}/build/api"/>
<mkdir dir="${basedir}/build/clover"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
</target>
<target name="lint">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="**/*.php" />
<modified />
</fileset>
</apply>
</target>
<target name="phploc" description="Measure project size using PHPLOC">
<exec executable="phploc">
<arg value="--count-tests" />
<arg value="--log-csv" />
<arg value="${basedir}/build/logs/phploc.csv" />
<arg path="${basedir}/php" />
</exec>
</target>
<target name="phpdoc" description="Generate API documentation using PHPDocumentor">
<exec executable="phpdoc">
<arg value="--directory" />
<arg path="${basedir}" />
<arg value="--ignore" />
<arg value="*/tests/*,*/build/*" />
<arg value="--sourcecode" />
<arg value="--quiet" />
<arg value="--target" />
<arg path="${basedir}/build/api" />
</exec>
</target>
<target name="phpunit-unittests" description="Run unit tests with PHPUnit">
<!-- run the unit tests -->
<exec executable="phpunit">
<arg value="--configuration" />
<arg file="${basedir}/php/tests/phpunit.xml" />
</exec>
</target>
</project>