releasing 1.8.3.post2 #62857
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Docs | |
| # https://github.com/marketplace/actions/sphinx-build | |
| on: | |
| push: | |
| branches: ["master", "release/*"] | |
| # use this event type to share secrets with forks. | |
| # it's important that the PR head SHA is checked out to run the changes | |
| pull_request_target: | |
| branches: ["master", "release/*"] | |
| paths: | |
| - ".actions/**" | |
| - "requirements/**" | |
| - "docs/**" | |
| - "src/**" | |
| - "setup.py" | |
| - "setup.cfg" # includes metadata used in the package creation | |
| - ".github/workflows/docs-checks.yml" | |
| - "!*.md" | |
| - "!**/*.md" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | |
| cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }} | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| make-doctest: | |
| runs-on: ubuntu-20.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| pkg-name: ["app", "pytorch"] | |
| env: | |
| FREEZE_REQUIREMENTS: "1" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.9" | |
| - uses: aws-actions/configure-aws-credentials@v1 | |
| if: ${{ matrix.pkg-name == 'app' }} | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_ID }} | |
| aws-region: us-east-1 | |
| - run: aws s3 sync s3://sphinx-packages/ pypi/ | |
| if: ${{ matrix.pkg-name == 'app' }} | |
| # Note: This uses an internal pip API and may not always work | |
| # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow | |
| - name: Cache pip | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-docs-test-${{ matrix.pkg-name }}-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-docs-test-${{ matrix.pkg-name }}- | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake pandoc | |
| pip --version | |
| - name: Install LAI package | |
| # This is needed as App docs is heavily using/referring to lightning package | |
| if: ${{ matrix.pkg-name == 'app' }} | |
| run: | | |
| pip install -e . -U -f https://download.pytorch.org/whl/cpu/torch_stable.html -f pypi | |
| git checkout -- . | |
| - name: Adjust docs refs | |
| if: ${{ matrix.pkg-name == 'app' }} | |
| run: | | |
| pip install -q -r .actions/requirements.txt | |
| python .actions/assistant.py copy_replace_imports --source_dir="./docs" --source_import="pytorch_lightning,lightning_lite" --target_import="lightning.pytorch,lightning.lite" | |
| - name: Install this package | |
| env: | |
| PACKAGE_NAME: ${{ matrix.pkg-name }} | |
| run: | | |
| pip install -e .[extra,cloud,ui] -U -r requirements/${{ matrix.pkg-name }}/docs.txt -f pypi | |
| pip list | |
| - name: Test Documentation | |
| env: | |
| SPHINX_MOCK_REQUIREMENTS: 0 | |
| working-directory: ./docs/source-${{ matrix.pkg-name }} | |
| run: | | |
| make doctest | |
| make coverage | |
| make-html: | |
| runs-on: ubuntu-20.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| pkg-name: ["app", "pytorch"] | |
| env: | |
| FREEZE_REQUIREMENTS: "1" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.9" | |
| - uses: aws-actions/configure-aws-credentials@v1 | |
| if: ${{ matrix.pkg-name != 'pytorch' }} | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_ID }} | |
| aws-region: us-east-1 | |
| - run: aws s3 sync s3://sphinx-packages/ pypi/ | |
| if: ${{ matrix.pkg-name != 'pytorch' }} | |
| # Note: This uses an internal pip API and may not always work | |
| # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow | |
| - name: Cache pip | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-docs-make-${{ matrix.pkg-name }}-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-docs-make-${{ matrix.pkg-name }}- | |
| - name: Install package & dependencies | |
| env: | |
| PACKAGE_NAME: ${{ matrix.pkg-name }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake pandoc texlive-latex-extra dvipng texlive-pictures | |
| pip --version | |
| pip install -e . -U -r requirements/${{ matrix.pkg-name }}/docs.txt \ | |
| -f https://download.pytorch.org/whl/cpu/torch_stable.html -f pypi | |
| pip list | |
| shell: bash | |
| - name: Make Documentation | |
| working-directory: ./docs/source-${{ matrix.pkg-name }} | |
| run: | | |
| make html --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going" | |
| - name: Upload built docs | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: docs-${{ matrix.pkg-name }}-${{ github.sha }} | |
| path: docs/build/html/ | |
| # Use always() to always run this step to publish test results when there are test failuress | |
| if: success() |