File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 3131
3232 env :
3333 BUILD_WHEEL : ${{ (matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14') && 'true' || '' }}
34+ PYTHONUNBUFFERED : " 1"
3435
3536 steps :
3637
5859
5960 # ## Build sasmodels
6061
62+
63+ - name : Record figure building tools
64+ if : env.BUILD_WHEEL
65+ id : build-tools
66+ run : |
67+ echo "details=$(
68+ python -m pip index versions matplotlib --json | python -c "import json; print(json.loads(input())['latest'])"
69+ )" >> $GITHUB_OUTPUT
70+ SASMODELS_BUILD_CACHE=~/.cache/sasmodels-figures
71+ mkdir -p $SASMODELS_BUILD_CACHE
72+ echo "SASMODELS_BUILD_CACHE=$SASMODELS_BUILD_CACHE" >> $GITHUB_ENV
73+
74+ - name : Cache figures in documentation
75+ if : env.BUILD_WHEEL
76+ id : cache-figures
77+ uses : actions/cache@v4
78+ with :
79+ path : ${{ env.SASMODELS_BUILD_CACHE }}
80+ key : ${{ steps.build-tools.outputs.details }}-${{ hashFiles('doc/genmodel.py') }}
81+
82+ - name : Report cache status
83+ if : env.BUILD_WHEEL
84+ run : |
85+ if [ "${{ steps.cache-figures.outputs.cache-hit }}" == "true" ]; then
86+ echo "Figure cache hit - using cached figures"
87+ else
88+ echo "Figure cache miss - will generate new figures"
89+ fi
90+
6191 - name : Build sasmodels
6292 if : env.BUILD_WHEEL
6393 run : |
You can’t perform that action at this time.
0 commit comments