From 295a4b502e10748d2a48a91eba70d77ce4d09fd4 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 21 Aug 2024 14:37:44 +0200 Subject: syz-ci: accept a BuildJobs parameter The parameter defines the maximum number of CPUs involved in the kernel build process. --- pkg/bisect/bisect.go | 2 ++ pkg/instance/instance.go | 2 ++ 2 files changed, 4 insertions(+) (limited to 'pkg') diff --git a/pkg/bisect/bisect.go b/pkg/bisect/bisect.go index 2654b5dec..1fd08d1ca 100644 --- a/pkg/bisect/bisect.go +++ b/pkg/bisect/bisect.go @@ -37,6 +37,7 @@ type Config struct { Manager *mgrconfig.Config BuildSemaphore *instance.Semaphore TestSemaphore *instance.Semaphore + BuildJobs int // CrossTree specifies whether a cross tree bisection is to take place, i.e. // Kernel.Commit is not reachable from Kernel.Branch. // In this case, bisection starts from their merge base. @@ -625,6 +626,7 @@ func (env *env) build() (*vcs.Commit, string, error) { CmdlineFile: kern.Cmdline, SysctlFile: kern.Sysctl, KernelConfig: bisectEnv.KernelConfig, + BuildJobs: env.cfg.BuildJobs, }) if imageDetails.CompilerID != "" { env.log("compiler: %v", imageDetails.CompilerID) diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index c5e53aa6d..0012444f0 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -49,6 +49,7 @@ type BuildKernelConfig struct { CmdlineFile string SysctlFile string KernelConfig []byte + BuildJobs int } func NewEnv(cfg *mgrconfig.Config, buildSem, testSem *Semaphore) (Env, error) { @@ -153,6 +154,7 @@ func (env *env) BuildKernel(buildCfg *BuildKernelConfig) ( CmdlineFile: buildCfg.CmdlineFile, SysctlFile: buildCfg.SysctlFile, Config: buildCfg.KernelConfig, + BuildJobs: buildCfg.BuildJobs, } details, err := build.Image(params) if err != nil { -- cgit mrf-deployment