Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Adjust Cargo caching in CI (#8494)

Marshall Bowers83bc24b48006
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1a35d778570..4e3b6e65fd6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -107,16 +107,10 @@ jobs:
clean: false
submodules: "recursive"
- - name: Restore from cache
- uses: actions/cache@v4
+ - name: Cache dependencies
+ uses: swatinem/rust-cache@v2
with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: configure linux
shell: bash -euxo pipefail {0}
@@ -140,16 +134,10 @@ jobs:
clean: false
submodules: "recursive"
- - name: Restore from cache
- uses: actions/cache@v4
+ - name: Cache dependencies
+ uses: swatinem/rust-cache@v2
with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: cargo clippy
shell: bash -euxo pipefail {0}