]> git.ipfire.org Git - pbs.git/commitdiff
ccache: Use one large cache for all test builds
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 May 2023 06:12:56 +0000 (06:12 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 May 2023 06:12:56 +0000 (06:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/jobs.py

index 2448a0f2089ef4254489c5330c67e180b09519d3..780adbd501b1b31584f2f4c1bf12b368fc99156e 100644 (file)
@@ -758,7 +758,15 @@ class Job(base.DataObject):
                        self.arch,
                )
 
-               if self.build.owner:
+               # Have a large shared cache for all test builds
+               if self.is_test():
+                       path = os.path.join(
+                               "test",
+                               path,
+                       )
+
+               # Give each user their own private ccache
+               elif self.build.owner:
                        path = os.path.join(
                                "~%s" % self.build.owner.name,
                                path,