| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…rtifact The cache stores `doc/_build/html`, which does not make a docs build cheaper. sphinx-gallery skips an example only when `<example>.py.md5` sits beside its generated rst in `doc/auto_examples`, and Sphinx tracks staleness in `doc/_build/doctrees`. The current cache holds neither directory, so every example re-executes on every run. On master push [33301489918](https://github.com/NeuroTechX/EEG-ExPy/actions/runs/33301489918/attempts/1) the cache hit, yet the examples still took 155 s to execute in total. Cache those two directories instead, so unchanged examples are skipped. Locally, a build drops from 145 s (every run today) to 28 s when no example changed. The key has two parts because each example's md5 covers only that example's file, so it is not affected by changes to the library, docs sources or docs environment. The prefix hashes `eegnb/**`, `doc/**`, the docs environment, `requirements.txt` and `setup.py`; the examples hash follows. A `restore-keys` fallback therefore only matches an entry built with the same prefix: an examples-only PR reuses the other examples' output, and a change to any file in the prefix triggers a full rebuild. Also adds `upload-artifact`, so reviewers can download a PR's rendered docs; `docs.yml` otherwise only publishes on push to `master`. The `master` deploy is unchanged. Related: NeuroTechX#322 (draft) also adds an artifact step and deploys a live preview to `gh-pages/pr-preview/`. That push needs a write token, which fork `pull_request` runs don't get, so the artifact is the part that works everywhere.
| Back | FazBrowse Home | New Git URL |
The cache stores doc/_build/html, which does not make a docs build cheaper. sphinx-gallery skips an example only when <example>.py.md5 sits beside its generated rst in doc/auto_examples, and Sphinx tracks staleness in doc/_build/doctrees. The current cache holds neither directory, so every example re-executes on every run. On master push 33301489918 the cache hit, yet the examples still took 155 s to execute in total.
Cache those two directories instead, so unchanged examples are skipped. Locally, a build drops from 145 s (every run today) to 28 s when no example changed.
The key has two parts because each example's md5 covers only that example's file, so it is not affected by changes to the library, docs sources or docs environment. The prefix hashes eegnb/**, doc/**, the docs environment, requirements.txt and setup.py; the examples hash follows. A restore-keys fallback therefore only matches an entry built with the same prefix: an examples-only PR reuses the other examples' output, and a change to any file in the prefix triggers a full rebuild.
Also adds upload-artifact, so reviewers can download a PR's rendered docs; docs.yml otherwise only publishes on push to master. The master deploy is unchanged.
Related: #322 (draft) also adds an artifact step and deploys a live preview to gh-pages/pr-preview/. That push needs a write token, which fork pull_request runs don't get, so the artifact is the part that works everywhere.