Skip to content

Build CF host debian packages in parallel#2621

Open
0405ysj wants to merge 1 commit into
google:mainfrom
0405ysj:better_presubmit
Open

Build CF host debian packages in parallel#2621
0405ysj wants to merge 1 commit into
google:mainfrom
0405ysj:better_presubmit

Conversation

@0405ysj
Copy link
Copy Markdown
Collaborator

@0405ysj 0405ysj commented May 28, 2026

In build-debian-package-{arch} GitHub workflow job, it tries to build debian packages for each directory in a row. This PR suggests to build CF host debian packages in parallel, and wait until all build procedure is done. I expect we can reduce presubmit/postsubmit workflow time with applying this PR.

However, you can see the elapsed time of build-debian-package-{arch} is huge. This is intended behavior, as the bazel cache is invalidated by changing corresponding GitHub action code. Once it's merged to the main branch and writing bazel cache via postsubmit procedure, I expect it would be reduced as intended.

@0405ysj 0405ysj force-pushed the better_presubmit branch from 8d44224 to cc95702 Compare May 28, 2026 17:57
@0405ysj 0405ysj force-pushed the better_presubmit branch from cc95702 to 5da31b0 Compare May 28, 2026 21:15
@0405ysj 0405ysj requested a review from Databean May 29, 2026 13:50
@0405ysj 0405ysj added the kokoro:force-run Trigger a presubmit build unconditionally. label May 29, 2026
@0405ysj 0405ysj marked this pull request as ready for review May 29, 2026 13:50
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:force-run Trigger a presubmit build unconditionally. label May 29, 2026
@0405ysj 0405ysj requested review from ikicha and k311093 May 29, 2026 19:41
Comment on lines +28 to +29
sudo docker build --file "tools/buildutils/cw/Containerfile" --tag "android-cuttlefish-build" .
sudo docker run -v=$PWD:/mnt/build -w /mnt/build -v=$HOME/bazel-disk-cache:/root/bazel-disk-cache android-cuttlefish-build base -d /root/bazel-disk-cache &
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The standard GitHub runners claim to have only 4 CPUs allocated. On top of that, bazel and go build which are used for cuttlefish-base and cuttlefish-frontend already have parallelism built in. I believe npm install is the only build system that will run serially, while the others will expand to fill all available CPUs, without coordinating to share the CPUs with other build systems.

By default docker run will use CPU share constraints for giving CPU time out to instances, but will still report the number of available CPUs that the host has unless controlled with a cpuset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants