]> git.lizzy.rs Git - rust.git/commitdiff
Use sparse cargo registry
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>
Fri, 13 Jan 2023 13:44:40 +0000 (13:44 +0000)
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>
Fri, 13 Jan 2023 13:48:52 +0000 (13:48 +0000)
.github/workflows/main.yml
.github/workflows/nightly-cranelift.yml
.github/workflows/rustc.yml

index cc9ae19afded61ab6d32b5c094b7debb8c30562d..7dbc8e76efdfff7c4181fb996c8c7016ddc7ea9d 100644 (file)
@@ -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
 
index 968cd43efd15d65894380c73a83dfa602d73adb7..32a8ba9bcc9923036868024b9425c354906afffd 100644 (file)
@@ -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"
index 2c7de86f9b9071abe77e7cf6e9294db06088abc9..8844874ecb01f8855641e3a8d81470f1c5b84265 100644 (file)
@@ -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"