common/build.xml
changeset 253 02e483ad6786
parent 252 f7fc039dd3a3
parent 250 61a7c7fafc30
child 254 5033df3f8834
equal deleted inserted replaced
252:f7fc039dd3a3 253:02e483ad6786
   386     <!-- package all logs into zipfile before publish -->
   386     <!-- package all logs into zipfile before publish -->
   387     <target name="sf-zip-logs">
   387     <target name="sf-zip-logs">
   388         <if>
   388         <if>
   389             <istrue value="${sf.spec.logs.zip.enable}"/>
   389             <istrue value="${sf.spec.logs.zip.enable}"/>
   390             <then>
   390             <then>
   391                 <property name="temp.log.zip" value="${env.TEMP}/build_logs_${sf.spec.job.name}_${build.number}.zip"/>
   391                 <property name="temp.log.dir" value="${env.TEMP}/${build.id}_output_logs"/>
   392                 <echo message="Zip log requested, zipping logs..."/>
   392                 <echo message="Zip log requested, zipping logs..."/>
   393                 <zip destfile="${temp.log.zip}" basedir="${build.drive}" includes="output/logs/**"/>
   393                 <mkdir dir="${temp.log.dir}"/>
   394                 <move file="${temp.log.zip}" todir="${build.log.dir}" failonerror="false"/>
   394                 <zip destfile="${temp.log.dir}/${build.id}_build_logs.zip" basedir="${build.drive}" includes="output/logs/**"/>
       
   395                 <zip destfile="${temp.log.dir}/${build.id}_BOM.zip" basedir="${build.drive}">
       
   396                     <include name="output/logs/BOM/**"/>
       
   397                     <include name="output/logs/deliverables/**"/>
       
   398                     <include name="output/logs/releaseables/**"/>
       
   399                 </zip>
       
   400                 <move todir="${build.log.dir}">
       
   401                     <fileset dir="${temp.log.dir}"/>
       
   402                 </move>
   395             </then>
   403             </then>
   396         </if>
   404         </if>
   397     </target>
   405     </target>
   398 
   406 
   399     <!-- generate dir list using passed location and name 
   407     <!-- generate dir list using passed location and name 
   543         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   551         <exec executable="perl" dir="${build.drive}/" failonerror="false" output="${build.log.dir}/zipconfig.log">
   544             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   552             <arg value="${sf.common.config.dir}/tools/populateziptemplate.pl"/>
   545             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   553             <arg value="${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}"/>
   546             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   554             <arg value="${sf.common.config.dir}/templates/zip.cfg.xml.ftl.template"/>
   547             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   555             <arg value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
       
   556             <arg value="${build.log.dir}/rnd_excludefile.txt"/>
   548         </exec>
   557         </exec>
   549     </target>
   558     </target>
   550     
   559     
   551     <target name="sf-zip-content" depends="preprocess-zip-config">
   560     <target name="sf-zip-content" depends="preprocess-zip-config">
   552         <property name="zip.${zip.target.name}.log.file" location="${build.log.dir}/${build.id}_${zip.target.name}_zip.log" />
   561         <property name="zip.${zip.target.name}.log.file" location="${build.log.dir}/${build.id}_${zip.target.name}_zip.log" />
   562     </target>
   571     </target>
   563     
   572     
   564     <target name="sf-package-tools" depends="sf-preprocess-package-config">
   573     <target name="sf-package-tools" depends="sf-preprocess-package-config">
   565         <echo message="Packaging epoc32 tools - Temporary method"/>
   574         <echo message="Packaging epoc32 tools - Temporary method"/>
   566             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_tools_epoc32.log">
   575             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_tools_epoc32.log">
   567             <arg value="a"/>
   576                 <arg value="a"/>
   568             <arg value="-tzip"/>
   577                 <arg value="-tzip"/>
   569             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   578                 <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   570 <!--            <arg value="-x@${build.log.dir}/*_includefile.txt"/> -->
   579 <!--                <arg value="-x@${build.log.dir}/*_includefile.txt"/> -->
   571             <arg value="tools_epoc.zip"/> 
   580                 <arg value="tools_epoc.zip"/> 
   572             <arg value="epoc32/tools"/>
   581                 <arg value="epoc32/tools"/>
   573             </exec>
   582             </exec>
   574         <if><available file="${build.drive}/tools_epoc.zip"/>
   583         <if><available file="${build.drive}/tools_epoc.zip"/>
   575             <then><move file="${build.drive}/tools_epoc.zip" todir="${build.drive}/output/zips/"/></then>
   584             <then><move file="${build.drive}/tools_epoc.zip" todir="${build.drive}/output/zips/"/></then>
   576         </if>
   585         </if>
   577 
   586     </target>
   578     </target>
       
   579 
       
   580     
   587     
   581     <target name="sf-package-binary" depends="sf-preprocess-package-config,sf-package-postbuild-rnd">
   588     <target name="sf-package-binary" depends="sf-preprocess-package-config,sf-package-postbuild-rnd">
       
   589         <!-- Warning: Reverting to using the He zipper will also revert to a single zip for the binaries:
       
   590              would need to update the template and possibly the script that populates it -->
   582         <!--antcall target="sf-zip-content">
   591         <!--antcall target="sf-zip-content">
   583             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   592             <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
   584             <param name="zip.target.name" value="bin" />
   593             <param name="zip.target.name" value="bin" />
   585         </antcall-->
   594         </antcall-->
   586 
   595         
   587         <if><available file="${build.drive}/rnd_excludefile.txt" />
   596         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
   588         <then>
       
   589             <echo message="Packaging with exclude list"/>
       
   590             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
       
   591             <arg value="a"/>
   597             <arg value="a"/>
   592             <arg value="-tzip"/>
   598             <arg value="-tzip"/>
   593             <arg value="-x@${build.drive}/rnd_excludefile.txt"/> <!-- excludes -->
   599             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   594             <arg value="-x!epoc32\tools"/>
   600             <arg value="-x!epoc32\tools"/>
   595             <arg value="-x!epoc32\build"/> 
   601             <arg value="-x!epoc32\build"/>
   596             <arg value="-xr!*.sym"/> 
   602             <arg value="-x!epoc32\release\armv5"/>
   597             <arg value="binaries_epoc.zip"/> 
   603             <arg value="-x!epoc32\release\winscw"/>
       
   604             <arg value="-xr!*.sym"/>
       
   605             <arg value="${build.drive}/output/zips/binaries_epoc.zip"/>
   598             <arg value="epoc32\"/>
   606             <arg value="epoc32\"/>
   599             </exec>
   607         </exec>
   600             <move file="${build.drive}/rnd_excludefile.txt" todir="${build.log.dir}/"/>
   608         
   601         </then>
   609         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_winscw.log">
   602         <else>
       
   603             <echo message="Packaging without exclude list"/>
       
   604             <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_epoc32.log">
       
   605             <arg value="a"/>
   610             <arg value="a"/>
   606             <arg value="-tzip"/>
   611             <arg value="-tzip"/>
   607             <arg value="-x!epoc32\tools"/> 
   612             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   608             <arg value="-x!epoc32\build"/> <!-- excludes -->
   613             <arg value="-xr!*.sym"/>
   609             <arg value="-xr!*.sym"/> 
   614             <arg value="${build.drive}/output/zips/binaries_winscw.zip"/>
   610             <arg value="binaries_epoc.zip"/> 
   615             <arg value="epoc32\release\winscw\"/>
   611             <arg value="epoc32\"/>
   616         </exec>
   612         </exec>
   617         
   613         </else>
   618         <exec executable="7za" dir="${build.drive}" output="${build.log.dir}/zip_${build.id}_binaries_armv5.log">
   614         </if>
   619             <arg value="a"/>
   615         <if><available file="${build.drive}/binaries_epoc.zip"/>
   620             <arg value="-tzip"/>
   616         <then><move file="${build.drive}/binaries_epoc.zip" todir="${build.drive}/output/zips/"/></then>
   621             <arg value="-x@${build.log.dir}/rnd_excludefile.txt"/>
   617         </if>
   622             <arg value="-xr!*.sym"/>
   618 
   623             <arg value="${build.drive}/output/zips/binaries_armv5.zip"/>
       
   624             <arg value="epoc32\release\armv5\"/>
       
   625         </exec>
   619     </target>
   626     </target>
   620 
   627 
   621     <target name="sf-package-postbuild-rnd" depends="sf-preprocess-package-config">
   628     <target name="sf-package-postbuild-rnd" depends="sf-preprocess-package-config">
   622 
   629 
   623         <!-- zip any RnD _includefile.txt files generated during source packaging -->
   630         <!-- zip any RnD _includefile.txt files generated during source packaging -->
   850           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
   857           raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
   851           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
   858           files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
   852         </data>
   859         </data>
   853       </fmpp>
   860       </fmpp>
   854 
   861 
       
   862 
       
   863       <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
       
   864       <for param="tsv">
       
   865         <path>
       
   866           <fileset dir="${build.log.dir}/releaseables">
       
   867             <include name="**/*.tsv"/>
       
   868           </fileset>
       
   869         </path>
       
   870         <sequential>
       
   871           <exec executable="perl" input="@{tsv}" output="@{tsv}">
       
   872             <arg value="${sf.common.config.dir}/tools/sortUnique.pl"/>
       
   873           </exec>
       
   874         </sequential>
       
   875       </for>
   855     </target>
   876     </target>
   856   
   877   
   857     <target name="sf-run-evalid">
   878     <target name="sf-run-evalid">
   858         <delete dir="${build.drive}/output/md5"/>
   879         <delete dir="${build.drive}/output/md5"/>
   859         <mkdir  dir="${build.drive}/output/md5"/>
   880         <mkdir  dir="${build.drive}/output/md5"/>