Skip to content

Commit a15381b

Browse files
authored
Revert "disable cache (#9237)" (#9596)
This reverts commit 3817d82.
1 parent d00e344 commit a15381b

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

.github/actions/install-all-deps/action.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,19 @@ runs:
5454
run: |
5555
python -m pip install --upgrade virtualenv
5656
python -m virtualenv venv
57-
# - uses: actions/cache@v4
58-
# id: cache
59-
# with:
60-
# path: |
61-
# venv/*
62-
# client/python/venv
63-
# restore-keys: |
64-
# gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-
65-
# key: "gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-${{ hashFiles('client/python/requirements.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test/requirements.txt') }}-${{ hashFiles('client/python/test/requirements.txt') }}${{ inputs.test == 'true' && '-test' || ''}}"
57+
- uses: actions/cache@v4
58+
id: cache
59+
with:
60+
path: |
61+
venv/*
62+
client/python/venv
63+
restore-keys: |
64+
gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-
65+
key: "gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-${{ hashFiles('client/python/requirements.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test/requirements.txt') }}-${{ hashFiles('client/python/test/requirements.txt') }}${{ inputs.test == 'true' && '-test' || ''}}"
6666
- name: Install ffmpeg
6767
uses: FedericoCarboni/setup-ffmpeg@583042d32dd1cabb8bd09df03bde06080da5c87c # @v2
6868
- name: Install test dependencies
69-
if: inputs.test == 'true'
70-
# && steps.cache.outputs.cache-hit != 'true'
69+
if: inputs.test == 'true' && steps.cache.outputs.cache-hit != 'true'
7170
shell: bash
7271
run: |
7372
. ${{ env.VENV_ACTIVATE }}

.github/actions/install-frontend-deps/action.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ inputs:
1212
runs:
1313
using: "composite"
1414
steps:
15-
# - uses: actions/cache@v4
16-
# id: frontend-cache
17-
# with:
18-
# path: |
19-
# gradio/templates/*
20-
# key: gradio-lib-front-end-${{ hashFiles('js/**', 'client/js/**')}}
15+
- uses: actions/cache@v4
16+
id: frontend-cache
17+
with:
18+
path: |
19+
gradio/templates/*
20+
key: gradio-lib-front-end-${{ hashFiles('js/**', 'client/js/**')}}
2121
- name: Install pnpm
2222
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # @v4
2323
with:
@@ -34,8 +34,7 @@ runs:
3434
shell: bash
3535
run: pnpm css
3636
- name: Build frontend
37-
if: inputs.skip_build == 'false'
38-
# && steps.frontend-cache.outputs.cache-hit != 'true'
37+
if: inputs.skip_build == 'false' && steps.frontend-cache.outputs.cache-hit != 'true'
3938
shell: bash
4039
run: pnpm build
4140
- name: generate types

0 commit comments

Comments
 (0)