Skip to content

Commit 0775e7d

Browse files
committed
Cache figures between CI builds
1 parent 430b74f commit 0775e7d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,26 @@ jobs:
5858

5959
### Build sasmodels
6060

61+
62+
- name: Record figure building tools
63+
if: env.BUILD_WHEEL
64+
id: build-tools
65+
run: |
66+
echo "details=$(
67+
python -m pip index versions matplotlib --json | python -c "import json; print(json.loads(input())['latest'])"
68+
)" >> $GITHUB_OUTPUT
69+
SASMODELS_BUILD_CACHE=~/.cache/sasmodels-figures
70+
mkdir -p $SASMODELS_BUILD_CACHE
71+
echo "SASMODELS_BUILD_CACHE=$SASMODELS_BUILD_CACHE" >> $GITHUB_ENV
72+
73+
- name: Cache figures in documentation
74+
if: env.BUILD_WHEEL
75+
id: cache-figures
76+
uses: actions/cache@v4
77+
with:
78+
path: ${{ env.SASMODELS_BUILD_CACHE }}
79+
key: ${{ steps.build-tools.outputs.details }}-${{ hashFiles('doc/genmodel.py') }}
80+
6181
- name: Build sasmodels
6282
if: env.BUILD_WHEEL
6383
run: |

0 commit comments

Comments
 (0)