+
Skip to content

Conversation

PProfizi
Copy link
Contributor

@PProfizi PProfizi commented Jun 5, 2025

The goal is to accelerate doc building using cached Sphinx build files whenever possible.

The caching logic is to retrieve, by order of priority:

  • the cache from last run on this branch
  • the cache from master

The cache should only contain files where Sphinx can detect changes:

  • this is true for modules used by AutoAPI
  • this is true for example scripts

The cache could be based on the hash of a lock file, as differences in installed graphics dependencies could result in changes despite Sphinx not detecting changes in the actual scripts.
That means however the cache will only work if no changes in dependencies.

@PProfizi PProfizi self-assigned this Jun 5, 2025
@PProfizi PProfizi added the CI/CD Related to CI/CD label Jun 5, 2025
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.20%. Comparing base (155b589) to head (35f2ffd).
Report is 2 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2342   +/-   ##
=======================================
  Coverage   84.20%   84.20%           
=======================================
  Files          91       91           
  Lines       10686    10686           
=======================================
  Hits         8998     8998           
  Misses       1688     1688           

@PProfizi PProfizi requested review from moe-ad and removed request for moe-ad June 6, 2025 07:55
Copy link
Contributor

github-actions bot commented Jun 6, 2025

The documentation for this pull request will be available at https://dpf.docs.pyansys.com/pull/2342. Please allow some time for the documentation to be deployed.

@PProfizi
Copy link
Contributor Author

@Revathyvenugopal162 pinging you FYI, this PR tries to use a few sphinx tricks to improve config change detection.
It then tries to add a caching logic to the pipelines to see how short we can the doc build step.
This is work in progress.
As you mentioned on the ansys-sphinx-theme issue, there are definitely extensions still triggering a rebuild somewhere.

@PProfizi
Copy link
Contributor Author

PProfizi commented Jul 11, 2025

We can see here that examples did not run the second time.

The cache generated is 170Mb
image

The second run of doc generation job took 20min instead of 45.

@PProfizi PProfizi changed the title ci(doc): add doc build caching ci(doc): add doc build examples caching Jul 11, 2025
Copy link
Contributor

github-actions bot commented Jul 23, 2025

Some tests with 'continue-on-error: true' have failed:

@PProfizi PProfizi merged commit 3b77a5b into master Jul 23, 2025
46 checks passed
@PProfizi PProfizi deleted the ci/add_doc_build_cache branch July 23, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Related to CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载