Try to speed up lintrunner in CI (#124311)

Before timing: clang is 19min and noclang is 16min
After timing: clang is 17min and noclang is 15min

This is still crazy slow so most likely more could be done but didn't check the logs in details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/124311
Approved by: https://github.com/ezyang, https://github.com/Skylion007
This commit is contained in:
albanD
2024-04-18 01:17:44 +00:00
committed by PyTorch MergeBot
parent cc66c43d51
commit fae31495ff

View File

@ -6,6 +6,9 @@ CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
eval "$(command conda 'shell.bash' 'hook' 2> /dev/null)"
conda activate "${CONDA_ENV}"
# Use uv to speed up lintrunner init
python3 -m pip install uv
CACHE_DIRECTORY="/tmp/.lintbin"
# Try to recover the cached binaries
if [[ -d "${CACHE_DIRECTORY}" ]]; then