Skip to content

Commit e1ec60c

Browse files
yuluo-yxrootfs
andauthored
infra: add GHA restore key (#244)
Signed-off-by: yuluo-yx <[email protected]> Co-authored-by: Huamin Chen <[email protected]>
1 parent 56cdc08 commit e1ec60c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,34 @@ jobs:
5959
~/.cargo/git/db/
6060
candle-binding/target/
6161
key: ${{ runner.os }}-cargo-precommit-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
62+
restore-keys: |
63+
${{ runner.os }}-cargo-precommit-
6264
6365
- name: Cache Go dependencies
6466
uses: actions/cache@v4
6567
with:
6668
path: |
6769
~/go/pkg/mod
6870
key: ${{ runner.os }}-go-precommit-${{ hashFiles('**/go.sum') }}
71+
restore-keys: |
72+
${{ runner.os }}-go-precommit-
6973
7074
- name: Cache Node dependencies
7175
uses: actions/cache@v4
7276
with:
7377
path: |
7478
~/.npm
7579
key: ${{ runner.os }}-node-precommit-${{ hashFiles('website/package-lock.json') }}
80+
restore-keys: |
81+
${{ runner.os }}-node-precommit-
7682
7783
- name: Cache pre-commit environments
7884
uses: actions/cache@v4
7985
with:
8086
path: ~/.cache/pre-commit
8187
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
88+
restore-keys: |
89+
${{ runner.os }}-precommit-
8290
8391
- name: Install pre-commit
8492
run: make precommit-install

.github/workflows/test-and-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@ jobs:
4343
~/.cargo/git/db/
4444
candle-binding/target/
4545
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
46+
restore-keys: |
47+
${{ runner.os }}-cargo-
4648
4749
- name: Cache Go dependencies
4850
uses: actions/cache@v4
4951
with:
5052
path: |
5153
~/go/pkg/mod
5254
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
55+
restore-keys: |
56+
${{ runner.os }}-go-
5357
5458
- name: Cache Models
5559
uses: actions/cache@v4

0 commit comments

Comments
 (0)