| <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="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"/> |
| </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="unzip" depends="init" unless="dontUnzip"> |
| <unzip src="${eclipseZip}" dest="${buildDirectory}"/> |
| </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="updateSite" depends="init" unless="hasErrors"> |
| <unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-aix.motif.ppc.zip" dest="${sitedir}"/> |
| <unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-hpux.motif.PA_RISC.zip" dest="${sitedir}"/> |
| <unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-linux.gtk.x86.zip" dest="${sitedir}"/> |
| <unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-linux.motif.x86.zip" dest="${sitedir}"/> |
| <unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-qnx.photon.x86.zip" dest="${sitedir}"/> |
| <unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-solaris.motif.sparc.zip" dest="${sitedir}"/> |
| <unzip src="${zipsdir}/org.eclipse.cdt.sdk-${buildId}-win32.win32.x86.zip" dest="${sitedir}"/> |
| <antcall target="allPlugins"> |
| <param name="target" value="updateSrcPlugin"/> |
| <param name="srcPlugin" value="org.eclipse.cdt.source"/> |
| </antcall> |
| <antcall target="updateSrcPlugin"> |
| <param name="id" value="org.eclipse.cdt.core.aix"/> |
| <param name="srcPlugin" value="org.eclipse.cdt.source.aix.motif.ppc"/> |
| </antcall> |
| <antcall target="updateSrcPlugin"> |
| <param name="id" value="org.eclipse.cdt.core.linux"/> |
| <param name="srcPlugin" value="org.eclipse.cdt.source.linux.motif.x86"/> |
| </antcall> |
| <antcall target="updateSrcPlugin"> |
| <param name="id" value="org.eclipse.cdt.core.linux"/> |
| <param name="srcPlugin" value="org.eclipse.cdt.source.linux.gtk.x86"/> |
| </antcall> |
| <antcall target="updateSrcPlugin"> |
| <param name="id" value="org.eclipse.cdt.core.qnx"/> |
| <param name="srcPlugin" value="org.eclipse.cdt.source.qnx.photon.x86"/> |
| </antcall> |
| <antcall target="updateSrcPlugin"> |
| <param name="id" value="org.eclipse.cdt.core.solaris"/> |
| <param name="srcPlugin" value="org.eclipse.cdt.source.solaris.motif.sparc"/> |
| </antcall> |
| <antcall target="updateSrcPlugin"> |
| <param name="id" value="org.eclipse.cdt.core.win32"/> |
| <param name="srcPlugin" value="org.eclipse.cdt.source.win32.win32.x86"/> |
| </antcall> |
| <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="updateSrcPlugin"> |
| <move todir="${sitedir}/eclipse/plugins/${srcPlugin}_${siteversion}/src/${id}_${siteversion}.${timestamp}"> |
| <fileset dir="${sitedir}/eclipse/plugins/${srcPlugin}_${siteversion}/src/${id}_${siteversion}"/> |
| </move> |
| </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}"/> |
| <zip basedir="${sitedir}/eclipse/${dir}/${id}_${siteversion}" |
| zipfile="${sitedir}/${dir}/${id}_${siteversion}.${timestamp}.jar"/> |
| </target> |
| |
| <target name="milestoneSite" depends="init" unless="hasErrors"> |
| <unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-aix.motif.ppc.zip" dest="${milestonedir}"/> |
| <unzip src="${zipsdir}/org.eclipse.cdt-${buildId}-hpux.motif.PA_RISC.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}"/> |
| <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" 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="allPlugins"> |
| <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> |
| </target> |
| |
| <target name="allElements"> |
| <antcall target="allPlugins"/> |
| <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> |