]> git.saurik.com Git - wxWidgets.git/commitdiff
Use shared checkouts with a fresh copy for each build to allow clean builds.
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sat, 27 Sep 2008 16:53:31 +0000 (16:53 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sat, 27 Sep 2008 16:53:31 +0000 (16:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/buildbot/config/include/xp_vc.xml [new file with mode: 0644]
build/buildbot/config/xp_vc.xml

diff --git a/build/buildbot/config/include/xp_vc.xml b/build/buildbot/config/include/xp_vc.xml
new file mode 100644 (file)
index 0000000..d37ad94
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+    Name:       include/xp_vc.xml
+    Purpose:    Declarations for the xp_vc slave
+    Author:     Michael Wetherell
+    RCS-ID:     $Id$
+    Copyright:  (c) 2008 Michael Wetherell
+    Licence:    wxWidgets licence
+-->
+
+<bot xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+     xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<xi:include href="defs.xml"/>
+
+<!--
+    build - Override <build> to add a slave lock. This has the effect of
+            serialising all the builds on this machine
+-->
+<xsl:template name="build">
+    <xsl:param name="content"/>
+    <build>
+        <lock>slave</lock>
+        <xsl:copy-of select="$content"/>
+    </build>
+</xsl:template>
+
+<!--
+    checkout - checks out to a shared directory
+
+    Checks out to a directory '../$branch' shared between builds. Then exports
+    it to a clean 'build' directory for the job to build in. This relies on
+    builds for the same branch being serialised with a lock so that one build
+    doesn't update the shared source while another is exporting them.
+
+    Usage typically just:
+        <checkout/>
+    for the trunk, or:
+        <checkout branch="branches/WX_2_8_BRANCH"/>
+    to checkout a branch.
+-->
+<xsl:template name="checkout">
+    <xsl:param name="content"/>
+    <xsl:param name="branch" select="'trunk'"/>
+    <xsl:variable name="nodes" select="exsl:node-set($content)"/>
+    <svn>
+        <xsl:if test="not($nodes/svnurl)">
+            <xsl:if test="not($nodes/baseURL)">
+                <baseURL><SVN_URL/></baseURL>
+            </xsl:if>
+            <xsl:if test="not($nodes/defaultBranch)">
+                <defaultBranch><xsl:value-of select="$branch"/></defaultBranch>
+            </xsl:if>
+        </xsl:if>
+        <xsl:if test="not($nodes/workdir)">
+            <workdir>../<xsl:value-of select="$branch"/></workdir>
+        </xsl:if>
+        <xsl:copy-of select="$content"/>
+    </svn>
+    <shellcommand>
+        <description>creating build directory</description>
+        <descriptionDone>create build directory</descriptionDone>
+        <workdir>.</workdir>
+        <command>
+            <normalize-space>
+                (if exist build rmdir /s/q build) &amp;&amp;
+                svn export --native-eol CRLF
+                    ..\<xsl:value-of select="$branch"/> build
+            </normalize-space>
+        </command>
+    </shellcommand>
+</xsl:template>
+
+</bot>
index eeae29c78be9699e1f87de01d9fdffc0aa4b07d6..7fe19c0fea65eb059eea8cdf509bffc9456fdb51 100644 (file)
@@ -8,11 +8,10 @@
     Licence:    wxWidgets licence
 -->
 <bot xmlns:xi="http://www.w3.org/2001/XInclude">
-    <xi:include href="include/defs.xml"/>
+    <xi:include href="include/xp_vc.xml"/>
     <build>
         <name>XPSP2 VC9 wxMSW trunk</name>
         <builddir>XPSP2_VC9_wxMSW_trunk</builddir>
-        <lock>slave</lock>
         <!--<scheduler>trunk_quick</scheduler>-->
         <sandbox>VC9</sandbox>
         <make>nmake -f makefile.vc SHARED=1 CPPUNIT_CFLAGS=-Ik:/buildbot/VC9libs/cppunit-1.12.1/include CPPUNIT_LIBS=k:/buildbot/VC9libs/cppunit-1.12.1/lib/cppunit.lib</make>
@@ -25,7 +24,6 @@
     <build>
         <name>XPSP2 VC9 wxMSW stable</name>
         <builddir>XPSP2_VC9_wxMSW_stable</builddir>
-        <lock>slave</lock>
         <!--<scheduler>stable_quick</scheduler>-->
         <sandbox>VC9</sandbox>
         <make>nmake -f makefile.vc SHARED=1 CPPUNIT_CFLAGS=-Ik:/buildbot/VC9libs/cppunit-1.12.1/include CPPUNIT_LIBS=k:/buildbot/VC9libs/cppunit-1.12.1/lib/cppunit.lib</make>