|
23 | 23 | paths:
|
24 | 24 | - 'Doc/**'
|
25 | 25 | - 'Misc/**'
|
| 26 | + - '.github/workflows/doc.yml' |
26 | 27 |
|
27 | 28 | jobs:
|
28 | 29 | build_doc:
|
|
32 | 33 | - uses: actions/checkout@v3
|
33 | 34 | - name: Register Sphinx problem matcher
|
34 | 35 | run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
|
| 36 | + - name: 'Set up Python' |
| 37 | + uses: actions/setup-python@v4 |
| 38 | + with: |
| 39 | + python-version: '3' |
| 40 | + cache: 'pip' |
| 41 | + cache-dependency-path: 'Doc/requirements.txt' |
| 42 | + - name: 'Install build dependencies' |
| 43 | + run: make -C Doc/ venv |
| 44 | + - name: 'Check documentation' |
| 45 | + run: make -C Doc/ check |
| 46 | + - name: 'Build HTML documentation' |
| 47 | + run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html |
| 48 | + - name: 'Upload' |
| 49 | + uses: actions/upload-artifact@v3 |
| 50 | + with: |
| 51 | + name: doc-html |
| 52 | + path: Doc/build/html |
| 53 | + |
| 54 | + # Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release |
| 55 | + doctest: |
| 56 | + name: 'Doctest' |
| 57 | + runs-on: ubuntu-latest |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v3 |
| 60 | + - name: Register Sphinx problem matcher |
| 61 | + run: echo "::add-matcher::.github/problem-matchers/sphinx.json" |
| 62 | + - uses: actions/cache@v3 |
| 63 | + with: |
| 64 | + path: ~/.cache/pip |
| 65 | + key: ubuntu-doc-${{ hashFiles('Doc/requirements.txt') }} |
| 66 | + restore-keys: | |
| 67 | + ubuntu-doc- |
35 | 68 | - name: 'Install Dependencies'
|
36 | 69 | run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
|
37 | 70 | - name: 'Configure CPython'
|
|
40 | 73 | run: make -j4
|
41 | 74 | - name: 'Install build dependencies'
|
42 | 75 | run: make -C Doc/ PYTHON=../python venv
|
43 |
| - # Run "check doctest html" as 3 steps to get a more readable output |
44 |
| - # in the web UI |
45 |
| - - name: 'Check documentation' |
46 |
| - run: make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" check |
47 | 76 | # Use "xvfb-run" since some doctest tests open GUI windows
|
48 | 77 | - name: 'Run documentation doctest'
|
49 |
| - run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" doctest |
50 |
| - - name: 'Build HTML documentation' |
51 |
| - run: make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" html |
52 |
| - - name: 'Upload' |
53 |
| - uses: actions/upload-artifact@v3 |
54 |
| - with: |
55 |
| - name: doc-html |
56 |
| - path: Doc/build/html |
| 78 | + run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" doctest |
0 commit comments