Skip to main content
summaryrefslogtreecommitdiffstats
blob: ee701d9c0dbfe42325037797b2826b07a177cf1d (plain) (blame)
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<project default="zips">

	<target name="build" depends="zips,test,updateSite"/>
	<target name="nightly" depends="build,upload,mail"/>
	<target name="integration" depends="zips,test,wswbmap,mail"/>
	<target name="milestone" depends="nightly,milestoneSite"/>
	
	<target name="init">
		<touch file="${user.home}/.cvspass" />
		<tstamp/>
		<property name="timestamp" value="${DSTAMP}${TSTAMP}" />
		<property name="buildDirectory" value="${basedir}/results" />
		<property name="baseLocation" value="${buildDirectory}/eclipse"/>
		<property name="pde.build.scripts" value="${basedir}/../org.eclipse.releng.basebuilder/plugins/org.eclipse.pde.build_3.0.0/scripts"/>
		<property name="eclipseZip" value="eclipse-SDK.zip"/>
		<property name="collectingFolder" value="eclipse"/>
		<property name="archivePrefix" value="eclipse"/>
		<property name="buildType" value="I" />
		<property name="buildId" value="${buildType}${timestamp}"/>
		<property name="siteurl" value="http://update.eclipse.org/tools/cdt/updates/builds/2.0"/>
		<property name="remotedir" value="/home/www/tools/cdt/updates/builds/2.0"/>
		<property name="zipsdir" value="${buildDirectory}/${buildType}.${buildId}"/>
		<property name="sitedir" value="${buildDirectory}/build.site"/>
		<property name="siteversion" value="2.0.0"/>
		<property name="milestonedir" value="${buildDirectory}/${milestone}"/>
		<property name="buildingOSGi" value="true"/>
		<property name="messagefile" value="message.in"/>
		<property name="mailto" value="cdt-test-dev@eclipse.org"/>
	</target>

	<target name="zips" depends="init">
		<unzip src="${eclipseZip}" dest="${buildDirectory}"/>
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/platform" />
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/sdk" />
		</ant>
		<concat destfile="compile.log">
			<fileset dir="${buildDirectory}/plugins" includes="**/*.bin.log"/>
		</concat>
		<loadfile property="compileLog" srcFile="compile.log"/>
		<condition property="hasErrors">
			<contains string="${compileLog}" substring="ERROR"/>
		</condition>
	</target>

	<target name="test" depends="init" unless="hasErrors">
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/testing" />
		</ant>
		<!-- This depends on what platform we run the test, it would be
		     nice to figure this out on the fly -->
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-linux.gtk.x86.zip" dest="${buildDirectory}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.testing-${buildId}.zip" dest="${buildDirectory}"/>
		<copy todir="${buildDirectory}/eclipse/plugins/org.eclipse.test">
			<fileset dir="../org.eclipse.test"/>
		</copy>
		<copy todir="${buildDirectory}/eclipse/plugins/org.eclipse.ant.optional.junit">
			<fileset dir="../org.eclipse.ant.optional.junit"/>
		</copy>
		<ant antfile="test.xml" dir="${buildDirectory}/eclipse/plugins/org.eclipse.cdt.testing_${siteversion}">
			<property name="eclipse-home" value="${buildDirectory}/eclipse"/>
		</ant>
		<xslt style="${buildDirectory}/eclipse/plugins/org.eclipse.test/JUNIT.XSL"
			in="${buildDirectory}/eclipse/org.eclipse.cdt.testing.xml"
			out="${sitedir}/logs/${siteversion}.${timestamp}.html"/>
	</target>
	
	<target name="updateSite" depends="init" unless="hasErrors">
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-aix.motif.ppc.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-hpux.motif.PA_RISC.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-linux.gtk.x86.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-linux.motif.x86.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-qnx.photon.x86.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-solaris.motif.sparc.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-win32.win32.x86.zip" dest="${sitedir}"/>
		<antcall target="allPlugins">
			<param name="target" value="updateSrcPlugin"/>
			<param name="srcPlugin" value="org.eclipse.cdt.source"/>
		</antcall>
		<antcall target="updateSrcPlugin">
			<param name="id" value="org.eclipse.cdt.core.aix"/>
			<param name="srcPlugin" value="org.eclipse.cdt.source.aix.motif.ppc"/>
		</antcall>
		<antcall target="updateSrcPlugin">
			<param name="id" value="org.eclipse.cdt.core.linux"/>
			<param name="srcPlugin" value="org.eclipse.cdt.source.linux.motif.x86"/>
		</antcall>
		<antcall target="updateSrcPlugin">
			<param name="id" value="org.eclipse.cdt.core.linux"/>
			<param name="srcPlugin" value="org.eclipse.cdt.source.linux.gtk.x86"/>
		</antcall>
		<antcall target="updateSrcPlugin">
			<param name="id" value="org.eclipse.cdt.core.qnx"/>
			<param name="srcPlugin" value="org.eclipse.cdt.source.qnx.photon.x86"/>
		</antcall>
		<antcall target="updateSrcPlugin">
			<param name="id" value="org.eclipse.cdt.core.solaris"/>
			<param name="srcPlugin" value="org.eclipse.cdt.source.solaris.motif.sparc"/>
		</antcall>
		<antcall target="updateSrcPlugin">
			<param name="id" value="org.eclipse.cdt.core.win32"/>
			<param name="srcPlugin" value="org.eclipse.cdt.source.win32.win32.x86"/>
		</antcall>
		<antcall target="allElements">
			<param name="target" value="updateJars"/>
		</antcall>
		<delete dir="${sitedir}/eclipse"/>
		<get src="${siteurl}/site.xml" dest="${sitedir}/site.xml"/>
		<xslt style="site.xsl" in="${sitedir}/site.xml" out="x">
			<param name="version" expression="${siteversion}.${timestamp}"/>
		</xslt>
		<move file="x" tofile="${sitedir}/site.xml"/>
		<xslt style="index.xsl" in="${sitedir}/site.xml" out="${sitedir}/index.html"/>
		<copy todir="${sitedir}/zips/${buildId}">
			<fileset dir="${zipsdir}"/>
		</copy>
	</target>

	<target name="updateSrcPlugin">
		<move todir="${sitedir}/eclipse/plugins/${srcPlugin}_${siteversion}/src/${id}_${siteversion}.${timestamp}">
			<fileset dir="${sitedir}/eclipse/plugins/${srcPlugin}_${siteversion}/src/${id}_${siteversion}"/>
		</move>
	</target>

	<target name="updateJars">
		<xslt style="plugin.xsl" in="${sitedir}/eclipse/${dir}/${id}_${siteversion}/${type}.xml" out="x">
			<param name="version" expression="${siteversion}.${timestamp}"/>
		</xslt>
		<move file="x" tofile="${sitedir}/eclipse/${dir}/${id}_${siteversion}/${type}.xml"/>
		<mkdir dir="${sitedir}/${dir}"/>
		<zip basedir="${sitedir}/eclipse/${dir}/${id}_${siteversion}"
		     zipfile="${sitedir}/${dir}/${id}_${siteversion}.${timestamp}.jar"/>
	</target>

	<target name="milestoneSite" depends="init" unless="hasErrors">
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-aix.motif.ppc.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-hpux.motif.PA_RISC.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-linux.gtk.x86.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-linux.motif.x86.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-qnx.photon.x86.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-solaris.motif.sparc.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-win32.win32.x86.zip" dest="${milestonedir}"/>
		<antcall target="allElements">
			<param name="target" value="milestoneJars"/>
		</antcall>
		<copy file="site.in" tofile="${milestonedir}/site.xml"/>
		<replace file="${milestonedir}/site.xml" token="@milestone@" value="${milestone}"/>
		<delete dir="${milestonedir}/eclipse"/>
	</target>

	<target name="milestoneJars">
		<mkdir dir="${milestonedir}/${dir}"/>
		<jar basedir="${milestonedir}/eclipse/${dir}/${id}_${siteversion}"
			 destfile="${milestonedir}/${dir}/${id}_${siteversion}.jar"/>
	</target>
	
	<target name="upload" depends="init" unless="hasErrors">
		<ftp server="update.eclipse.org" userid="${cdtuser}" password="${cdtpasswd}"
			remotedir="${remotedir}" action="put" verbose="yes">
			<fileset dir="${sitedir}"/>
		</ftp>
	</target>
	
	<target name="wswbmap" depends="init" unless="hasErrors">
		<xslt style="${buildDirectory}/eclipse/plugins/org.eclipse.test/JUNIT.XSL"
			in="${buildDirectory}/eclipse/org.eclipse.cdt.testing.xml"
			out="${zipsdir}/index.html"/>
		<copy file="cdt-map.in" tofile="cdt-map.txt" overwrite="true"/>
		<replace file="cdt-map.txt" token="@buildId@" value="${buildId}"/>
		<ftp server="update.eclipse.org" userid="${cdtuser}" password="${cdtpasswd}"
			remotedir="/home/www/tools/cdt/wswb" action="put" verbose="yes">
			<fileset file="cdt-map.txt"/>
		</ftp>
		<ftp server="update.eclipse.org" userid="${cdtuser}" password="${cdtpasswd}"
			remotedir="/home/www/tools/cdt/wswb/${buildId}" action="mkdir" verbose="yes"/>
		<ftp server="update.eclipse.org" userid="${cdtuser}" password="${cdtpasswd}"
			remotedir="/home/www/tools/cdt/wswb/${buildId}" action="put" verbose="yes">
			<fileset dir="${zipsdir}"/>
		</ftp>
	</target>

	<target name="mail" depends="init">
		<antcall target="mailPass"/>
		<antcall target="mailFail"/>
	</target>
	
	<target name="mailPass" unless="hasErrors">
		<copy file="${messagefile}" tofile="message.txt" overwrite="true"/>
		<replace file="message.txt" token="@buildId@" value="${buildId}"/>
		<concat destfile="mail.txt">
			<filelist dir="${basedir}" files="message.txt,compile.log"/>
		</concat>
		<mail subject="CDT Build ${siteversion}.${timestamp} completed"
			tolist="${mailto}" from="dschaefe@ca.ibm.com">
			<message src="mail.txt"/>
		</mail>
	</target>

	<target name="mailFail" if="hasErrors">
		<mail subject="CDT Build ${siteversion}.${timestamp} failed"
			tolist="${mailto}" from="dschaefe@ca.ibm.com">
			<message src="compile.log"/>
		</mail>
	</target>

	<target name="allPlugins">
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.core"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.debug.core"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.debug.mi.core"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.debug.mi.ui"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.debug.ui"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.launch"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.make.core"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.make.ui"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.managedbuilder.core"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.managedbuilder.ui"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.ui"/>
 		</antcall>
	</target>

 	<target name="allElements">
		<antcall target="allPlugins"/>
 		<antcall target="${target}">
 			<param name="type" value="feature"/>
 			<param name="dir" value="features"/>
 			<param name="id" value="org.eclipse.cdt"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="feature"/>
 			<param name="dir" value="features"/>
 			<param name="id" value="org.eclipse.cdt.sdk"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.sdk"/>
 		</antcall>
		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.core.aix"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.core.linux"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.core.qnx"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.core.solaris"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.core.win32"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.doc.user"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="feature"/>
 			<param name="dir" value="features"/>
 			<param name="id" value="org.eclipse.cdt.source"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.source"/>
 		</antcall>
  		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.source.aix.motif.ppc"/>
 		</antcall>
 		<!--antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.source.hpux.motif.PA_RISC"/>
 		</antcall-->
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.source.linux.gtk.x86"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.source.linux.motif.x86"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.source.qnx.photon.x86"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.source.solaris.motif.sparc"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="fragment"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.source.win32.win32.x86"/>
 		</antcall>
  	</target>

</project>

Back to the top