blob: 681a1e51c2ccbc45468f31074f10aed1e2bfe5d4 [file] [log] [blame]
david_williams621a6f12010-09-26 08:34:59 +00001<?xml version="1.0" encoding="UTF-8"?>
david_williamsd913e922006-11-13 07:24:21 +00002<project
3 default="build"
4 basedir=".">
david_williams2398e362011-03-05 02:45:39 +00005 <fail unless="wtp.builder.home"/>
6 <property file="${wtp.builder.home}/build.properties"/>
7 <property environment="env"/>
david_williams621a6f12010-09-26 08:34:59 +00008
david_williams9e7f5842011-03-06 03:32:03 +00009 <!-- required to get proper value of doCreateFprojZips -->
david_williams621a6f12010-09-26 08:34:59 +000010 <property
11 name="keyCfgFile"
12 value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
13 <echo
14 level="info"
15 message="keyCfgFile: ${keyCfgFile}"/>
david_williams2398e362011-03-05 02:45:39 +000016 <property file="${keyCfgFile}"/>
david_williams621a6f12010-09-26 08:34:59 +000017
david_williams2398e362011-03-05 02:45:39 +000018 <echo message="transformedRepoLocation: ${transformedRepoLocation}"/>
19 <mkdir dir="${transformedRepoLocation}"/>
david_williams621a6f12010-09-26 08:34:59 +000020
21
david_williams9e7f5842011-03-06 03:32:03 +000022 <!-- main -->
david_williamsd913e922006-11-13 07:24:21 +000023 <target
david_williams2398e362011-03-05 02:45:39 +000024 name="build"
david_williamsd913e922006-11-13 07:24:21 +000025 depends="getBaseBuilder">
david_williams621a6f12010-09-26 08:34:59 +000026
david_williamsd913e922006-11-13 07:24:21 +000027 <property
28 name="buildTargets"
david_williams82a6c642008-10-08 14:52:33 +000029 value="${wtp.builder.home}/scripts/build/runbuild.xml"/>
david_williams2398e362011-03-05 02:45:39 +000030 <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/>
david_williams82a6c642008-10-08 14:52:33 +000031
32 <!-- for this distribution, dependencies come from dali.releng -->
33 <property
34 name="dependency.properties"
david_williams211f9682009-10-02 03:50:45 +000035 value="${buildDirectory}/maps/${env.RELENGDALI}/maps/dependencies.properties"/>
david_williams82a6c642008-10-08 14:52:33 +000036
david_williams2398e362011-03-05 02:45:39 +000037 <ant antfile="${buildTargets}">
david_williamsd913e922006-11-13 07:24:21 +000038 <property
39 name="component"
david_williams621a6f12010-09-26 08:34:59 +000040 value="${build.distribuion}-sdk"/>
david_williamsd913e922006-11-13 07:24:21 +000041 </ant>
david_williams2398e362011-03-05 02:45:39 +000042 <ant antfile="${buildTargets}">
david_williamsd913e922006-11-13 07:24:21 +000043 <property
44 name="component"
david_williams621a6f12010-09-26 08:34:59 +000045 value="${build.distribuion}.tests"/>
david_williamsd913e922006-11-13 07:24:21 +000046 </ant>
david_williams621a6f12010-09-26 08:34:59 +000047
david_williams9e7f5842011-03-06 03:32:03 +000048 <!-- copy early, if we can ... else site won't be created, if we fail -->
david_williams2398e362011-03-05 02:45:39 +000049 <ant antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/>
david_williams621a6f12010-09-26 08:34:59 +000050
david_williams2398e362011-03-05 02:45:39 +000051 <antcall target="handleCompilationProblems"/>
david_williams621a6f12010-09-26 08:34:59 +000052
david_williamsd913e922006-11-13 07:24:21 +000053 </target>
david_williams621a6f12010-09-26 08:34:59 +000054
55 <target
56 name="handleCompilationProblems"
57 depends="checkIfCompileProblems"
58 if="compilation.problem.found">
59
david_williams9e7f5842011-03-06 03:32:03 +000060 <!-- if there is a problem, leave a marker file in download directory, so the webpage can
61 describe what happened -->
david_williams621a6f12010-09-26 08:34:59 +000062
63 <echo
64 message="Compilation problems were found"
65 file="${buildDirectory}/${buildLabel}/compilationProblems.txt"/>
66
67 <!-- always force an early copy, before fail, so all results and files get to "downloads" area -->
david_williams2398e362011-03-05 02:45:39 +000068 <ant antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/>
david_williams621a6f12010-09-26 08:34:59 +000069 <fail
70 if="compilation.problem.found"
71 message="The remaining build and tests were canceled since compilation problems were found."/>
72 </target>
73
74
david_williams2398e362011-03-05 02:45:39 +000075 <target name="checkIfCompileProblems">
david_williams621a6f12010-09-26 08:34:59 +000076 <!--
77 Not sure how reliable the presence of this 'compilation.problem' file is ...
78 I just noticed it in recent PDE builds with compile problems.
79 May have to make this "fancier" in future.
80 For now, looks only one level down in plugins directory (in build's workdir) for a file with
81 the name 'complilation.problem'. We may have a "summary" in xml file format, summarizing logs,
82 ... but not sure then created (during site? We'd have to call site first. This way, we'll see if the match :) .
83-->
84 <available
85 file="compilation.problem"
86 type="file"
87 property="compilation.problem.found">
88 <filepath>
david_williams2398e362011-03-05 02:45:39 +000089 <dirset dir="${buildDirectory}">
90 <include name="plugins/*"/>
david_williams621a6f12010-09-26 08:34:59 +000091 </dirset>
92
93 </filepath>
94 </available>
david_williams2398e362011-03-05 02:45:39 +000095 <echo message="compilation.problem path buildDirectory: ${buildDirectory}/plugins/*/"/>
david_williams621a6f12010-09-26 08:34:59 +000096 </target>
david_williams9e7f5842011-03-06 03:32:03 +000097
98
david_williams621a6f12010-09-26 08:34:59 +000099 <!-- invoking runbuild.xml targetting getBaseBuilder -->
david_williamsd913e922006-11-13 07:24:21 +0000100 <target
david_williamsef62fc42011-03-18 02:33:39 +0000101 name="getBaseBuilder">
102
david_williamsd913e922006-11-13 07:24:21 +0000103 <ant
david_williamsef62fc42011-03-18 02:33:39 +0000104 antfile="${wtp.builder.home}/scripts/build/runbuild.xml"
david_williams82a6c642008-10-08 14:52:33 +0000105 target="getBaseBuilder"/>
david_williamsef62fc42011-03-18 02:33:39 +0000106
david_williamsd913e922006-11-13 07:24:21 +0000107 </target>
tle170c7902008-10-02 03:15:49 +0000108</project>