Skip to content

speedup sphinx build with caching pip #13209

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

Merged
merged 1 commit into from
Feb 24, 2020

Conversation

smoench
Copy link
Contributor

@smoench smoench commented Feb 21, 2020

No description provided.

@smoench smoench changed the base branch from master to 3.4 February 21, 2020 16:11
@javiereguiluz
Copy link
Member

@smoench this is really nice. Thanks for all your help to improve the performance of the doc linter.

@wouterj
Copy link
Member

wouterj commented Feb 22, 2020

Thanks a lot!

In the CMF docs, we also cached $HOME/.cache/pip, to speed up pip. Maybe that's an option here as well?

@smoench
Copy link
Contributor Author

smoench commented Feb 22, 2020

Sure, I was also thinking about that

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

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

Nice Improvement ✌🏻

@smoench smoench force-pushed the speedup-sphinx-build branch 4 times, most recently from e69291f to e69fea3 Compare February 22, 2020 13:45
@smoench
Copy link
Contributor Author

smoench commented Feb 22, 2020

I don't know what causes following error:

Warning, treated as error:
/home/runner/work/symfony-docs/symfony-docs/form/form_customization.rst:None: WARNING: duplicate label form-customization-sidebar, other instance in /home/runner/work/symfony-docs/symfony-docs/form/form_themes.rst

@smoench smoench force-pushed the speedup-sphinx-build branch 3 times, most recently from 9ecfd7c to a50aa2b Compare February 22, 2020 18:21
@wouterj
Copy link
Member

wouterj commented Feb 22, 2020

I don't know what causes following error:

Hmm, that reference target (form-customization-sidebar) lives in form/form_customization.rst in 3.4 and in form/form_themes.rst for the newer versions. Seems like the cache is maybe shared among all branches, resulting in this error? Or does the docs somehow render a wrong version of the documentation?

@smoench smoench force-pushed the speedup-sphinx-build branch 3 times, most recently from 5a0abdf to 7c4b3cc Compare February 22, 2020 18:57
@smoench
Copy link
Contributor Author

smoench commented Feb 22, 2020

On the first try the base branch was on master but changed I changed it to 3.4. I thought it wouldn't matter as of the cache restrictions https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache.
I changed cache keys now.

But some how after the cache hit and cache file has been extracted, sphinx thinks all files has been changed. So cache does not work properly 🤷‍♂

@OskarStark
Copy link
Contributor

So we only go with the pip cache and not the other ones?

@smoench smoench force-pushed the speedup-sphinx-build branch from 7c4b3cc to 65f9417 Compare February 24, 2020 09:08
@smoench
Copy link
Contributor Author

smoench commented Feb 24, 2020

Unfortunately, yes! But perhaps someone can confirm that it is working with a more latest sphinx version than 1.3.6.

@smoench
Copy link
Contributor Author

smoench commented Feb 24, 2020

Well, Sphinx uses mtime (in all versions) for detecting changes. This works on a local machine but not in a CI that makes a fresh checkout.

@smoench smoench changed the title speedup sphinx build/linting with caching doctrees and html output speedup sphinx build with caching pip Feb 24, 2020
OskarStark added a commit to sonata-project/dev-kit that referenced this pull request Feb 24, 2020
OskarStark added a commit to sonata-project/dev-kit that referenced this pull request Feb 24, 2020
OskarStark added a commit to sonata-project/dev-kit that referenced this pull request Feb 24, 2020
OskarStark added a commit to sonata-project/dev-kit that referenced this pull request Feb 24, 2020
@OskarStark
Copy link
Contributor

Thank you Simon.

@OskarStark OskarStark merged commit 2bb9264 into symfony:3.4 Feb 24, 2020
@smoench smoench deleted the speedup-sphinx-build branch February 24, 2020 11:21
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.

5 participants