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



                                                 
                                                       
                                                                  
                                                           
                                                      
                                                                
                                                

                            
                                                      
                         
                                                              
                                                                        
                                                                             
                                                            

                                                                                 
                                                                                                                  
                                                                            

                                                                   

                                                                           
                                                                                            
                                                                                                
                                                                             
                                                                 
                                                                    
                                                                                                          


                                                                

                                                                

                                                                             


                                                
                                                
                                             
                 
        






                                                                                      
                                                                                      
                                                                             
                      
                    





                                                                                      
                   


                                                                                      


                                                                                      





                                                                                   
                                                                                   
                                                                             
                      
                    





                                                                                   
                   


                                                                                   


                                                                                   


                                                               
                                                                                         

                 
                                                 

                                                                             
                      
                                                             

                                                                                          
                                                                                     
                                                
                                                                             
                            




                                                                                         

                                                                                            

                                                                                                                               

                                                                                             
                                                                                                     
                          
                                                                                     
                                                                   
                    
                                                                                                                 
                                                                        
                   
                                                        
                                                                  
                 
 
                                                              
                                                                                              
                                                                                  
                                                          



                                                                                                                        
                                                                                                                                                  
                                                                                         
                                                                                                                            


                                                                   
                      
                                                  
                                                                                  
                                                      
                                                                                  
                                                                       
                                         
                                                                          
                 
        
                                                              
                                        
                                                                                                                                            
                                             
                                                                                                             

                                                           
                                                                                  
                          
                                                                                        

                 





















                                                                                                                  
                                                              
                                                                                                








                                                                                                                  

                                                                   
                                                                                  


                       





                                                   
                                                                                   




                                                                                         
                                                                    
                                                    


                       
                                               
                                                                            
                                                                    
                                                       


                       
                              
                                                                                                   




                                                            
                                                                                                  

                                         
                                                                                                      

                                         
                                                                                                        

                                         
                                                                                                             

                                         
                                                                                                            

                                         
                                                                                                            

                                         
                                                                                                               

                                         
                                                                                                         

                                         
                                                                                                      

                                         
                                                                                                          

                                         
                                                                                                        

                                         
                                                                                                        

                                         
                                                                                                

                                         
                                                                                                      

                                         
                                                                                                       

                                         
                                                                                                             

                                         
                                                                                                     

                                         
                                                                                                                 

                                         
                                                                                                                       

                                         
                                                                                                                   

                                         
                                                                                                               

                                         
                                                                                                                     

                                         
                                                                                                        

                                         
                                                                                                              

                                         
                                                                                                           

                                         
                                                                                                         

                                         
                                                                                                      

                                         
                                                                                                            

                                         
                                                                                                     

                                         
                                                                                                      

                                         
                                                                                                    

                                         
                                                                                             

                                         
                                                                                                     

                                         
                                                                                                    

                                         
                                                                                                 

                                         
                                                                                                         

                                         
                                                                                                     

                                         


                                                                                                             
                                                                                                            

                                         
                                                                                                                 

                                         
                                                                                                               

                                         
                                                                                                                    
                          
                    











                                                                                                                     
                   
                                         


                                                                                                                     
                                                                                                                   

                                         
                                                                                                              

                                         


                                                                                                                    


                                                                                                           
                                                                                                         
                          
                                         


                                                                                                             

                                                                                                       
                 
          
<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="testbuild" depends="zips,test,copy"/>
	<target name="buildcopy" depends="zips,copy"/>
	<target name="cdtbuild" depends="tag,zips,test,upload"/>
	<target name="buildzip" depends="zips"/>
	
	<target name="init">
		<touch file="${user.home}/.cvspass" />
		<tstamp/>
		<property name="branchVersion" value="5.0.0"/>
		<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="vivkong@ca.ibm.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}"/>
		<property name="testReports" value="${zipsdir}/testReports"/>
		<property name="junit-report-output" value="${testReports}"/>
		<condition property="onWindows">
			<os family="windows"/>
		</condition>
		<mkdir dir="${buildDirectory}"/>
		<mkdir dir="${testReports}"/>
	</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="preBuild">
			<property name="builder" value="${basedir}/xlc.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>
		<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>
		<ant antfile="build.xml" dir="${pde.build.scripts}" target="fetch">
			<property name="builder" value="${basedir}/xlc.sdk"/>
		</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">
		<record name="${testReports}/testsLog.txt" action="start" loglevel="verbose"/>
		<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="${testReports}/org.eclipse.cdt.testing.xml"
		    failonerror="false"/>
		<record name="${testReports}/testsLog.txt" action="stop"/>
	</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.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.core"/>
		</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.errorparsers.xlc.tests"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/xlc/org.eclipse.cdt.make.xlc.core"/>
		</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/xlc/org.eclipse.cdt.xlc.sdk-feature"/>
		</antcall>
		<antcall target="tagone">
			<param name="tagmodule" value="org.eclipse.cdt/releng/org.eclipse.cdt.master"/>
		</antcall>
	</target>
</project>

Back to the top