2019-12-16 14:35:22 -04:00
|
|
|
name: Docs
|
|
|
|
|
|
|
|
on:
|
2021-10-21 17:34:18 -03:00
|
|
|
workflow_dispatch:
|
2019-12-16 14:35:22 -04:00
|
|
|
#push:
|
|
|
|
# branches:
|
2021-05-19 12:14:37 -03:00
|
|
|
# - 'main'
|
2022-05-08 00:01:20 -03:00
|
|
|
# - '3.11'
|
2021-05-19 12:14:37 -03:00
|
|
|
# - '3.10'
|
|
|
|
# - '3.9'
|
|
|
|
# - '3.8'
|
|
|
|
# - '3.7'
|
2019-12-16 14:35:22 -04:00
|
|
|
# paths:
|
|
|
|
# - 'Doc/**'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-05-19 12:14:37 -03:00
|
|
|
- 'main'
|
2022-05-08 00:01:20 -03:00
|
|
|
- '3.11'
|
2021-05-19 12:14:37 -03:00
|
|
|
- '3.10'
|
|
|
|
- '3.9'
|
|
|
|
- '3.8'
|
|
|
|
- '3.7'
|
2019-12-16 14:35:22 -04:00
|
|
|
paths:
|
|
|
|
- 'Doc/**'
|
|
|
|
- 'Misc/**'
|
2022-06-15 04:56:16 -03:00
|
|
|
- '.github/workflows/doc.yml'
|
2019-12-16 14:35:22 -04:00
|
|
|
|
2022-05-21 04:55:21 -03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2019-12-16 14:35:22 -04:00
|
|
|
jobs:
|
|
|
|
build_doc:
|
|
|
|
name: 'Docs'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-04-20 00:50:07 -03:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-25 18:32:24 -03:00
|
|
|
- name: Register Sphinx problem matcher
|
|
|
|
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
|
2022-06-15 04:56:16 -03:00
|
|
|
- name: 'Set up Python'
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3'
|
|
|
|
cache: 'pip'
|
|
|
|
cache-dependency-path: 'Doc/requirements.txt'
|
|
|
|
- name: 'Install build dependencies'
|
|
|
|
run: make -C Doc/ venv
|
|
|
|
- name: 'Check documentation'
|
|
|
|
run: make -C Doc/ check
|
|
|
|
- name: 'Build HTML documentation'
|
|
|
|
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
|
|
|
|
- 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
|
|
|
|
- name: Register Sphinx problem matcher
|
|
|
|
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
|
|
|
key: ubuntu-doc-${{ hashFiles('Doc/requirements.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
ubuntu-doc-
|
2020-01-17 19:44:38 -04:00
|
|
|
- name: 'Install Dependencies'
|
|
|
|
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
|
|
|
|
- name: 'Configure CPython'
|
|
|
|
run: ./configure --with-pydebug
|
|
|
|
- name: 'Build CPython'
|
2020-02-26 15:21:41 -04:00
|
|
|
run: make -j4
|
2019-12-16 14:35:22 -04:00
|
|
|
- name: 'Install build dependencies'
|
2020-01-17 19:44:38 -04:00
|
|
|
run: make -C Doc/ PYTHON=../python venv
|
2021-12-09 19:02:20 -04:00
|
|
|
# Use "xvfb-run" since some doctest tests open GUI windows
|
|
|
|
- name: 'Run documentation doctest'
|
2022-07-30 19:21:08 -03:00
|
|
|
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="-W --keep-going" doctest
|