New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-93735: Split Docs CI to speed-up the build #93736
base: main
Are you sure you want to change the base?
Conversation
The diff is rendered badly here, but in effect I copy and pasted the job, removed doctest from the first and replaced the python build with A |
A nice speed improvement!
Looking at an earlier build (~15 mins):
This has parallel docs (~4 min) and doctest (~7 min):
and
So even if they ran in serial (they won't), it's still quicker. In part it's because "Build HTML documentation" only takes 2 min instead of 6 min (or sometimes up to 15 min)!
name: 'Doctest' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: actions/checkout@v3 | |
- uses: actions/checkout@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was marked as resolved, but the diff still shows @v3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no checkout v4 action, hence marking as resolved.
A
CI failed because of:
This is a mildly annoying change, I quite like using the default of "give me the latest stable Python". A |
name: 'Doctest' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was marked as resolved, but the diff still shows @v3
.github/workflows/doc.yml
Outdated
- name: 'Check documentation' | ||
run: make -C Doc/ SPHINXOPTS="-q -W --keep-going" check | ||
- name: 'Build HTML documentation' | ||
run: make -C Doc/ SPHINXOPTS="-q -W --keep-going" html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The -W
since to be already included. The output command shows:
PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -j auto -q -W --keep-going -W . build/html
(Not your fault since you were just copy-pasting, but maybe it can be removed here and above?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-W
comes from SPHINXERRORHANDLING, I moved -W
and --keep-going
to SPHINXERRORHANDLING (If better to just put -q --keep-going
in SPHINXOPTS I'll do so, I don't know if it would be possible for the -W
to be lost somehow in other make configuration)
A
.github/workflows/doc.yml
Outdated
- name: 'Install build dependencies' | ||
run: make -C Doc/ venv | ||
- name: 'Check documentation' | ||
run: make -C Doc/ SPHINXOPTS="-q -W --keep-going" check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now using sphinx-lint
, so it doesn't need the SPHINXOPTS
.
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Register Sphinx problem matcher | ||
run: echo "::add-matcher::.github/problem-matchers/sphinx.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this lone echo
work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, copy-pasting! It is actions syntax for the problem matchers, the 'echo' is caught by GHA's log interpreter.
A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs: https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
Added in #20325
Discussed with screenshots in https://discuss.python.org/t/using-github-problem-matchers-to-catch-warnings-early/4254
- Split to SPHINXOPTS and SPHINXERRORHANDLING - Remove SPHINXOPTS from make check
#93735
A