common/build.xml
changeset 263 5ee8d148ce40
parent 262 633b96a83005
child 266 d22176d1757d
child 274 d1e42f09003c
equal deleted inserted replaced
262:633b96a83005 263:5ee8d148ce40
    25     <property name="diamonds.port" value="${sf.spec.publish.diamonds.port}"/>
    25     <property name="diamonds.port" value="${sf.spec.publish.diamonds.port}"/>
    26     <property name="diamonds.path" value="${sf.spec.publish.diamonds.path}"/>
    26     <property name="diamonds.path" value="${sf.spec.publish.diamonds.path}"/>
    27     <property name="build.system" value="${sf.spec.build.system}"/>
    27     <property name="build.system" value="${sf.spec.build.system}"/>
    28     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
    28     <property name="base_release.path" value="${sf.spec.baseline.location}"/>
    29     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    29     <property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
    30 	
    30     
    31     <!-- SF-specific Helium properties not meant to be exposed in the project spec -->
    31     <!-- SF-specific Helium properties not meant to be exposed in the project spec -->
    32     <property name="diamonds.listener.configuration.file" location="${sf.common.config.dir}/diamonds/config.xml.ftl"/>
    32     <property name="diamonds.listener.configuration.file" location="${sf.common.config.dir}/diamonds/config.xml.ftl"/>
    33     
    33     
    34     <!-- import all core HELIUM targets -->
    34     <!-- import all core HELIUM targets -->
    35     <import file="${helium.dir}/helium.ant.xml" />
    35     <import file="${helium.dir}/helium.ant.xml" />
    36     
    36     
    37     <!-- import common references -->
    37     <!-- import common references -->
    38     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    38     <import file="${sf.common.config.dir}/common_refs.ant.xml" />
    39              
    39              
    40 	<!-- setup conditional Helium internal properties -->
    40     <!-- setup conditional Helium internal properties -->
    41 	<if><istrue value="${sf.spec.sourcesync.usecache}"/>
    41     <if><istrue value="${sf.spec.sourcesync.usecache}"/>
    42 		<then>
    42         <then>
    43 			<property name="sf.spec.sourcesync.sourcespecdir" value="${sf.common.config.dir}/generated"/>
    43             <property name="sf.spec.sourcesync.sourcespecdir" value="${sf.common.config.dir}/generated"/>
    44 		</then>
    44         </then>
    45 		<else>
    45         <else>
    46 			<property name="sf.spec.sourcesync.sourcespecdir" value="${sf.project.location}"/>
    46             <property name="sf.spec.sourcesync.sourcespecdir" value="${sf.project.location}"/>
    47 		</else>
    47         </else>
    48 	</if>
    48     </if>
    49 
    49 
    50     <!-- conditional import of generated source spec if available -->
    50     <!-- conditional import of generated source spec if available -->
    51     <if><available  file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
    51     <if><available  file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
    52         <then>
    52         <then>
    53             <echo message="Generated source spec found, importing..." />
    53             <echo message="Generated source spec found, importing..." />
    78     used by the builds. -->
    78     used by the builds. -->
    79         <echo message="Parse the project configuration" />
    79         <echo message="Parse the project configuration" />
    80     </target>
    80     </target>
    81     
    81     
    82     <target name="sf-generate-source-spec" depends="sf-parse-project-config">
    82     <target name="sf-generate-source-spec" depends="sf-parse-project-config">
    83 	
    83 
    84 		<!-- Generate the sources.csv if hg cache is activated -->
    84         <!-- Generate the sources.csv if hg cache is activated -->
    85 		<if><istrue value="${sf.spec.sourcesync.usecache}"/>
    85         <if><istrue value="${sf.spec.sourcesync.usecache}"/>
    86 			<then>
    86             <then>
    87 				<echo message="Generating Hg local cache..." />
    87                 <echo message="Generating Hg local cache..." />
    88 				<exec executable="perl" dir="${build.log.dir}" failonerror="true" output="${build.log.dir}/${build.id}_hgcache.log">
    88                 <exec executable="perl" dir="${build.log.dir}" failonerror="true" output="${build.log.dir}/${build.id}_hgcache.log">
    89 					<arg value="${sf.common.config.dir}/tools/cachefiles.pl"/>
    89                     <arg value="${sf.common.config.dir}/tools/cachefiles.pl"/>
    90 					<arg value="${sf.spec.sourcesync.cachelocation}"/>
    90                     <arg value="${sf.spec.sourcesync.cachelocation}"/>
    91 					<arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
    91                     <arg value="${sf.project.location}/${sf.spec.sourcesync.sourcespecfile}"/>
    92 					<arg value="${sf.common.config.dir}/generated/${sf.spec.sourcesync.sourcespecfile}"/>
    92                     <arg value="${sf.common.config.dir}/generated/${sf.spec.sourcesync.sourcespecfile}"/>
    93 				</exec>
    93                 </exec>
    94 			</then>
    94             </then>
    95 		</if>
    95         </if>
    96 		
    96 
    97         <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
    97         <!-- TODO: 1. Same file name souce-spec.ant.xml is used for all packages
    98         for multiple package builds, this needs to be linked with package name. -->
    98         for multiple package builds, this needs to be linked with package name. -->
    99         <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
    99         <!-- TODO: 2. Change fmpp data to be a full property rather than relative path -->
   100         
   100         
   101         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   101         <fmpp sourceFile="${sf.common.config.dir}/templates/source-spec.ant.xml.ftl"
   106               </data>
   106               </data>
   107         </fmpp>
   107         </fmpp>
   108     </target>
   108     </target>
   109     
   109     
   110     <target name="sf-bc-check">
   110     <target name="sf-bc-check">
   111         <!-- create BC dir -->
   111 
   112         <mkdir dir="${build.log.dir}/BC"/>
   112         <if><isset property="env.PDT_HOME"/>
   113 
   113         <then>
   114         <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
   114             <!-- create BC dir -->
   115         <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
   115             <mkdir dir="${build.log.dir}/BC"/>
   116         <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
   116 
   117         <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
   117             <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
   118         <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
   118             <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
   119         <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
   119             <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
   120 
   120             <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
   121         <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   121             <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
   122             <arg value="/c"/>
   122             <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
   123             <arg value="echo"/>
   123 
   124             <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
   124             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   125         </exec>
   125                 <arg value="/c"/>
   126         <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   126                 <arg value="echo"/>
   127             <arg value="/c"/>
   127                 <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
   128             <arg value="echo"/>
   128             </exec>
   129             <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
   129             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   130         </exec>
   130                 <arg value="/c"/>
   131         <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   131                 <arg value="echo"/>
   132             <arg value="/c"/>
   132                 <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
   133             <arg value="echo"/>
   133             </exec>
   134             <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
   134             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   135         </exec>
   135                 <arg value="/c"/>
   136         <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   136                 <arg value="echo"/>
   137             <arg value="/c"/>
   137                 <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
   138             <arg value="echo"/>
   138             </exec>
   139             <arg value="CURRENT_NAME=${build.id}"/>
   139             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   140         </exec>
   140                 <arg value="/c"/>
   141         <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   141                 <arg value="echo"/>
   142             <arg value="/c"/>
   142                 <arg value="CURRENT_NAME=${build.id}"/>
   143             <arg value="echo"/>
   143             </exec>
   144             <arg value="CURRENT_SDK_DIR=${build.drive}"/>
   144             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   145         </exec>
   145                 <arg value="/c"/>
   146         <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   146                 <arg value="echo"/>
   147             <arg value="/c"/>
   147                 <arg value="CURRENT_SDK_DIR=${build.drive}"/>
   148             <arg value="echo"/>
   148             </exec>
   149             <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
   149             <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
   150         </exec>
   150                 <arg value="/c"/>
   151 
   151                 <arg value="echo"/>
   152         <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="true" verbose="true"/>
   152                 <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
   153 
   153             </exec>
   154         <if><istrue value="${sf.spec.bccheck.enable.la}"/>
   154 
   155             <then>
   155             <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
   156                 <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
   156 
   157 			        <arg value="CheckBC.py"/>
   157             <if><istrue value="${sf.spec.bccheck.enable.la}"/>
   158                     <arg value="${build.log.dir}/BC/bc.config"/>
   158                 <then>
   159                     <arg value="-la"/>
   159                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
   160                     <arg value="-f"/>
   160                         <arg value="CheckBC.py"/>
   161                     <arg value="${sf.spec.bccheck.reportid}${sf.spec.job.number}"/>
   161                         <arg value="${build.log.dir}/BC/bc.config"/>
   162                 </exec>
   162                         <arg value="-la"/>
   163                 <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Libraries_CompatibilityReport_${sf.spec.bccheck.reportid}${sf.spec.job.number}.xml" tofile="${build.log.dir}/BC/libraries_report.xml" failonerror="true" verbose="true"/>
   163                         <arg value="-f"/>
   164             </then>
   164                         <arg value="${sf.spec.bccheck.reportid}"/>
   165         </if>
   165                     </exec>
   166 
   166                     <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Libraries_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/libraries_report.xml" failonerror="false" verbose="true"/>
   167         <if><istrue value="${sf.spec.bccheck.enable.ha}"/>
   167                 </then>
   168             <then>
   168             </if>
   169                 <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
   169 
   170 		        	<arg value="CheckBC.py"/>
   170             <if><istrue value="${sf.spec.bccheck.enable.ha}"/>
   171                     <arg value="${build.log.dir}/BC/bc.config"/>
   171                 <then>
   172                     <arg value="-ha"/>
   172                     <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
   173                     <arg value="-f"/>
   173                         <arg value="CheckBC.py"/>
   174                     <arg value="${sf.spec.bccheck.reportid}${sf.spec.job.number}"/>
   174                         <arg value="${build.log.dir}/BC/bc.config"/>
   175                 </exec>
   175                         <arg value="-ha"/>
   176                 <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Headers_CompatibilityReport_${sf.spec.bccheck.reportid}${sf.spec.job.number}.xml" tofile="${build.log.dir}/BC/headers_report.xml" failonerror="true" verbose="true"/>
   176                         <arg value="-f"/>
   177             </then>
   177                         <arg value="${sf.spec.bccheck.reportid}"/>
   178         </if>
   178                     </exec>
   179 
   179                     <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Headers_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/headers_report.xml" failonerror="false" verbose="true"/>
   180         <if><istrue value="${sf.spec.bccheck.enable.dynamic}"/>
   180                 </then>
   181             <then>
   181             </if>
   182             </then>
   182 
       
   183             <if><istrue value="${sf.spec.bccheck.enable.dynamic}"/>
       
   184                 <then>
       
   185                 </then>
       
   186             </if>
       
   187         </then>
       
   188         <else>
       
   189             <echo message="WARNING: PDT_HOME not set, I dont know where the BC tools are installed so cannot continue"/>
       
   190         </else>
   183         </if>
   191         </if>
   184     </target>
   192     </target>
   185     
   193     
   186     <target name="generate-layers">
   194     <target name="generate-layers">
   187        <echo message="canno-file:${canonical.sysdef.file}"/>
   195        <echo message="canno-file:${canonical.sysdef.file}"/>
   405             <istrue value="${sf.spec.logs.zip.enable}"/>
   413             <istrue value="${sf.spec.logs.zip.enable}"/>
   406             <then>
   414             <then>
   407                 <property name="temp.log.dir" value="${env.TEMP}/${build.id}_output_logs"/>
   415                 <property name="temp.log.dir" value="${env.TEMP}/${build.id}_output_logs"/>
   408                 <echo message="Zip log requested, zipping logs..."/>
   416                 <echo message="Zip log requested, zipping logs..."/>
   409                 <mkdir dir="${temp.log.dir}"/>
   417                 <mkdir dir="${temp.log.dir}"/>
   410                 <zip destfile="${temp.log.dir}/${build.id}_build_logs.zip" basedir="${build.drive}" includes="output/logs/**"/>
   418                 <zip destfile="${temp.log.dir}/build_logs.zip" basedir="${build.drive}"> 
   411                 <zip destfile="${temp.log.dir}/${build.id}_BOM.zip" basedir="${build.drive}">
   419                     <include name="output/logs/**"/>
       
   420                     <exclude name="output/logs/BOM/**"/>
       
   421                     <exclude name="output/logs/deliverables/**"/>
       
   422                     <exclude name="output/logs/releaseables/**"/>
       
   423                 </zip>
       
   424                 <zip destfile="${temp.log.dir}/build_BOM.zip" basedir="${build.drive}">
   412                     <include name="output/logs/BOM/**"/>
   425                     <include name="output/logs/BOM/**"/>
   413                     <include name="output/logs/deliverables/**"/>
   426                     <include name="output/logs/deliverables/**"/>
   414                     <include name="output/logs/releaseables/**"/>
   427                     <include name="output/logs/releaseables/**"/>
   415                 </zip>
   428                 </zip>
   416                 <move todir="${build.log.dir}">
   429                 <move todir="${build.log.dir}">
   610              would need to update the template and possibly the script that populates it -->
   623              would need to update the template and possibly the script that populates it -->
   611         <!--antcall target="sf-zip-content">
   624         <!--antcall target="sf-zip-content">
   612             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   625             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   613             <param name="zip.target.name" value="bin" />
   626             <param name="zip.target.name" value="bin" />
   614         </antcall-->
   627         </antcall-->
   615 	<parallel>
   628     <parallel>
   616             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
   629             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
   617                 <arg value="a"/>
   630                 <arg value="a"/>
   618                 <arg value="-tzip"/>
   631                 <arg value="-tzip"/>
   619                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   632                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   620                 <arg value="-x!epoc32\tools"/>
   633                 <arg value="-x!epoc32\tools"/>