reverting optional task for v0.11 [wip] #10590
This file contains 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: "Docs check" | |
# https://github.com/marketplace/actions/sphinx-build | |
on: | |
- pull_request | |
jobs: | |
test-docs: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
# 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 }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: ${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install -e . -U -q -r requirements/docs.txt -f https://download.pytorch.org/whl/cpu/torch_stable.html | |
python --version ; pip --version ; pip list | |
shell: bash | |
- name: Test Documentation | |
env: | |
SPHINX_MOCK_REQUIREMENTS: 0 | |
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: 'python' | |
working-directory: ./docs | |
run: | | |
# First run the same pipeline as Read-The-Docs | |
sudo apt-get update && sudo apt-get install -y cmake | |
make doctest | |
make coverage | |
shell: bash | |
make-docs: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
# 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 }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements/docs.txt') }} | |
restore-keys: ${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install -e . -U -q -r requirements/docs.txt -f https://download.pytorch.org/whl/torch_stable.html | |
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux | |
sudo apt-get update | |
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures | |
python --version | |
pip --version | |
pip list | |
shell: bash | |
- name: Make Documentation | |
# First run the same pipeline as Read-The-Docs | |
working-directory: ./docs | |
run: | | |
make clean | |
make html --debug SPHINXOPTS="-W --keep-going" -b linkcheck | |
- name: Upload built docs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs-build | |
path: docs/build/ | |
if: always() | |
paper-JOSS: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build PDF | |
uses: openjournals/[email protected] | |
with: | |
journal: joss | |
# This should be the path to the paper within your repo. | |
paper-path: ./docs/paper_JOSS/paper.md | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: JOSS paper | |
# This is the output path where Pandoc will write the compiled | |
# PDF. Note, this should be the same directory as the input paper.md | |
path: ./docs/paper_JOSS/paper.pdf | |
paper-cite: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Validate | |
run: | | |
pip install -q cffconvert | |
cffconvert --validate -i CITATION.cff |