Unverified Commit 0fece1f7 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Add cross-PR caching within CircleCI for gallery examples (#3837)

parent 3a96fb57
......@@ -916,6 +916,15 @@ jobs:
- run:
name: Install torchvision
command: .circleci/unittest/linux/scripts/install.sh
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
- restore_cache:
keys:
- sphinx-gallery-{{ checksum "./docs/source/conf.py" }}-{{ checksum ".circleci-weekly" }}
- run:
name: Build docs
command: |
......@@ -928,6 +937,12 @@ jobs:
pip install -r requirements.txt
make html
popd
- save_cache:
key: sphinx-gallery-{{ checksum "./docs/source/conf.py" }}-{{ checksum ".circleci-weekly" }}
paths:
- ./docs/source/auto_examples
- persist_to_workspace:
root: ./
paths:
......
......@@ -916,6 +916,15 @@ jobs:
- run:
name: Install torchvision
command: .circleci/unittest/linux/scripts/install.sh
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
- restore_cache:
{% raw %}
keys:
- sphinx-gallery-{{ checksum "./docs/source/conf.py" }}-{{ checksum ".circleci-weekly" }}
{% endraw %}
- run:
name: Build docs
command: |
......@@ -928,6 +937,12 @@ jobs:
pip install -r requirements.txt
make html
popd
- save_cache:
{% raw %}
key: sphinx-gallery-{{ checksum "./docs/source/conf.py" }}-{{ checksum ".circleci-weekly" }}
{% endraw %}
paths:
- ./docs/source/auto_examples
- persist_to_workspace:
root: ./
paths:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment