Skip to content

Commit 239cdb5

Browse files
committed
ci: Add a registry cache for git protocol
1 parent ee0b927 commit 239cdb5

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ jobs:
1717
]
1818
steps:
1919
- uses: actions/checkout@v4
20+
- uses: actions/cache@v4
21+
if: startsWith(matrix.rust, '1')
22+
with:
23+
path: ~/.cargo/registry/index
24+
key: cargo-${{ matrix.rust }}-git-index
2025
- uses: dtolnay/rust-toolchain@master
2126
with:
2227
toolchain: ${{ matrix.rust }}
@@ -40,6 +45,10 @@ jobs:
4045
runs-on: ubuntu-latest
4146
steps:
4247
- uses: actions/checkout@v4
48+
- uses: actions/cache@v4
49+
with:
50+
path: ~/.cargo/registry/index
51+
key: cargo-1.31.0-git-index
4352
- uses: dtolnay/rust-toolchain@1.31.0
4453
with:
4554
target: thumbv6m-none-eabi

.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)