diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1f47e1defc2..33078067776 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,6 +10,8 @@ on: - landchecks/* workflow_dispatch: +# The names of steps that actually test the code should be suffixed with `(nonretryable)`. +# When any other step fails, it's job will be retried once by retryBot. jobs: lintrunner: runs-on: linux.20_04.16x @@ -46,7 +48,7 @@ jobs: --tags-path aten/src/ATen/native/tags.yaml \ --deprecated-functions-path "tools/autograd/deprecated.yaml" - - name: Run lintrunner on all files + - name: Run lintrunner on all files (nonretryable) run: | set +e if ! lintrunner --force-color --all-files --tee-json=lint.json; then @@ -98,20 +100,20 @@ jobs: # NB: We use 'printf' below rather than '\u000a' since bash pre-4.2 # does not support the '\u000a' syntax (which is relevant for local linters) (! git --no-pager grep -In "$(printf '\xC2\xA0')" -- . || (echo "The above lines have non-breaking spaces (U+00A0); please convert them to spaces (U+0020)"; false)) - - name: Ensure cross-OS compatible file names + - name: Ensure cross-OS compatible file names (nonretryable) if: always() run: | (! git ls-files | grep -E '([<>:"|?*]|[ .]$)' || (echo "The above file names are not valid across all operating systems. Please ensure they don't contain the characters '<>:""|?*' and don't end with a white space or a '.' "; false)) - - name: Ensure no versionless Python shebangs + - name: Ensure no versionless Python shebangs (nonretryable) if: always() run: | (! git --no-pager grep -In '#!.*python$' -- . || (echo "The above lines have versionless Python shebangs; please specify either python2 or python3"; false)) - - name: C++ docs check + - name: C++ docs check (nonretryable) if: ${{ always() && steps.requirements.outcome == 'success' }} run: | sudo apt-get install -y doxygen cd docs/cpp/source && ./check-doxygen.sh - - name: CUDA kernel launch check + - name: CUDA kernel launch check (nonretryable) if: ${{ always() && steps.requirements.outcome == 'success' }} run: | set -eux @@ -128,7 +130,7 @@ jobs: with: submodules: false fetch-depth: -1 - - name: PR size check + - name: PR size check (nonretryable) env: BASE: ${{ github.event.pull_request.base.sha }} HEAD: ${{ github.event.pull_request.head.sha }} @@ -162,10 +164,10 @@ jobs: - name: Install Jinja2 run: | pip install Jinja2==3.0.1 --user - - name: Regenerate workflows + - name: Regenerate workflows (nonretryable) id: generate_workflows run: .github/scripts/generate_ci_workflows.py - - name: Assert that regenerating the workflows didn't change them + - name: Assert that regenerating the workflows didn't change them (nonretryable) run: | if ! .github/scripts/report_git_status.sh .github/workflows; then echo @@ -179,7 +181,7 @@ jobs: echo 'onto a more recent commit from the PyTorch master branch.' false fi - - name: Check that jobs will be cancelled + - name: Check that jobs will be cancelled (nonretryable) if: ${{ always() && steps.generate_workflows.outcome == 'success' }} run: | .github/scripts/ensure_actions_will_cancel.py @@ -202,7 +204,7 @@ jobs: uses: actions/setup-node@v3 - name: Install markdown-toc run: npm install -g markdown-toc - - name: Regenerate ToCs and check that they didn't change + - name: Regenerate ToCs and check that they didn't change (nonretryable) run: | set -eu export PATH=~/.npm-global/bin:"$PATH" @@ -262,7 +264,7 @@ jobs: pip install -r requirements.txt --user pip install mypy==0.960 --user make setup_lint - - name: Test tools + - name: Test tools (nonretryable) run: | python3 -m unittest discover -vs tools/test -p 'test_*.py' python3 -m unittest discover -vs .github/scripts -p 'test_*.py' @@ -308,7 +310,7 @@ jobs: pip install -r requirements.txt # Doesn't really matter what torch version, we just need ANY torch installed pip install 'torch==1.*' - - name: Run collect_env.py + - name: Run collect_env.py (nonretryable) run: | # All we need to see is that it passes python3 torch/utils/collect_env.py