Skip to content

Commit 4719156

Browse files
Merge pull request #23 from spdlearn/cache-CI
Add Sphinx-Gallery caching and stabilize CI cache keys
2 parents 7dc9c37 + 52b23f7 commit 4719156

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/docs.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,25 @@ jobs:
4343
- name: Test documentation code blocks
4444
run: pytest docs/ -v
4545

46-
- name: Create/Restore Data Caches mne and Nilearn
46+
- name: Create/Restore Data Caches
4747
id: cache-data
4848
uses: actions/cache@v4
4949
with:
5050
path: |
5151
~/mne_data
5252
~/nilearn_data
53-
key: ${{ runner.os }}-data-${{ github.run_id }}
53+
key: ${{ runner.os }}-data-v1
5454
restore-keys: |
5555
${{ runner.os }}-data
5656
57+
- name: Restore Sphinx-Gallery Cache
58+
uses: actions/cache@v4
59+
with:
60+
path: docs/source/generated/
61+
key: ${{ runner.os }}-gallery-${{ hashFiles('examples/**/*.py') }}
62+
restore-keys: |
63+
${{ runner.os }}-gallery-
64+
5765
- name: Build Docs
5866
run: make -C docs html
5967

.github/workflows/install-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
path: |
5050
~/mne_data
5151
~/nilearn_data
52-
key: ${{ runner.os }}-${{ matrix.python-version }}-data-${{ github.run_id }}
52+
key: ${{ runner.os }}-${{ matrix.python-version }}-data-v1
5353
restore-keys: |
5454
${{ runner.os }}-${{ matrix.python-version }}-data
5555
@@ -103,7 +103,7 @@ jobs:
103103
path: |
104104
~/mne_data
105105
~/nilearn_data
106-
key: ${{ runner.os }}-integration-data-${{ github.run_id }}
106+
key: ${{ runner.os }}-integration-data-v1
107107
restore-keys: |
108108
${{ runner.os }}-integration-data
109109

0 commit comments

Comments
 (0)