about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-01-13 13:44:40 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-01-13 13:48:52 +0000
commitaf99a369c448c4b81c1a75437dc17779f6301020 (patch)
tree25aa50e493fa1cf126302d0f11afcdec74813627
parentbb7ab8242a2b17d90ab7735efbbf2c5b905e196e (diff)
downloadrust-af99a369c448c4b81c1a75437dc17779f6301020.tar.gz
rust-af99a369c448c4b81c1a75437dc17779f6301020.zip
Use sparse cargo registry
-rw-r--r--.github/workflows/main.yml15
-rw-r--r--.github/workflows/nightly-cranelift.yml7
-rw-r--r--.github/workflows/rustc.yml30
3 files changed, 28 insertions, 24 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index cc9ae19afde..7dbc8e76efd 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -62,14 +62,6 @@ jobs:
     steps:
     - uses: actions/checkout@v3
 
-    - name: Cache cargo registry and index
-      uses: actions/cache@v3
-      with:
-        path: |
-            ~/.cargo/registry
-            ~/.cargo/git
-        key: ${{ runner.os }}-${{ matrix.env.TARGET_TRIPLE }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
-
     - name: Cache cargo target dir
       uses: actions/cache@v3
       with:
@@ -103,6 +95,13 @@ jobs:
       if: matrix.os == 'windows-latest'
       run: git config --global core.autocrlf false
 
+    - name: Use sparse cargo registry
+      run: |
+        cat >> ~/.cargo/config.toml <<EOF
+        [unstable]
+        sparse-registry = true
+        EOF
+
     - name: Prepare dependencies
       run: ./y.rs prepare
 
diff --git a/.github/workflows/nightly-cranelift.yml b/.github/workflows/nightly-cranelift.yml
index 968cd43efd1..32a8ba9bcc9 100644
--- a/.github/workflows/nightly-cranelift.yml
+++ b/.github/workflows/nightly-cranelift.yml
@@ -13,6 +13,13 @@ jobs:
     steps:
     - uses: actions/checkout@v3
 
+    - name: Use sparse cargo registry
+      run: |
+        cat >> ~/.cargo/config.toml <<EOF
+        [unstable]
+        sparse-registry = true
+        EOF
+
     - name: Prepare dependencies
       run: |
         git config --global user.email "user@example.com"
diff --git a/.github/workflows/rustc.yml b/.github/workflows/rustc.yml
index 2c7de86f9b9..8844874ecb0 100644
--- a/.github/workflows/rustc.yml
+++ b/.github/workflows/rustc.yml
@@ -10,20 +10,19 @@ jobs:
     steps:
     - uses: actions/checkout@v3
 
-    - name: Cache cargo registry and index
-      uses: actions/cache@v3
-      with:
-        path: |
-            ~/.cargo/registry
-            ~/.cargo/git
-        key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
-
     - name: Cache cargo target dir
       uses: actions/cache@v3
       with:
         path: build/cg_clif
         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
 
+    - name: Use sparse cargo registry
+      run: |
+        cat >> ~/.cargo/config.toml <<EOF
+        [unstable]
+        sparse-registry = true
+        EOF
+
     - name: Prepare dependencies
       run: |
         git config --global user.email "user@example.com"
@@ -38,20 +37,19 @@ jobs:
     steps:
     - uses: actions/checkout@v3
 
-    - name: Cache cargo registry and index
-      uses: actions/cache@v3
-      with:
-        path: |
-            ~/.cargo/registry
-            ~/.cargo/git
-        key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
-
     - name: Cache cargo target dir
       uses: actions/cache@v3
       with:
         path: build/cg_clif
         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
 
+    - name: Use sparse cargo registry
+      run: |
+        cat >> ~/.cargo/config.toml <<EOF
+        [unstable]
+        sparse-registry = true
+        EOF
+
     - name: Prepare dependencies
       run: |
         git config --global user.email "user@example.com"