Commit 823ec7bd authored by Alex Hornby's avatar Alex Hornby Committed by Facebook GitHub Bot

add os type filtering to generate-github-actions

Summary: Hand to do just one

Reviewed By: zpao

Differential Revision: D32693529

fbshipit-source-id: ac27c79f8a43c540e3b0836eba3a40bd61dd725b
parent b62b4231
...@@ -786,6 +786,8 @@ class GenerateGitHubActionsCmd(ProjectCmdBase): ...@@ -786,6 +786,8 @@ class GenerateGitHubActionsCmd(ProjectCmdBase):
] ]
for p in platforms: for p in platforms:
if args.os_types and p.ostype not in args.os_types:
continue
self.write_job_for_platform(p, args) self.write_job_for_platform(p, args)
def get_run_on(self, args): def get_run_on(self, args):
...@@ -959,6 +961,14 @@ jobs: ...@@ -959,6 +961,14 @@ jobs:
default="main", default="main",
help="Main branch to trigger GitHub Action on", help="Main branch to trigger GitHub Action on",
) )
parser.add_argument(
"--os-type",
help="Filter to just this OS type to run",
choices=["linux", "darwin", "windows"],
action="append",
dest="os_types",
default=[],
)
def get_arg_var_name(args): def get_arg_var_name(args):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment