From 21db564353f3a1bf646f39682ca2531c80bd59b9 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:06:08 +0100 Subject: [PATCH] ci: Cache Rust toolchains in Linux namespace cache (#47699) Release Notes: - N/A --- .github/workflows/autofix_pr.yml | 1 + .github/workflows/extension_tests.yml | 1 + .github/workflows/release.yml | 2 ++ .github/workflows/run_agent_evals.yml | 1 + .github/workflows/run_cron_unit_evals.yml | 1 + .github/workflows/run_tests.yml | 8 ++++++++ .github/workflows/run_unit_evals.yml | 1 + tooling/xtask/src/tasks/workflows/steps.rs | 4 +++- 8 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/autofix_pr.yml b/.github/workflows/autofix_pr.yml index 7ba17b8d57cd2adf294d4e565cf18b1ae06a1843..522c867b30fa0308050ef003d07f8471cbfb7e0c 100644 --- a/.github/workflows/autofix_pr.yml +++ b/.github/workflows/autofix_pr.yml @@ -35,6 +35,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} diff --git a/.github/workflows/extension_tests.yml b/.github/workflows/extension_tests.yml index 0c18970d8141c96f41b5aff1e6e0e13ebfb165e8..3763e230954c81e652e43ba3cb5c2c500cd922cb 100644 --- a/.github/workflows/extension_tests.yml +++ b/.github/workflows/extension_tests.yml @@ -61,6 +61,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::cargo_fmt run: cargo fmt --all -- --check shell: bash -euxo pipefail {0} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 226133ba24d39f18ad5082e14b09c1587dedde25..ca70d868070e020f82789c9201b41a05f403af39 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,6 +61,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} @@ -159,6 +160,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} diff --git a/.github/workflows/run_agent_evals.yml b/.github/workflows/run_agent_evals.yml index 421d5a1c8003eaa42977339b4ab8e5e0df7ee014..022125164827fab70c6bd1e17a7172ce875d17f9 100644 --- a/.github/workflows/run_agent_evals.yml +++ b/.github/workflows/run_agent_evals.yml @@ -31,6 +31,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} diff --git a/.github/workflows/run_cron_unit_evals.yml b/.github/workflows/run_cron_unit_evals.yml index cdfb51cc5b351d1079369aef3abfa845ca7d0428..d986f4f8c864c9d48b867e438d68f73cce4aaec9 100644 --- a/.github/workflows/run_cron_unit_evals.yml +++ b/.github/workflows/run_cron_unit_evals.yml @@ -35,6 +35,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 3a26c4ae4269fa21ac7ed2b41ab03855954a614a..a348fd7416281ff5cc07105efcb4225f2d4c3ef3 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -70,6 +70,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_pnpm uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 with: @@ -129,6 +130,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} @@ -211,6 +213,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} @@ -297,6 +300,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} @@ -341,6 +345,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} @@ -376,6 +381,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: run_tests::check_dependencies::install_cargo_machete uses: clechasseur/rs-cargo@8435b10f6e71c2e3d4d3b7573003a8ce4bfc6386 with: @@ -413,6 +419,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: run_tests::check_docs::lychee_link_check uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 with: @@ -461,6 +468,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: ./script/check-licenses run: ./script/check-licenses shell: bash -euxo pipefail {0} diff --git a/.github/workflows/run_unit_evals.yml b/.github/workflows/run_unit_evals.yml index 8f64a5c8bcfd07d56279438795f817bfaa1e2e28..ced24170f1452a47617c821f9ff92a30e0be6013 100644 --- a/.github/workflows/run_unit_evals.yml +++ b/.github/workflows/run_unit_evals.yml @@ -36,6 +36,7 @@ jobs: uses: namespacelabs/nscloud-cache-action@v1 with: cache: rust + path: ~/.rustup - name: steps::setup_linux run: ./script/linux shell: bash -euxo pipefail {0} diff --git a/tooling/xtask/src/tasks/workflows/steps.rs b/tooling/xtask/src/tasks/workflows/steps.rs index a0b071cd6c31654b42adddbba47dd24c60da7df2..63ece051ec99c5f972ecf83b239c2663d05c9d07 100644 --- a/tooling/xtask/src/tasks/workflows/steps.rs +++ b/tooling/xtask/src/tasks/workflows/steps.rs @@ -113,7 +113,9 @@ pub fn clippy(platform: Platform) -> Step { } pub fn cache_rust_dependencies_namespace() -> Step { - named::uses("namespacelabs", "nscloud-cache-action", "v1").add_with(("cache", "rust")) + named::uses("namespacelabs", "nscloud-cache-action", "v1") + .add_with(("cache", "rust")) + .add_with(("path", "~/.rustup")) } pub fn setup_linux() -> Step {