set fetch-depth: 1
Fixes #ISSUE_NUMBER
tested via #75232 b/c need to change the source of the workflow
- set fetch-depth: 1
- manually checkout additional branches/history (usually either viable/strict, or master and the rest of the commit's history) when needed
- seems to reduce checkout time by about 30s for jobs that don't need additional branches/history, but minimal improvement otherwise
- checkouts for most lint jobs now takes <15s
Rough estimates for how long different parts of checkout take on linux (windows is similar, but scaled up):
- just the commit, no history: <15s, seems to be around 6-7s
- viable/strict: 25-30s
- submodules: 80-120s
- master + commit history: 40-50s (if checked out viable/strict before this, then this time is much smaller, <10s)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75783
Approved by: https://github.com/seemethere, https://github.com/janeyx99