Skip to content

Commit 8172dc8

Browse files
committed
[workflow] Add cache
1 parent 5fc8e78 commit 8172dc8

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- run: git submodule update --init
3434

35+
- uses: actions/cache@v4
36+
with:
37+
path: |
38+
~/.cache/uv/
39+
~/.cargo/bin/
40+
~/.cargo/registry/index/
41+
~/.cargo/registry/cache/
42+
~/.cargo/git/db/
43+
.venv/
44+
target/
45+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
46+
3547
- name: Setup rust
3648
run: rustup toolchain install --profile minimal ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
3749

@@ -63,6 +75,19 @@ jobs:
6375
steps:
6476
- uses: actions/checkout@v4
6577
- run: git submodule update --init
78+
79+
- uses: actions/cache@v4
80+
with:
81+
path: |
82+
~/.cache/uv/
83+
~/.cargo/bin/
84+
~/.cargo/registry/index/
85+
~/.cargo/registry/cache/
86+
~/.cargo/git/db/
87+
.venv/
88+
target/
89+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
90+
6691
- name: Setup rust
6792
run: rustup toolchain install --profile minimal stable && rustup default stable
6893
- run: cargo test --no-default-features -F "${{ matrix.features }}" --verbose

.github/workflows/lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ jobs:
1111
- uses: actions/checkout@v4
1212
- run: git submodule update --init
1313

14+
- uses: actions/cache@v4
15+
with:
16+
path: |
17+
~/.cache/uv/
18+
~/.cargo/bin/
19+
~/.cargo/registry/index/
20+
~/.cargo/registry/cache/
21+
~/.cargo/git/db/
22+
.venv/
23+
target/
24+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
25+
1426
- name: Setup rust
1527
run: rustup toolchain install --profile minimal -c rustfmt,clippy nightly && rustup default nightly
1628

0 commit comments

Comments
 (0)