mirror of https://github.com/python/cpython.git
79 lines
2.4 KiB
YAML
79 lines
2.4 KiB
YAML
name: Docs
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build_doc:
|
|
name: 'Docs'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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: '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
|
|
|
|
# This build doesn't use problem matchers or check annotations
|
|
build_doc_oldest_supported_sphinx:
|
|
name: 'Docs (Oldest Sphinx)'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: 'Set up Python'
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11' # known to work with Sphinx 4.2
|
|
cache: 'pip'
|
|
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
|
|
- name: 'Install build dependencies'
|
|
run: make -C Doc/ venv REQUIREMENTS="requirements-oldest-sphinx.txt"
|
|
- name: 'Build HTML documentation'
|
|
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
|
|
|
|
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
|
|
doctest:
|
|
name: 'Doctest'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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'
|
|
run: ./configure --with-pydebug
|
|
- name: 'Build CPython'
|
|
run: make -j4
|
|
- name: 'Install build dependencies'
|
|
run: make -C Doc/ PYTHON=../python venv
|
|
# Use "xvfb-run" since some doctest tests open GUI windows
|
|
- name: 'Run documentation doctest'
|
|
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" doctest
|