Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit af99a36

Browse files
committed
Use sparse cargo registry
1 parent bb7ab82 commit af99a36

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,6 @@ jobs:
6262
steps:
6363
- uses: actions/checkout@v3
6464

65-
- name: Cache cargo registry and index
66-
uses: actions/cache@v3
67-
with:
68-
path: |
69-
~/.cargo/registry
70-
~/.cargo/git
71-
key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
72-
7365
- name: Cache cargo target dir
7466
uses: actions/cache@v3
7567
with:
@@ -103,6 +95,13 @@ jobs:
10395
if: matrix.os == 'windows-latest'
10496
run: git config --global core.autocrlf false
10597

98+
- name: Use sparse cargo registry
99+
run: |
100+
cat >> ~/.cargo/config.toml <<EOF
101+
[unstable]
102+
sparse-registry = true
103+
EOF
104+
106105
- name: Prepare dependencies
107106
run: ./y.rs prepare
108107

.github/workflows/nightly-cranelift.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515

16+
- name: Use sparse cargo registry
17+
run: |
18+
cat >> ~/.cargo/config.toml <<EOF
19+
[unstable]
20+
sparse-registry = true
21+
EOF
22+
1623
- name: Prepare dependencies
1724
run: |
1825
git config --global user.email "[email protected]"

.github/workflows/rustc.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v3
1212

13-
- name: Cache cargo registry and index
14-
uses: actions/cache@v3
15-
with:
16-
path: |
17-
~/.cargo/registry
18-
~/.cargo/git
19-
key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
20-
2113
- name: Cache cargo target dir
2214
uses: actions/cache@v3
2315
with:
2416
path: build/cg_clif
2517
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
2618

19+
- name: Use sparse cargo registry
20+
run: |
21+
cat >> ~/.cargo/config.toml <<EOF
22+
[unstable]
23+
sparse-registry = true
24+
EOF
25+
2726
- name: Prepare dependencies
2827
run: |
2928
git config --global user.email "[email protected]"
@@ -38,20 +37,19 @@ jobs:
3837
steps:
3938
- uses: actions/checkout@v3
4039

41-
- name: Cache cargo registry and index
42-
uses: actions/cache@v3
43-
with:
44-
path: |
45-
~/.cargo/registry
46-
~/.cargo/git
47-
key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
48-
4940
- name: Cache cargo target dir
5041
uses: actions/cache@v3
5142
with:
5243
path: build/cg_clif
5344
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
5445

46+
- name: Use sparse cargo registry
47+
run: |
48+
cat >> ~/.cargo/config.toml <<EOF
49+
[unstable]
50+
sparse-registry = true
51+
EOF
52+
5553
- name: Prepare dependencies
5654
run: |
5755
git config --global user.email "[email protected]"

0 commit comments

Comments
 (0)