Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Speed-up docs CI
  • Loading branch information
AA-Turner committed Jun 11, 2022
commit 83f05a810dd97166d6f5955c99e81fe0bfa54cad
43 changes: 32 additions & 11 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
paths:
- 'Doc/**'
- 'Misc/**'
- '.github/workflows/doc.yml'

jobs:
build_doc:
Expand All @@ -32,6 +33,37 @@ jobs:
- uses: actions/checkout@v3
- name: Register Sphinx problem matcher
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
- name: 'Setup Python'
Comment thread
AA-Turner marked this conversation as resolved.
Outdated
uses: actions/setup-python@v3
Comment thread
AA-Turner marked this conversation as resolved.
Outdated
with:
cache: 'pip'
cache-dependency-path: 'Doc/requirements.txt'
- name: 'Install build dependencies'
run: make -C Doc/ venv
- name: 'Check documentation'
run: make -C Doc/ SPHINXOPTS="-q -W --keep-going" check
Comment thread
ezio-melotti marked this conversation as resolved.
Outdated
- name: 'Build HTML documentation'
run: make -C Doc/ SPHINXOPTS="-q -W --keep-going" html
Comment thread
ezio-melotti marked this conversation as resolved.
Outdated
- name: 'Upload'
uses: actions/upload-artifact@v3
with:
name: doc-html
path: Doc/build/html

# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
doctest:
name: 'Doctest'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Comment thread
ezio-melotti marked this conversation as resolved.
- name: Register Sphinx problem matcher
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
Comment thread
ezio-melotti marked this conversation as resolved.
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ubuntu-doc-${{ hashFiles('Doc/requirements.txt') }}
restore-keys: |
ubuntu-doc-
- name: 'Install Dependencies'
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
- name: 'Configure CPython'
Expand All @@ -40,17 +72,6 @@ jobs:
run: make -j4
- name: 'Install build dependencies'
run: make -C Doc/ PYTHON=../python venv
# Run "check doctest html" as 3 steps to get a more readable output
# in the web UI
- name: 'Check documentation'
run: make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" check
# Use "xvfb-run" since some doctest tests open GUI windows
- name: 'Run documentation doctest'
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" doctest
- name: 'Build HTML documentation'
run: make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" html
- name: 'Upload'
uses: actions/upload-artifact@v3
with:
name: doc-html
path: Doc/build/html