Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 5447e141669666e7490f146da1e1904ec6ec5d06 (plain) (tree)
1
2
3
4
5
6
7
8
9
                        
 
                                                  
                                                            
                                                              
                                                                  

                            
                                                      
                         
                                                                        

                                                                                 
                                                                                                                                                     
                                                                     

                                                                   

                                                                           
                                                                                                         
                                                                                                                


                                                                                            
                                                                                      
                                                            

                                                                          
                                                             
                 
 


















                                                                                      
                                                 


                                                                               
                                                                    
                                                                          
                      


                                                                                          



                                                                            
                 
 
                                                              





                                                                                                               












                                                                                                                       
                 
        
                                                                
                                                                  
                                                   
                      
                 
        
                                                                 

                                                                                  
                                                                                                   
                                                     
                      
                 
 





                                                   

                                                                                   


                                                                                    
                                                                               
                                                                      
                                                 


                       

                                                                            
                                                                      
                                                    


                       



















































                                                                                                                       
                                            

                                                           
                                                                       



                                                           
                                                                             

                                            
                                                           
                                                           
                                                                                

                                            
                                                           
                                                           
                                                                              

                                            
                                                           
                                                           
                                                                           

                                            
                                                           
                                                           
                                                                         

                                            
                                                           
                                                           
                                                                            



                                                           
                                                                          



                                                           
                                                                                      



                                                           
                                                                                    



                                                           

                                                                     
                                            




                                                                  














                                                                      


                                                                           




                                                                             




                                                                           




                                                                               




                                                                             






                                                                           




                                                                         

                                                           





                                                                                       
                          




                                                                                            
                                            
                                                             
                                                           
                                                                                       

                                            
                                                             
                                                           
                                                                                         

                                            
                                                             
                                                           
                                                                                        

                                            
                                                             
                                                           
                                                                                             

                                            
                                                             
                                                           
                                                                                         
                          
                 
 
          
<project default="zips">

	<target name="build" depends="zips,test"/>
	<target name="nightly" depends="build,upload,mail"/>
	<target name="integration" depends="nightly,wswbmap"/>
	<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="download.eclipse.org:/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"/>
		<property name="mapVersionTag" value="HEAD"/>
	</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="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>
	</target>
	
	<target name="unzip" depends="init" unless="dontUnzip">
		<unzip src="${eclipseZip}" dest="${buildDirectory}"/>
	</target>
	
	<target name="zips" depends="init,unzip">
		<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="upload" depends="init" unless="hasErrors">
		<scp todir="${cdtuser}:${cdtpasswd}@${remotedir}">
			<fileset dir="${sitedir}"/>
		</scp>
	</target>
	
	<target name="wswbmap" depends="init" unless="hasErrors">
		<copy file="cdt-map.in" tofile="cdt-map.txt" overwrite="true"/>
		<replace file="cdt-map.txt" token="@buildId@" value="${buildId}"/>
		<scp todir="${cdtuser}:${cdtpasswd}@download.eclipse.org:/home/www/tools/cdt/wswb">
			<fileset file="cdt-map.txt"/>
		</scp>
	</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="milestoneSite" depends="init" unless="hasErrors">
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-aix.motif.ppc.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-hpux.motif.PA_RISC.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-linux.gtk.x86.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-linux.motif.x86.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-qnx.photon.x86.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-solaris.motif.sparc.zip" dest="${milestonedir}"/>
		<unzip src="${zipsdir}/org.eclipse.cdt.sdk-${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"/>
		<mkdir dir="${milestonedir}/zips"/>
		<copy file="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-aix.motif.ppc.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt.sdk-${milestone}-aix.motif.ppc.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-hpux.motif.PA_RISC.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt.sdk-${milestone}-hpux.motif.PA_RISC.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-linux.gtk.x86.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt.sdk-${milestone}-linux.gtk.x86.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-linux.motif.x86.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt.sdk-${milestone}-linux.motif.x86.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-qnx.photon.x86.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt.sdk-${milestone}-qnx.photon.x86.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-solaris.motif.sparc.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt.sdk-${milestone}-solaris.motif.sparc.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-win32.win32.x86.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt.sdk-${milestone}-win32.win32.x86.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt-${buildId}-aix.motif.ppc.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt-${milestone}-aix.motif.ppc.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt-${buildId}-hpux.motif.PA_RISC.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt-${milestone}-hpux.motif.PA_RISC.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt-${buildId}-linux.gtk.x86.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt-${milestone}-linux.gtk.x86.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt-${buildId}-linux.motif.x86.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt-${milestone}-linux.motif.x86.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt-${buildId}-qnx.photon.x86.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt-${milestone}-qnx.photon.x86.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt-${buildId}-solaris.motif.sparc.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt-${milestone}-solaris.motif.sparc.zip"/>
		<copy file="${zipsdir}/org.eclipse.cdt-${buildId}-win32.win32.x86.zip"
			tofile="${milestonedir}/zips/org.eclipse.cdt-${milestone}-win32.win32.x86.zip"/>
	</target>

	<target name="milestoneJars">
		<mkdir dir="${milestonedir}/${dir}"/>
		<zip basedir="${milestonedir}/eclipse/${dir}/${id}_${siteversion}"
		     zipfile="${milestonedir}/${dir}/${id}_${siteversion}.jar"/>
	</target>
	
	<target name="allElements">
 		<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>
		<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