blob: c78c8196146254e51026cfbf5dde799e203b7cb0 [file] [log] [blame]
david_williams12def432010-08-09 04:42:21 +00001<?xml version="1.0" encoding="UTF-8"?>
2<project
3 default="build"
4 basedir=".">
david_williams2398e362011-03-05 02:45:39 +00005 <fail unless="wtp.builder.home"/>
6 <property file="${wtp.builder.home}/build.properties"/>
7 <property environment="env"/>
david_williams12def432010-08-09 04:42:21 +00008
9 <!-- required to get proper value of doCreateFprojZips -->
10 <property
11 name="keyCfgFile"
12 value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
13 <echo
14 level="info"
15 message="keyCfgFile: ${keyCfgFile}"/>
david_williams2398e362011-03-05 02:45:39 +000016 <property file="${keyCfgFile}"/>
david_williams12def432010-08-09 04:42:21 +000017
david_williams2398e362011-03-05 02:45:39 +000018 <echo message="transformedRepoLocation: ${transformedRepoLocation}"/>
19 <mkdir dir="${transformedRepoLocation}"/>
david_williams12def432010-08-09 04:42:21 +000020
21
22 <!-- main -->
23 <target
24 name="build"
25 depends="getBaseBuilder">
david_williamsdbd6bfb2010-09-14 12:47:34 +000026
27 <echoproperties/>
28
david_williams12def432010-08-09 04:42:21 +000029 <dirname
30 file="${ant.file}"
31 property="distribution.wtp.build.dir"/>
32 <property
33 name="buildTargets"
34 value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
35
david_williams2398e362011-03-05 02:45:39 +000036 <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/>
david_williamsc3660802011-02-13 05:29:58 +000037
david_williams12def432010-08-09 04:42:21 +000038 <property
39 name="dependency.properties"
40 value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/>
41
42
david_williams12def432010-08-09 04:42:21 +000043 <echo
44 level="info"
45 message="invoking buildTargets: ${buildTargets} to build for each component"/>
david_williams2398e362011-03-05 02:45:39 +000046 <ant antfile="${buildTargets}">
david_williams12def432010-08-09 04:42:21 +000047 <property
48 name="component"
david_williams8fc1bb42011-02-14 04:43:11 +000049 value="wst4x-sdk"/>
david_williams12def432010-08-09 04:42:21 +000050 </ant>
david_williams2398e362011-03-05 02:45:39 +000051 <ant antfile="${buildTargets}">
david_williams12def432010-08-09 04:42:21 +000052 <property
53 name="component"
david_williams8fc1bb42011-02-14 04:43:11 +000054 value="wst4x.tests"/>
david_williams12def432010-08-09 04:42:21 +000055 </ant>
david_williams2398e362011-03-05 02:45:39 +000056 <ant antfile="${buildTargets}">
david_williams12def432010-08-09 04:42:21 +000057 <property
58 name="component"
david_williams8fc1bb42011-02-14 04:43:11 +000059 value="jst4x-sdk"/>
david_williams12def432010-08-09 04:42:21 +000060 </ant>
david_williams2398e362011-03-05 02:45:39 +000061 <ant antfile="${buildTargets}">
david_williams12def432010-08-09 04:42:21 +000062 <property
63 name="component"
david_williams8fc1bb42011-02-14 04:43:11 +000064 value="jst4x.tests"/>
david_williams12def432010-08-09 04:42:21 +000065 </ant>
66
david_williams2398e362011-03-05 02:45:39 +000067 <ant antfile="${buildTargets}">
david_williams12def432010-08-09 04:42:21 +000068 <property
69 name="component"
david_williams8fc1bb42011-02-14 04:43:11 +000070 value="dali4x-sdk"/>
david_williams12def432010-08-09 04:42:21 +000071 </ant>
72
73
david_williams2398e362011-03-05 02:45:39 +000074 <ant antfile="${buildTargets}">
david_williams12def432010-08-09 04:42:21 +000075 <property
76 name="component"
david_williams8fc1bb42011-02-14 04:43:11 +000077 value="dali4x.tests"/>
david_williams12def432010-08-09 04:42:21 +000078 </ant>
79
david_williams09c63622010-08-24 03:36:33 +000080 <!-- copy early, if we can ... else site won't be created, if we fail -->
david_williams2398e362011-03-05 02:45:39 +000081 <ant antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/>
david_williams7e568c72010-09-12 09:04:15 +000082
david_williams2398e362011-03-05 02:45:39 +000083 <antcall target="handleCompilationProblems"/>
david_williams09c63622010-08-24 03:36:33 +000084
david_williams12def432010-08-09 04:42:21 +000085
david_williamsc3660802011-02-13 05:29:58 +000086
david_williams12def432010-08-09 04:42:21 +000087 </target>
88
david_williams09c63622010-08-24 03:36:33 +000089 <target
90 name="handleCompilationProblems"
91 depends="checkIfCompileProblems"
92 if="compilation.problem.found">
93
94 <!-- if there is a problem, leave a marker file in download directory, so the webpage can
95 describe what happened -->
96
97 <echo
98 message="Compilation problems were found"
99 file="${buildDirectory}/${buildLabel}/compilationProblems.txt"/>
100
david_williams1e7513b2010-08-24 04:56:39 +0000101 <!-- always force an early copy, before fail, so all results and files get to "downloads" area -->
david_williams2398e362011-03-05 02:45:39 +0000102 <ant antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/>
david_williams09c63622010-08-24 03:36:33 +0000103 <fail
104 if="compilation.problem.found"
105 message="The remaining build and tests were canceled since compilation problems were found."/>
106 </target>
107
108
david_williams2398e362011-03-05 02:45:39 +0000109 <target name="checkIfCompileProblems">
david_williams09c63622010-08-24 03:36:33 +0000110 <!--
111 Not sure how reliable the presence of this 'compilation.problem' file is ...
112 I just noticed it in recent PDE builds with compile problems.
113 May have to make this "fancier" in future.
114 For now, looks only one level down in plugins directory (in build's workdir) for a file with
115 the name 'complilation.problem'. We may have a "summary" in xml file format, summarizing logs,
116 ... but not sure then created (during site? We'd have to call site first. This way, we'll see if the match :) .
117 -->
118 <available
119 file="compilation.problem"
120 type="file"
121 property="compilation.problem.found">
122 <filepath>
david_williams2398e362011-03-05 02:45:39 +0000123 <dirset dir="${buildDirectory}">
124 <include name="plugins/*"/>
david_williams09c63622010-08-24 03:36:33 +0000125 </dirset>
126
127 </filepath>
128 </available>
david_williams2398e362011-03-05 02:45:39 +0000129 <echo message="compilation.problem path buildDirectory: ${buildDirectory}/plugins/*/"/>
david_williams09c63622010-08-24 03:36:33 +0000130 </target>
131
david_williams12def432010-08-09 04:42:21 +0000132 <!-- invoking runbuild.xml targetting getBaseBuilder -->
133 <target
134 name="getBaseBuilder"
135 if="eclipse.builder.fetch">
136 <dirname
137 file="${ant.file}"
138 property="wtbuilder.dir"/>
139 <property
140 name="buildTargets"
141 value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
142 <echo
143 level="info"
144 message="invoking buildTargets: ${buildTargets} -> getBaseBuilder"/>
145 <ant
146 antfile="${buildTargets}"
147 target="getBaseBuilder"/>
148 </target>
david_williamsc3660802011-02-13 05:29:58 +0000149
150
151
152
david_williams12def432010-08-09 04:42:21 +0000153</project>