Skip to content

Commit 249a987

Browse files
authored
TST allow caching in benchopt_test CI workflow (#58)
1 parent 594716f commit 249a987

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/test_benchmarks.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ on:
3333
default: "."
3434
required: false
3535
type: string
36+
cache_dir:
37+
description: |
38+
Directories to cache in the workflow. This can be used to avoid
39+
repeated data downloads that might hit rate limits when running
40+
CI multiple times in a row, or to fasten large download chunks
41+
when installing dependencies.
42+
default: ""
43+
required: false
44+
type: string
3645

3746
# Cancel in-progress workflows when pushing
3847
# a new commit on the same branch
@@ -79,6 +88,13 @@ jobs:
7988

8089
- run: conda info
8190

91+
- name: Cache directories
92+
if: ${{ inputs.cache_dir != '' }}
93+
uses: actions/cache@v5
94+
with:
95+
path: ${{ inputs.cache_dir }}
96+
key: ${{ runner.os }}-${{ inputs.cache_dir }}
97+
8298
- name: Install benchopt and its dependencies
8399
run: |
84100
conda info

0 commit comments

Comments
 (0)