Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Jun 11, 2022

#93735

A

@AA-Turner
Copy link
Member Author

@AA-Turner AA-Turner commented Jun 11, 2022

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 actions/setup-python, and for the second I removed make check and make html.

A

Copy link
Member

@hugovk hugovk left a comment

A nice speed improvement!

Looking at an earlier build (~15 mins):

image

This has parallel docs (~4 min) and doctest (~7 min):

image

and

image

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)!

.github/workflows/doc.yml Outdated Show resolved Hide resolved
name: 'Doctest'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Copy link
Member

@hugovk hugovk Jun 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: actions/checkout@v3
- uses: actions/checkout@v4

Copy link
Member

@ezio-melotti ezio-melotti Jun 12, 2022

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

Copy link
Member Author

@AA-Turner AA-Turner Jun 12, 2022

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

.github/workflows/doc.yml Outdated Show resolved Hide resolved
@AA-Turner
Copy link
Member Author

@AA-Turner AA-Turner commented Jun 11, 2022

CI failed because of:

There is no default python version for this setup-python major version, the action requires to specify either python-version input or python-version-file input. If the python-version input is not specified the action will try to read required version from file from python-version-file input.

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
Copy link
Member

@ezio-melotti ezio-melotti Jun 12, 2022

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

- 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
Copy link
Member

@ezio-melotti ezio-melotti Jun 12, 2022

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?)

Copy link
Member Author

@AA-Turner AA-Turner Jun 12, 2022

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

- name: 'Install build dependencies'
run: make -C Doc/ venv
- name: 'Check documentation'
run: make -C Doc/ SPHINXOPTS="-q -W --keep-going" check
Copy link
Member

@ezio-melotti ezio-melotti Jun 12, 2022

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"
Copy link
Member

@ezio-melotti ezio-melotti Jun 12, 2022

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?

Copy link
Member Author

@AA-Turner AA-Turner Jun 12, 2022

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

Copy link
Member

@hugovk hugovk Jun 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- Split to SPHINXOPTS and SPHINXERRORHANDLING
- Remove SPHINXOPTS from make check
hugovk
hugovk approved these changes Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants