ci(buildbot): allow up to 3 builds to run in parallel
@@ -116,12 +116,16 @@ c['schedulers'].append(schedulers.ForceScheduler(name="force", builderNames=allB
####### BUILDERS
+# Allow only a single running LLVM build per worker
+llvm_lock = util.WorkerLock("llvm_builds", maxCount=1)
+
bazelKytheSteps = util.BuildFactory()
bazelKytheSteps.addStep(steps.GitHub(repourl=util.Property('repository', 'git://github.com/google/kythe.git'),
mode='incremental'))
bazelBinEnv = {'DEFAULT_BAZEL': '/bin/false', 'BAZEL_VERSION': util.Property('bazel_version', bazelMaxVersion)}
bazelKytheSteps.addStep(steps.ShellCommand(
command=["cache-llvm.sh", "--update"],
+ locks=[llvm_lock.access('counting')],
env=bazelBinEnv,
haltOnFailure=True))
bazelKytheSteps.addStep(steps.ShellCommand(
@@ -149,7 +153,7 @@ goModuleKytheSteps.addStep(steps.ShellCommand(command=["go", "test", "./kythe/..
goModuleKytheSteps.addStep(steps.ShellCommand(command="! { git diff --color=always -- go.{mod,sum} | grep .; }",
warnOnFailure=True))
-build_lock = util.WorkerLock("worker_builds", maxCountForWorker={'local-worker': 1})
+build_lock = util.WorkerLock("worker_builds", maxCount=1, maxCountForWorker={'local-worker': 3})
c['builders'] = []
if bazelMinVersion != bazelMaxVersion:
@@ -159,14 +163,14 @@ if bazelMinVersion != bazelMaxVersion:
workernames=["local-worker"],
properties={'bazel_version': bazelMinVersion,
'bazel_flags': ['--config=remote']},
- locks=[build_lock.access('exclusive')],
+ locks=[build_lock.access('counting')],
factory=bazelKytheSteps))
c['builders'].append(
util.BuilderConfig(
name="bazel-"+bazelMaxVersion,
workernames=["local-worker"],
properties={'bazel_flags': ['--config=remote']},
- locks=[build_lock.access('exclusive')],
+ locks=[build_lock.access('counting')],
factory=bazelKytheSteps))
c['builders'].append(
util.BuilderConfig(
@@ -178,7 +182,7 @@ c['builders'].append(
'//kythe/docs/schema',
'//kythe/release:release_test'
]},
- locks=[build_lock.access('exclusive')],
+ locks=[build_lock.access('counting')],
factory=bazelKytheSteps))
c['builders'].append(
util.BuilderConfig(
