Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 8acd129152430041d386c647a636fb4fae5c6e9c (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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<project default="build">

	<target name="hi">
		<echo message="${eclipse.home}"/>
	</target>
	
	<target name="build" depends="zips,sign,test"/>
	<target name="nightly" depends="tag,zips,sign,test,copy"/>
	
	<target name="cdtbuild" depends="tag,zips,test,upload"/>
	
	<target name="init">
		<touch file="${user.home}/.cvspass" />
		<tstamp/>
		<property name="branchVersion" value="4.0.1"/>
		<property name="timestamp" value="${DSTAMP}${TSTAMP}" />
		<property name="forceContextQualifier" value="${timestamp}"/>
		<property name="buildingOSGi" value="true"/>
		<property name="buildDirectory" value="${basedir}/results" />
		<property name="baseLocation" value="${buildDirectory}/eclipse"/>
		<property name="pde.build.scripts" value="${eclipse.home}/plugins/org.eclipse.pde.build/scripts"/>
		<property name="eclipseDist" value="eclipseDist undefined"/>
		<property name="collectingFolder" value="eclipse"/>
		<property name="archivePrefix" value="eclipse"/>
		<property name="buildType" value="I" />
		<property name="buildId" value="${buildType}${timestamp}"/>
		<property name="zipsdir" value="${buildDirectory}/${buildType}.${buildId}"/>
		<property name="masterFile" value="cdt-master-${branchVersion}-${buildId}.zip"/>
		<property name="eclipseTest" value="org.eclipse.test_3.2.0"/>
		<property name="messagefile" value="message.in"/>
		<property name="mailto" value="dschaefer@qnx.com"/>
		<property name="eclipseRoot" value=":pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse"/>
		<property name="baseos" value="${osgi.os}"/>
		<property name="basews" value="${osgi.ws}"/>
		<property name="basearch" value="${osgi.arch}"/>
		<property name="tagbranch" value=""/>
		<property name="tagname" value="v${timestamp}"/>
		<condition property="onWindows">
			<os family="windows"/>
		</condition>
		<mkdir dir="${buildDirectory}"/>
	</target>
	
	<target name="fetch" depends="init">
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
			<property name="builder" value="${basedir}/platform"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
			<property name="builder" value="${basedir}/sdk"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
			<property name="builder" value="${basedir}/gdbjtag"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
			<property name="builder" value="${basedir}/c99"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
			<property name="builder" value="${basedir}/upc"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="preBuild">
			<property name="builder" value="${basedir}/xlc"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
			<property name="builder" value="${basedir}/platform"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
			<property name="builder" value="${basedir}/sdk"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
			<property name="builder" value="${basedir}/gdbjtag"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
			<property name="builder" value="${basedir}/c99"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
			<property name="builder" value="${basedir}/upc"/>
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
			<property name="builder" value="${basedir}/xlc"/>
		</ant>
	</target>
	
	<target name="unzip" depends="init" unless="dontUnzip">
		<untar src="${eclipseDist}" dest="${buildDirectory}" compression="gzip"/>
	</target>
	
	<target name="zips" depends="init,unzip">
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/master" />
		</ant>
		<concat destfile="${zipsdir}/compilelog.txt">
			<fileset dir="${buildDirectory}/plugins" includes="**/*.bin.log"/>
		</concat>
		<loadfile property="compileLog" srcFile="${zipsdir}/compilelog.txt"/>
		<condition property="hasErrors">
			<contains string="${compileLog}" substring=" ERROR"/>
		</condition>
		<copy file="buildindex.html" tofile="${zipsdir}/index.html"/>
		<replace file="${zipsdir}/index.html">
			<replacefilter token="@branchVersion@" value="${branchVersion}"/>
			<replacefilter token="@buildId@" value="${buildId}"/>
		</replace>
		<move file="${zipsdir}/${masterFile}" todir="${buildDirectory}"/>
		<unzip src="${buildDirectory}/${masterFile}" dest="${buildDirectory}/site"/>
		<move file="${buildDirectory}/site/linux.gtk.x86/eclipse/epl-v10.html" todir="${buildDirectory}/site/eclipse"/>
		<move file="${buildDirectory}/site/linux.gtk.x86/eclipse/notice.html" todir="${buildDirectory}/site/eclipse"/>
		<copy file="buildsite.xml" tofile="${buildDirectory}/site/eclipse/site.xml"/>
		<replace file="${buildDirectory}/site/eclipse/site.xml">
			<replacefilter token="@buildVersion@" value="${branchVersion}.${timestamp}"/>
		</replace>
		<copy file="pack.properties" todir="${buildDirectory}/site/eclipse"/>
		<!-- for some reason LPG isn't getting picked up-->
		<copy file="${buildDirectory}/plugins/net.sourceforge.lpg.lpgjavaruntime_1.1.0.v200706111738.jar"
			todir="${buildDirectory}/site/eclipse/plugins"/>
		<zip destfile="${zipsdir}/${masterFile}"
			basedir="${buildDirectory}/site/eclipse"/>
	</target>

	<target name="test" depends="init" unless="hasErrors">
		<unzip src="${zipsdir}/cdt-master-${branchVersion}-${buildId}.zip"
			dest="${buildDirectory}/eclipse"/>
		<unjar src="${buildDirectory}/eclipse/plugins/org.eclipse.cdt.testing_${branchVersion}.${timestamp}.jar"
			dest="${buildDirectory}/eclipse/plugins/org.eclipse.cdt.testing_${branchVersion}.${timestamp}"/>
		<unjar src="${buildDirectory}/eclipse/plugins/${eclipseTest}.jar"
			dest="${buildDirectory}/eclipse/plugins/${eclipseTest}"/>
		<ant antfile="test.xml" dir="${buildDirectory}/eclipse/plugins/org.eclipse.cdt.testing_${branchVersion}.${forceContextQualifier}">
			<property name="eclipse-home" value="${buildDirectory}/eclipse"/>
			<property name="library-file" value="${buildDirectory}/eclipse/plugins/${eclipseTest}/library.xml"/>
			<property name="os" value="${baseos}"/>
			<property name="ws" value="${basews}"/>
			<property name="arch" value="${basearch}"/>
		</ant>
		<xslt style="${basedir}/JUNIT.XSL"
			in="${buildDirectory}/eclipse/org.eclipse.cdt.testing.xml"
			out="${zipsdir}/junits.html"/>
		<copy file="${buildDirectory}/eclipse/org.eclipse.cdt.testing.xml"
		    tofile="${zipsdir}/org.eclipse.cdt.testing.xml"
		    failonerror="false"/>
	</target>
	
	<target name="sign" depends="init" unless="hasErrors">
		<exec executable="sign">
			<arg value="/home/data/httpd/download-staging.priv/tools/cdt/releng/results/${buildType}.${buildId}/${masterFile}"/>
			<arg value="nomail"/>
			<arg value="/home/data/httpd/download-staging.priv/tools/cdt/releng/results/signed"/>
		</exec>
		<waitfor maxwait="30" maxwaitunit="minute">
			<available file="${buildDirectory}/signed/${masterFile}"/>
		</waitfor>
		<move file="${buildDirectory}/signed/${masterFile}" todir="${zipsdir}"/>
	</target>

	<target name="upload" depends="init" unless="hasErrors">
		<property name="remotedir" value="dschaefer@dev.eclipse.org:cdt/builds/${branchVersion}"/>
		<exec dir="${buildDirectory}" executable="scp">
			<arg line="${remotedir}/index.html index.html"/>
		</exec>
		<replace file="${buildDirectory}/index.html">
			<replacetoken><![CDATA[  <!-- add here -->]]></replacetoken>
			<replacevalue><![CDATA[  <li><a href="@buildType@.@buildId@/index.html">@buildId@</a></li>
  <!-- add here -->]]></replacevalue>
		</replace>
		<replace file="${buildDirectory}/index.html">
			<replacefilter token="@buildType@" value="${buildType}"/>
			<replacefilter token="@buildId@" value="${buildId}"/>
		</replace>
		<exec dir="${buildDirectory}" executable="scp">
			<arg line="index.html ${remotedir}/index.html"/>
		</exec>
		<exec dir="${buildDirectory}" executable="scp">
			<arg line="-r ${buildType}.${buildId} ${remotedir}"/>
		</exec>
	</target>
	
	<target name="copy" depends="init" unless="hasErrors">
		<property name="copyToDir" value="/home/www/tools/cdt/builds/${branchVersion}"/>
		<replace file="${copyToDir}/index.html">
			<replacetoken><![CDATA[  <!-- add here -->]]></replacetoken>
			<replacevalue><![CDATA[  <li><a href="@buildType@.@buildId@/index.html">@buildId@</a></li>
  <!-- add here -->]]></replacevalue>
		</replace>
		<replace file="${copyToDir}/index.html">
			<replacefilter token="@buildType@" value="${buildType}"/>
			<replacefilter token="@buildId@" value="${buildId}"/>
		</replace>
		<mkdir dir="${copyToDir}/${buildType}.${buildId}"/>
		<copy todir="${copyToDir}/${buildType}.${buildId}">
			<fileset dir="${buildDirectory}/${buildType}.${buildId}"/>
		</copy>
	</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">
			<replacefilter token="@branchVersion@" value="${branchVersion}"/>
			<replacefilter token="@buildId@" value="${buildId}"/>
		</replace>
		<mail subject="CDT ${branchVersion} Build ${buildId} completed"
 			tolist="${mailto}" from="dschaefer@qnx.com">
			<message src="message.txt"/>
		</mail>
	</target>

	<target name="mailFail" if="hasErrors">
		<mail subject="CDT ${branchVersion} Build ${buildId} failed"
			tolist="${mailto}" from="dschaefer@qnx.com">
			<message src="compilelog.txt"/>
		</mail>
	</target>

	<target name="tagone">
		<cvs cvsroot="/cvsroot/tools" command="rtag ${tagbranch} ${tagname} ${tagmodule}"/>
	</target>
	
	<target name="tag" depends="init">
		<property name="cdtTag" value="${tagname}"/>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.aix"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.linux"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.linux.ia64"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.linux.ppc"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.linux.x86"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.linux.x86_64"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.macosx"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.qnx"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.solaris"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.core.win32"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.refactoring"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.refactoring.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.ui"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.ui.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.make.core"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.make.core.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.make.ui"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.gnu.ui"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.ui.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.debug.core"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.debug.core.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.debug.mi.core"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.debug.mi.ui"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.debug.ui"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.debug.ui.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.doc.isv"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.doc.user"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.launch"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt-feature"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.releng"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.sdk"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.sdk-feature"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.testing"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/all/org.eclipse.cdt.testing-feature"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.ui"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag-feature"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/c99/org.eclipse.cdt.core.parser.c99"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/c99/org.eclipse.cdt.core.parser.c99.feature"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/upc/org.eclipse.cdt.core.parser.upc"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/upc/org.eclipse.cdt.core.parser.upc.feature"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/xlc/org.eclipse.cdt.managedbuilder.xlc.ui"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/xlc/org.eclipse.cdt.errorparsers.xlc"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/xlc/org.eclipse.cdt.xlc.feature"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/releng/org.eclipse.cdt.master"/>
		</antcall>
	</target>
</project>

Back to the top