Эх сурвалжийг харах

Revert "ci: use cache for rustup to accelerate CI further"

This reverts commit 99b5f40e2542f3174f51758cfb473578d030e564.
Philipp Schuster 2 жил өмнө
parent
commit
17813c792d

+ 3 - 15
.github/workflows/_build-rust.yml

@@ -40,20 +40,7 @@ jobs:
     steps:
       - name: Check out
         uses: actions/checkout@v3
-      - name: Set up rustup cache
-        uses: actions/cache@v3
-        continue-on-error: false
-        with:
-          path: |
-            ~/.rustup/downloads
-            ~/.rustup/toolchains
-          # key: ${{ runner.os }}-rustup-${{ inputs.rust-version }}-${{ inputs.rust-target }}-${{ hashFiles('**/rustup-toolchain.toml') }}
-          key: ${{ runner.os }}-rustup-${{ inputs.rust-version }}-${{ inputs.rust-target }}
-      # The effect of this is must smaller than the cache for Cargo. However, it
-      # still saves a few seconds. Note that many CI runs within a week may
-      # quickly bring you close to the 10GB limit:
-      # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#managing-caches
-      - name: Install Rust Toolchain via Rustup
+      - name: Install Rust
         uses: actions-rs/toolchain@v1
         with:
           profile: minimal
@@ -61,7 +48,7 @@ jobs:
           override: true
           components: clippy, rustfmt
           target: ${{ inputs.rust-target }}
-      - name: Set up Cargo cache
+      - name: Set up cargo cache
         uses: actions/cache@v3
         continue-on-error: false
         with:
@@ -73,6 +60,7 @@ jobs:
             target/
           # We do not have a Cargo.lock here, so I hash Cargo.toml
           key: ${{ runner.os }}-rust-${{ inputs.rust-version }}-cargo-${{ hashFiles('**/Cargo.toml') }}
+          restore-keys: ${{ runner.os }}-cargo-${{ inputs.rust-version }}
       - run: cargo version
       - name: Build (library)
         run: cargo build --target ${{ inputs.rust-target }} --features ${{ inputs.features }}