Skip to main content
summaryrefslogtreecommitdiffstats
blob: 17bc2fa72b1791dbea5b7251fef3ce26e2e6e6fd (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
<project default="zips">

	<target name="build" depends="zips,test,updateSite"/>
	<target name="nightly" depends="build,upload,mail"/>
	<target name="integration" depends="nightly,wswbmap"/>
	<target name="milestone" depends="integration,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="${baseLocation}/plugins/org.eclipse.pde.build_3.0.0/scripts" />
		<property name="eclipseZip" value="eclipse-SDK.zip"/>
		<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}"/>
	</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}/builders" />
		</ant>
		<concat destfile="compile.log">
			<fileset dir="${buildDirectory}/plugins" includes="**/*.bin.log"/>
		</concat>
	</target>

	<target name="test" depends="init">
		<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.make-${buildId}.zip" dest="${buildDirectory}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.managedbuilder-${buildId}.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">
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-aix.motif.ppc.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-linux.gtk.x86.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-linux.motif.x86.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-qnx.photon.x86.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-solaris.motif.sparc.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-win32.win32.x86.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.make-${buildId}.zip" dest="${sitedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.managedbuilder-${buildId}.zip" dest="${sitedir}"/>
		<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="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}"/>
		<jar basedir="${sitedir}/eclipse/${dir}/${id}_${siteversion}"
		     destfile="${sitedir}/${dir}/${id}_${siteversion}.${timestamp}.jar"/>
	</target>

	<target name="milestoneSite" depends="init">
		<unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-aix.motif.ppc.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}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.make-${buildId}.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.managedbuilder-${buildId}.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">
		<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">
		<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>
	</target>
	
	<target name="mail" depends="init">	
		<concat destfile="mail.txt">
			<filelist dir="${basedir}" files="message.txt,compile.log"/>
		</concat>
		<mail subject="CDT Build ${siteversion}.${timestamp} completed"
			tolist="cdt-test-dev@eclipse.org" from="dschaefe@ca.ibm.com">
			<message src="mail.txt"/>
		</mail>
	</target>

 	<target name="allElements">
 		<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="feature"/>
 			<param name="dir" value="features"/>
 			<param name="id" value="org.eclipse.cdt.make"/>
 		</antcall>
 		<antcall target="${target}">
 			<param name="type" value="feature"/>
 			<param name="dir" value="features"/>
 			<param name="id" value="org.eclipse.cdt.managedbuilder"/>
 		</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="plugin"/>
 			<param name="dir" value="plugins"/>
 			<param name="id" value="org.eclipse.cdt.core"/>
 		</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.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.doc.user"/>
 		</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>

</project>

Back to the top