Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: c6cf1d45897cebb858e46d0e0cebb55220bcf449 (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,test"/>
	<target name="nightly" depends="tag,zips,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.0"/>
		<property name="timestamp" value="${DSTAMP}${TSTAMP}" />
		<property name="forceContextQualifier" value="${timestamp}"/>
		<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="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="remotedir" value="dschaefer@dev.eclipse.org:cdt/builds/${branchVersion}"/>
		<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">
		<antcall target="unpack">
			<param name="srcPrefix" value="${eclipseDist}"/>
			<param name="dest" value="${buildDirectory}"/>
		</antcall>
	</target>
	
	<target name="zips" depends="init">
		<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>
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/gdbjtag" />
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/c99" />
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/upc" />
		</ant>
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/xlc" />
		</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>
	</target>

	<target name="unpackzip" if="onWindows">
		<unzip src="${srcPrefix}.zip" dest="${dest}"/>
	</target>

	<target name="unpacktar" unless="onWindows">
		<untar src="${srcPrefix}.tar.gz" dest="${dest}"
			compression="gzip"/>
	</target>

	<target name="unpack">
		<antcall target="unpackzip"/>
		<antcall target="unpacktar"/>
	</target>
	
	<target name="test" depends="init" unless="hasErrors">
		<ant antfile="build.xml" dir="${pde.build.scripts}">
			<property name="builder" value="${basedir}/testing" />
		</ant>
		<antcall target="unpack">
			<param name="srcPrefix" value="${zipsdir}/cdt-${branchVersion}-${buildId}-${osgi.os}.${osgi.arch}"/>
			<param name="dest" value="${buildDirectory}"/>
		</antcall>
		<unzip src="${zipsdir}/cdt-testing-${branchVersion}-${buildId}.zip" dest="${buildDirectory}"/>
		<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/org.eclipse.test_3.2.0/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"/>
	</target>
	
	<target name="upload" depends="init" unless="hasErrors">
		<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="/var/www/html/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=":ext:dschaefer@dev.eclipse.org:/cvsroot/tools" cvsrsh="ssh"
			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>
	</target>
</project>

Back to the top