mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
bazel: limit concurrency of mkosi_image rule
The mkosi_image rule uses a lot of memory. In order to allow higher levels of concurrency, such as `bazel build --jobs 128`, we need to more accurately model the amount of CPU and memory required.
This commit is contained in:
parent
1b3b3041d7
commit
6533351dd9
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
load("@bazel_skylib//lib:paths.bzl", "paths")
|
load("@bazel_skylib//lib:paths.bzl", "paths")
|
||||||
|
|
||||||
|
def _resource_set(_os, _num_inputs):
|
||||||
|
return {"cpu": 4, "memory": 4096}
|
||||||
|
|
||||||
def _mkosi_image_impl(ctx):
|
def _mkosi_image_impl(ctx):
|
||||||
args = ctx.actions.args()
|
args = ctx.actions.args()
|
||||||
inputs = []
|
inputs = []
|
||||||
@ -99,6 +102,7 @@ def _mkosi_image_impl(ctx):
|
|||||||
execution_requirements = {"no-remote": "1", "no-sandbox": "1"},
|
execution_requirements = {"no-remote": "1", "no-sandbox": "1"},
|
||||||
progress_message = "Building mkosi image " + ctx.label.name,
|
progress_message = "Building mkosi image " + ctx.label.name,
|
||||||
env = env,
|
env = env,
|
||||||
|
resource_set = _resource_set,
|
||||||
)
|
)
|
||||||
return DefaultInfo(files = depset(outputs), runfiles = ctx.runfiles(outputs))
|
return DefaultInfo(files = depset(outputs), runfiles = ctx.runfiles(outputs))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user