From f7863c6bb3c5048d7659787d009e46c47a40f5ad Mon Sep 17 00:00:00 2001 From: Shitanshu Shah Date: Fri, 6 Dec 2024 22:16:27 -0800 Subject: [PATCH] Follow-up to earlier commit to change label to 8-core Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1086 Discussed with Opensource team further. 4-core-ubuntu-22.04 label does not work since it does not exist and runners can work only with the allocated list of labels. Opensource team has now added necessary label, is added for 8-core as requested. So, now making code change for good, hopefully! https://fb.workplace.com/groups/osssupport/permalink/27367197886235467/ Reviewed By: xiangxu1121 Differential Revision: D66487987 fbshipit-source-id: 62fa2b60b5613876aaa1f0c1a47dde8826746926 --- build/fbcode_builder/getdeps.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/fbcode_builder/getdeps.py b/build/fbcode_builder/getdeps.py index 5f66374f7d9..03a5f3c0430 100755 --- a/build/fbcode_builder/getdeps.py +++ b/build/fbcode_builder/getdeps.py @@ -1021,6 +1021,8 @@ def write_job_for_platform(self, platform, args): # noqa: C901 if build_opts.is_linux(): artifacts = "linux" runs_on = f"ubuntu-{args.ubuntu_version}" + if args.cpu_cores: + runs_on = f"{args.cpu_cores}-core-ubuntu-{args.ubuntu_version}" elif build_opts.is_windows(): artifacts = "windows" runs_on = "windows-2019" @@ -1272,6 +1274,10 @@ def setup_project_cmd_parser(self, parser): parser.add_argument( "--ubuntu-version", default="22.04", help="Version of Ubuntu to use" ) + parser.add_argument( + "--cpu-cores", + help="Number of CPU cores to use (applicable for Linux OS)", + ) parser.add_argument( "--cron", help="Specify that the job runs on a cron schedule instead of on pushes",