Skip to content

Commit

Permalink
ci: enable cache for matplotlib
Browse files Browse the repository at this point in the history
Signed-off-by: Zxilly <[email protected]>
  • Loading branch information
Zxilly committed Jul 6, 2024
1 parent ed4d3e9 commit fb26ad5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/actions/setup-script/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,19 @@ runs:
key: testbins-${{ hashFiles('scripts/binaries.csv') }}-${{ inputs.cache }}-v2
enableCrossOsArchive: true

- name: Cache matplotlib
if: ${{ inputs.cache != '' && inputs.report == 'true' }}
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./scripts/.cache/matplotlib
key: matplotlib-${{ hashFiles('scripts/requirements.txt') }}-${{ runner.os }}

- name: Run script
shell: bash
working-directory: ./scripts
run: poetry run python ${{ inputs.script }}
env:
MPLCONFIGDIR: ./scripts/.cache/matplotlib

- name: Report results
if: ${{ inputs.report == 'true' }}
Expand Down

0 comments on commit fb26ad5

Please sign in to comment.