[cig-commits] r17991 - cs/buildbot/trunk/buildbot

brad at geodynamics.org brad at geodynamics.org
Tue Mar 1 09:57:41 PST 2011


Author: brad
Date: 2011-03-01 09:57:40 -0800 (Tue, 01 Mar 2011)
New Revision: 17991

Modified:
   cs/buildbot/trunk/buildbot/bs.py
Log:
Added ASEBuildSystemInstall for PETSc with 'make install'.

Modified: cs/buildbot/trunk/buildbot/bs.py
===================================================================
--- cs/buildbot/trunk/buildbot/bs.py	2011-02-28 23:20:34 UTC (rev 17990)
+++ cs/buildbot/trunk/buildbot/bs.py	2011-03-01 17:57:40 UTC (rev 17991)
@@ -383,6 +383,102 @@
         return steps
 
 
+class ASEBuildSystemInstall(BuildSystem):
+    """
+    ANL SIDL Environment (ASE) BuildSystem (used by PETSc)
+
+    This implementation uses "make install".
+    """
+
+    def __init__(self):
+        self.pseudoPrefix = pseudoPrefix
+        self.location = location
+
+    def generativeSteps(self, buildEnv, buildConfig, env, desc, workdir, configureArgs, line):
+        steps = []
+        if self.location:
+            steps = self.location.sourceSteps(
+                workdir = workdir + "/python/BuildSystem",
+                mode = 'clobber')
+        return steps
+
+    def buildSteps(self, buildEnv, buildConfig, env, desc, workdir, configureArgs, line):
+
+        configureArgs = self.configureArgs(buildEnv, buildConfig, env, configureArgs, line)
+
+        from os.path import dirname
+        workbase = workdir
+        workdir = WithProperties(workdir + "-%d", "buildnumber")
+        pseudoPrefixParent = dirname(self.pseudoPrefix)
+        
+        steps = [
+            s(step.ShellCommand,
+              description=["moving"] + desc,
+              descriptionDone=desc + ["moved"],
+              command=["mv", workbase, workdir],
+              workdir=".",
+              env=env,
+              haltOnFailure=True,
+              ),
+            s(step.ShellCommand,
+              description=["configure"] + desc,
+              descriptionDone=desc + ["configuration"],
+              command=["./config/configure.py"] + configureArgs,
+              workdir=workdir,
+              env=env,
+              haltOnFailure=True,
+              logfiles={"configure.log": "configure.log"},
+              timeout=3600, # Building Sieve takes a long time...
+              ),
+            s(ASECompile,
+              description=["compiling"] + desc,
+              descriptionDone=desc + ["compile"],
+              command=["make"],
+              workdir=workdir,
+              env=env,
+              timeout=3600*2, # Building Sieve takes a long time...
+              ),
+            ]
+
+        if env['PETSC_ARCH'].startswith("cygwin-"):
+            # PETSc ignores "--enable-shared" on Windows.  Satish
+            # says: "Because it currently doesn't work. There is some
+            # code contributed here [cygwin_shared target] - I'll have
+            # to check it out again.. Also there is this issue that
+            # windows .dll files require stub libraries to function,
+            # and the LD_LIBRARY_PATH equvalent is PATH. Our current
+            # model doesn't accomodate these 2 deviations - so it
+            # might need extra steps on the users part to get this
+            # working.."
+
+            # So, we roll our own PETSc DLLs.  See mkpetscdlls() in
+            # buildbot.scrips.windows.
+
+            steps.extend([
+                s(step.ShellCommand,
+                  description=["building DLLs"] + desc,
+                  descriptionDone=desc + ["DLL build"],
+                  command=["mkpetscdlls"],
+                  workdir=workdir,
+                  env=env,
+                  haltOnFailure=True,
+                  ),
+                ])
+        
+        steps.extend([
+            s(step.ShellCommand,
+              description=["installing"] + desc,
+              descriptionDone=desc + ["install"],
+              command=["make", "install"],
+              workdir=workdir,
+              env=env,
+              haltOnFailure=True,
+              ),
+            ])
+        
+        return steps
+
+
 class DebugBuildSystem(BuildSystem):
     """for debugging BuildBot"""
 



More information about the CIG-COMMITS mailing list