[Python-checkins] gh-93735: Split Docs CI to speed-up the build (GH-93736)
miss-islington
webhook-mailer at python.org
Wed Jun 15 04:23:19 EDT 2022
https://github.com/python/cpython/commit/7db66d8816e9a7d1410b471f8f8222abeae059c5
commit: 7db66d8816e9a7d1410b471f8f8222abeae059c5
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-06-15T01:23:08-07:00
summary:
gh-93735: Split Docs CI to speed-up the build (GH-93736)
(cherry picked from commit 4f26963526f386bba84de8e14962163bfd5da955)
Co-authored-by: Adam Turner <9087854+AA-Turner at users.noreply.github.com>
files:
M .github/workflows/doc.yml
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 8c4a034896126..73a6a50520e02 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -23,6 +23,7 @@ on:
paths:
- 'Doc/**'
- 'Misc/**'
+ - '.github/workflows/doc.yml'
jobs:
build_doc:
@@ -32,6 +33,38 @@ jobs:
- uses: actions/checkout at v3
- name: Register Sphinx problem matcher
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
+ - name: 'Set up Python'
+ uses: actions/setup-python at 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 at 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 at v3
+ - name: Register Sphinx problem matcher
+ run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
+ - uses: actions/cache at 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'
@@ -40,17 +73,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 at v3
- with:
- name: doc-html
- path: Doc/build/html
+ run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" doctest
More information about the Python-checkins
mailing list