summaryrefslogtreecommitdiffstats
path: root/.github/workflows/doc.yml
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2022-06-15 07:56:16 (GMT)
committerGitHub <noreply@github.com>2022-06-15 07:56:16 (GMT)
commit4f26963526f386bba84de8e14962163bfd5da955 (patch)
tree585e26015778cb50bfee2a8af36eeb0253e62eaa /.github/workflows/doc.yml
parent274769c61c5f3f3d2d749824cbed26e15813ce14 (diff)
downloadcpython-4f26963526f386bba84de8e14962163bfd5da955.zip
cpython-4f26963526f386bba84de8e14962163bfd5da955.tar.gz
cpython-4f26963526f386bba84de8e14962163bfd5da955.tar.bz2
gh-93735: Split Docs CI to speed-up the build (GH-93736)
Diffstat (limited to '.github/workflows/doc.yml')
-rw-r--r--.github/workflows/doc.yml46
1 files changed, 34 insertions, 12 deletions
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 9cd2516..e06f216 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -23,6 +23,7 @@ on:
paths:
- 'Doc/**'
- 'Misc/**'
+ - '.github/workflows/doc.yml'
permissions:
contents: read
@@ -35,6 +36,38 @@ jobs:
- uses: actions/checkout@v3
- name: Register Sphinx problem matcher
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
+ - 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-
- name: 'Install Dependencies'
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
- name: 'Configure CPython'
@@ -43,17 +76,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
+ run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" doctest