[buildbot] phase2: set CCACHE_BASEDIR

LEDE Commits lede-commits at lists.infradead.org
Mon Jan 23 05:26:26 PST 2017


jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/6197b16e8daabe674c7a647c55a23c631d913961

commit 6197b16e8daabe674c7a647c55a23c631d913961
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Mon Jan 23 14:25:38 2017 +0100

    phase2: set CCACHE_BASEDIR
    
    Add CCACHE_BASEDIR to make environment in order to improve cache hit rate for
    the global shared cache.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 phase2/master.cfg | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index d6d2e22..bff0b18 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -198,6 +198,14 @@ def GetNumJobs(props):
 	else:
 		return 1
 
+def GetCwd(props):
+	if props.hasProperty("builddir"):
+		return props["builddir"]
+	elif props.hasProperty("workdir"):
+		return props["workdir"]
+	else:
+		return "/"
+
 
 c['builders'] = []
 
@@ -314,7 +322,8 @@ for arch in arches:
 		name = "compile",
 		description = "Building packages",
 		workdir = "build/sdk",
-		command = ["make", WithProperties("-j%(jobs)d", jobs=GetNumJobs), "IGNORE_ERRORS=n m y", "BUILD_LOG=1", "CONFIG_SIGNED_PACKAGES=y", "CONFIG_AUTOREMOVE=y"]))
+		command = ["make", WithProperties("-j%(jobs)d", jobs=GetNumJobs), "IGNORE_ERRORS=n m y", "BUILD_LOG=1", "CONFIG_SIGNED_PACKAGES=y", "CONFIG_AUTOREMOVE=y"],
+		env = {'CCACHE_BASEDIR': WithProperties("%(cwd)s", cwd=GetCwd)}))
 
 	factory.addStep(ShellCommand(
 		name = "mkfeedsconf",



More information about the lede-commits mailing list