Skip to content

Commit 218acee

Browse files
committed
ci: Add a registry cache for git protocol
1 parent 9162696 commit 218acee

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ jobs:
2020
]
2121
steps:
2222
- uses: actions/checkout@v4
23+
- uses: actions/cache@v4
24+
if: startsWith(matrix.rust, '1')
25+
with:
26+
path: ~/.cargo/registry/index
27+
key: cargo-${{ matrix.rust }}-git-index
2328
- uses: dtolnay/rust-toolchain@master
2429
with:
2530
toolchain: ${{ matrix.rust }}

.github/workflows/master.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ jobs:
1616
rust: [1.31.0, stable]
1717
steps:
1818
- uses: actions/checkout@v4
19+
- uses: actions/cache@v4
20+
if: startsWith(matrix.rust, '1')
21+
with:
22+
path: ~/.cargo/registry/index
23+
key: cargo-${{ matrix.rust }}-git-index
1924
- uses: dtolnay/rust-toolchain@master
2025
with:
2126
toolchain: ${{ matrix.rust }}

.github/workflows/pr.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ jobs:
1212
rust: [1.31.0, stable]
1313
steps:
1414
- uses: actions/checkout@v4
15+
- uses: actions/cache@v4
16+
if: startsWith(matrix.rust, '1')
17+
with:
18+
path: ~/.cargo/registry/index
19+
key: cargo-${{ matrix.rust }}-git-index
1520
- uses: dtolnay/rust-toolchain@master
1621
with:
1722
toolchain: ${{ matrix.rust }}

0 commit comments

Comments
 (0)