Simplify .github/scripts/generate_ci_workflows.py (#58491)

Summary:
This PR simplifies `.github/scripts/generate_ci_workflows.py` by using the same strategy as https://github.com/pytorch/pytorch/issues/54344, representing workflows as plain data to avoid duplicating the definition of the `generate_workflow_file` function. This will make the script easier to maintain if/when that function is modified and/or more workflow types are added.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/58491

Test Plan:
The Lint job in CI; specifically:
```
make generate-gha-workflows
mypy --config mypy-strict.ini
```

Reviewed By: malfet, seemethere

Differential Revision: D28511918

Pulled By: samestep

fbshipit-source-id: aaf415a954d938a29aee7c9367c9bc2b9f44bb01
This commit is contained in:
Sam Estep
2021-05-18 11:48:16 -07:00
committed by Facebook GitHub Bot
parent f7c15610aa
commit 46484e8dfe
2 changed files with 52 additions and 64 deletions

View File

@ -37,6 +37,7 @@ strict_equality = True
files =
.github/scripts/generate_binary_build_matrix.py,
.github/scripts/generate_ci_workflows.py,
.github/scripts/parse_ref.py,
benchmarks/instruction_counts,
tools/actions_local_runner.py,