Extend workflow sync to more workflow (#106331)

To `slow.yml` and `mac-mps.yaml`, based on the results of the following grep:
```
% grep "sync-tag: " .github/workflows/*.yml
.github/workflows/mac-mps.yml:      sync-tag: macos-12-py3-arm64-build
.github/workflows/mac-mps.yml:      sync-tag: macos-12-py3-arm64-mps-test
.github/workflows/pull.yml:      sync-tag: asan-build
.github/workflows/pull.yml:      sync-tag: asan-test
.github/workflows/pull.yml:      sync-tag: win-cpu-build
.github/workflows/pull.yml:      sync-tag: rocm-build
.github/workflows/slow.yml:      sync-tag: asan-build
.github/workflows/slow.yml:      sync-tag: asan-test
.github/workflows/trunk.yml:      sync-tag: macos-12-py3-arm64-build
.github/workflows/trunk.yml:      sync-tag: macos-12-py3-arm64-mps-test
.github/workflows/trunk.yml:      sync-tag: win-cpu-build
.github/workflows/trunk.yml:      sync-tag: win-cuda-build
.github/workflows/trunk.yml:      sync-tag: rocm-build
```

Allow synced workflows to diverge with regards to `test-matrix`, to allow for both `mac-mps` and slow part of ASAN tests.

Discovered while working on https://github.com/pytorch/pytorch/pull/105260 that slow sync-tag is not checked.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106331
Approved by: https://github.com/huydhn, https://github.com/atalman, https://github.com/seemethere
This commit is contained in:
Nikita Shulga 2023-08-01 00:47:28 +00:00 committed by PyTorch MergeBot
parent 55f9359d36
commit e075f91dcc
2 changed files with 6 additions and 0 deletions

View File

@ -870,6 +870,8 @@ include_patterns = [
'.github/workflows/pull.yml',
'.github/workflows/trunk.yml',
'.github/workflows/periodic.yml',
'.github/workflows/mac-mps.yml',
'.github/workflows/slow.yml',
]
command = [
'python3',

View File

@ -102,6 +102,10 @@ if __name__ == "__main__":
if "if" in job:
del job["if"]
# same is true for ['with']['test-matrix']
if "test-matrix" in job.get("with", {}):
del job["with"]["test-matrix"]
tag_to_jobs[sync_tag].append((path, {job_id: job}))
# For each sync tag, check that all the jobs have the same code.