ci: Enable namespace caching for clippy on Mac (#47819)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2026-01-28 01:24:03 +01:00 committed by GitHub
parent b9c56658ff
commit 64df7f2675
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 3 deletions

View file

@ -140,6 +140,11 @@ jobs:
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
path: ~/.rustup
- name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}

View file

@ -159,6 +159,11 @@ jobs:
mkdir -p ./../.cargo
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
shell: bash -euxo pipefail {0}
- name: steps::cache_rust_dependencies_namespace
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: rust
path: ~/.rustup
- name: steps::clippy
run: ./script/clippy
shell: bash -euxo pipefail {0}

View file

@ -320,9 +320,10 @@ pub(crate) fn clippy(platform: Platform) -> NamedJob {
.runs_on(runner)
.add_step(steps::checkout_repo())
.add_step(steps::setup_cargo_config(platform))
.when(platform == Platform::Linux, |this| {
this.add_step(steps::cache_rust_dependencies_namespace())
})
.when(
platform == Platform::Linux || platform == Platform::Mac,
|this| this.add_step(steps::cache_rust_dependencies_namespace()),
)
.when(
platform == Platform::Linux,
steps::install_linux_dependencies,