forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
102 lines (92 loc) · 3.22 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
101
102
<?xml version="1.0" encoding="UTF-8"?>
<project name="dolibarr" default="hudson" basedir=".">
fdfds
<!-- Exclude/ignore paths -->
<property name="ignorepaths" value="${basedir}/htdocs/conf,${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes" />
<property name="ignoreregexp" value="**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*" />
<target name="clean">
<!-- Clean up -->
<delete dir="${basedir}/hudson"/>
<delete dir="${basedir}/generatedJUnitFiles"/>
<!-- Create build directories -->
<mkdir dir="${basedir}/hudson/doxygen"/>
<mkdir dir="${basedir}/hudson/logs"/>
<mkdir dir="${basedir}/hudson/coverage"/>
</target>
<!-- Run phpmd, phpcpd, phpcs, doxygen and phploc in parallel -->
<target name="parallelTasks">
<parallel>
<!-- <antcall target="phpmd"/> -->
<antcall target="phpcpd"/>
<!-- <antcall target="phpcs"/> -->
<antcall target="doxygen"/>
<antcall target="phploc"/>
</parallel>
</target>
<!-- Generate pmd.xml -->
<!--
<target name="phpmd">
<exec executable="phpmd">
<arg line="htdocs xml codesize,unusedcode
-\-reportfile '${basedir}/hudson/logs/pmd.xml'
-\-ignore=${ignorepaths}
" />
</exec>
</target>
-->
<!-- Generate pmd-cpd.xml -->
<target name="phpcpd">
<exec executable="phpcpd">
<arg line=" --log-pmd '${basedir}/hudson/logs/pmd-cpd.xml'
--exclude '${basedir}/htdocs/conf'
--exclude '${basedir}/htdocs/core/filemanagerdol'
--exclude '${basedir}/htdocs/includes'
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
--min-tokens 70
--min-lines 20
htdocs
" />
</exec>
</target>
<!-- Generate phploc.csv -->
<target name="phploc">
<exec executable="phploc">
<arg line=" --log-csv '${basedir}/hudson/logs/phploc.csv'
--exclude '${basedir}/htdocs/conf'
--exclude '${basedir}/htdocs/core/filemanagerdol'
--exclude '${basedir}/htdocs/includes'
--exclude '**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*'
htdocs
" />
</exec>
</target>
<!-- Generate checkstyle.xml -->
<target name="phpcs">
<exec executable="phpcs" dir="${basedir}">
<arg line=" --standard=${basedir}/dev/codesniffer/jenkins_ruleset.xml
--report=checkstyle
--report-file=${basedir}/hudson/logs/checkstyle.xml
--ignore=${ignorepaths},${ignoreregexp}
htdocs
"/>
</exec>
</target>
<!-- Run unit tests and generate junit.xml and clover.xml -->
<target name="phpunit">
<exec executable="phpunit" dir="${basedir}" failonerror="true">
<arg line=" --configuration ${basedir}/test/phpunit/phpunittest.xml
--log-junit ${basedir}/hudson/logs/junit.xml
--coverage-clover ${basedir}/hudson/coverage/clover.xml
--coverage-html ${basedir}/hudson/coverage/
test/phpunit/AllTests.php
"/>
</exec>
</target>
<!-- Generate Doxygen documentation -->
<target name="doxygen" description="Dolibarr documentation" >
<exec executable="doxygen" dir="${basedir}" failonerror="false">
<arg value="${basedir}/build/doxygen/jenkins_doxygen.doxyfile"/>
</exec>
</target>
<target name="hudson" depends="clean,phpunit,phpcs,parallelTasks"/>
</project>