Extract repeated scripts into files (#19674)
Summary:
The current pytorch config.yml is causing some backend performance
problems on CircleCI, due to the size of the file when all of the YAML
anchors have been expanded. You can view the "processed" config as our
internal system deal with it by running `circleci config process`.
circleci config process .circleci/config.yml | wc -c
Before: 2833769 bytes
After: 558252 bytes (~80% less)
Add create a new job, `setup`, that has 2 functions:
- Assert that config.yml is up to date
- Put the .circleci/scripts directory into a workspace, so that
downstream jobs can easily access it.
The `setup` job becomes the parent of all jobs in the workflow. This
allows us to fail fast if config is invalid. It might be a good place to
add other, quick, lint checks to help fail the build faster.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19674
Differential Revision: D15252864
Pulled By: pjh5
fbshipit-source-id: 0778c7b8f95e7f3f33ac92fbb8862377fc9fb0ac