Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

ci: move the remaining Rust caches to the sccache action and drop the ones that cost more than they save (#5830)

Francesco Bonaccieb7269cf7851
diff --git a/.github/scripts/ci_cache_audit.py b/.github/scripts/ci_cache_audit.py
new file mode 100644
index 0000000000..ac4cbcfea0
--- /dev/null
+++ b/.github/scripts/ci_cache_audit.py
@@ -0,0 +1,261 @@
+#!/usr/bin/env python3
+"""Cache cost audit for the Rust build caches (Rust CI jobs).
+
+A cache earns its place only when the compile time it saves on a run exceeds
+what the cache costs that run: the restore step on every run, plus the save
+step on the runs that save. This reads recent workflow runs with `gh api` and
+prints, per job that has a rust-cache step (Swatinem/rust-cache or
+.github/actions/rust-cache):
+
+ restore median seconds of the cache step (restore, and sccache install)
+ save median seconds of the post step, over the runs that saved
+ cold the longest cold compile seen in the sampled logs: the sccache
+ work that a warm cache would skip (executed compile requests times
+ their average compile time, over 3.4 effective cores) when the log
+ has sccache statistics from a run that mostly missed, otherwise the
+ sum of cargo's "Finished ... in" lines
+ benefit estimated seconds a warm cache saves: 85% of the sccache figure
+ (e2b-bindings: 745 predicted, 888 measured, from 32.8 to 18.0
+ minutes with 0 of 2232 compile requests hitting cold and 99.9%
+ warm), or 55% x 85% of the cargo wall time when there are no
+ sccache statistics. The cargo figure runs high when a job's cargo
+ invocations overlap (22 minutes predicted for the same job).
+ verdict keep when benefit >= 2 x cost and >= 45 s, otherwise drop?; "insufficient
+ cold evidence" when every sampled log came from a run that hit a
+ warm cache (its compile times are warm times, not what the cache
+ saves): sample older runs or run the job cold before judging it
+
+The audit cannot see whether anything saves the family it restores: a workflow
+that runs only on tags or pull requests, with a family no main run saves, never
+hits whatever its compile time (check the triggers). Output a job discards
+(cargo's stderr, a script that runs cargo quietly) shows as a cold compile of
+0 seconds: measure such a job from its sccache statistics after the change.
+
+A restore grows with the size of the family's directory (about 25 s per GB,
+measured on a macOS runner), so a short job that shares a multi-GB family pays
+more than its own compile could save: give it a small family of its own or
+drop the cache.
+
+Usage (needs the `gh` CLI, authenticated; run from any directory):
+
+ ci_cache_audit.py --repo trycua/cua # every workflow with a rust-cache step
+ ci_cache_audit.py --workflows ci-elastic.yml e2b-bindings.yml --runs 20
+ ci_cache_audit.py --format json > audit.json
+
+Numbers come from the runs the API still returns for each workflow (the last
+`--runs` completed runs). Jobs with fewer than --min-runs samples are marked
+"few runs". The estimate is a screening tool: confirm a "drop?" with the
+job's own before and after timings. Cargo runs inside a Docker container (the
+reference-image builds) are counted in "cold" although a host cache cannot help
+them; check the step before keeping a cache on that evidence.
+"""
+from __future__ import annotations
+
+import argparse
+import concurrent.futures as futures
+import datetime as dt
+import json
+import re
+import statistics
+import subprocess
+import sys
+import time
+from collections import defaultdict
+from pathlib import Path
+
+ANSI = re.compile(r"\x1b\[[0-9;]*m")
+CARGO_FINISHED = re.compile(r"Finished .* in (?:(\d+)m )?(\d+(?:\.\d+)?)s")
+SCCACHE_EXECUTED = re.compile(r"^\S*\s*Compile requests executed\s+(\d+)", re.M)
+SCCACHE_HITS = re.compile(r"^\S*\s*Cache hits\s+(\d+)\s*$", re.M)
+SCCACHE_AVERAGE = re.compile(r"^\S*\s*Average compiler\s+([\d.]+) s", re.M)
+EFFECTIVE_CORES = 3.4
+CACHE_STEP = re.compile(r"rust-cache")
+SAVED_FRACTION = 0.55
+HIT_RATE = 0.85
+MIN_BENEFIT_S = 45.0
+MIN_RATIO = 2.0
+SAVE_STEP_MIN_S = 8.0
+
+
+def gh_api(path: str, raw: bool = False):
+ args = ["gh", "api"] + (["--allow-escape-sequences"] if raw else []) + [path]
+ for attempt in range(2):
+ result = subprocess.run(args, capture_output=True, text=True)
+ if not result.returncode:
+ return result.stdout if raw else json.loads(result.stdout)
+ time.sleep(5)
+ print(f"warning: gh api {path} failed: {result.stderr.strip()[:200]}", file=sys.stderr)
+ return None
+
+
+def seconds(start: str, end: str) -> float:
+ parse = lambda t: dt.datetime.fromisoformat(t.replace("Z", "+00:00"))
+ return (parse(end) - parse(start)).total_seconds()
+
+
+def cargo_seconds(log: str) -> float:
+ """Sum of the compile wall times cargo printed in a job log."""
+ total = 0.0
+ for minutes, secs in CARGO_FINISHED.findall(ANSI.sub("", log)):
+ total += int(minutes or 0) * 60 + float(secs)
+ return total
+
+
+def log_profile(log: str) -> dict:
+ """What one job log says about cold compile time.
+
+ cargo sum of cargo's compile wall times in the log
+ sccache_cold wall seconds of compile work a warm cache would skip (executed
+ requests times their average compile time), only from a run
+ that mostly missed
+ warm the run hit a warm cache (sccache hit rate above 50%, or a
+ Swatinem restore), so its timings are warm timings"""
+ text = ANSI.sub("", log)
+ profile = {"cargo": cargo_seconds(text), "sccache_cold": None, "warm": False}
+ executed, hits, average = (pattern.findall(text) for pattern in (SCCACHE_EXECUTED, SCCACHE_HITS, SCCACHE_AVERAGE))
+ if executed and hits and average and int(executed[-1]):
+ if int(hits[-1]) / int(executed[-1]) > 0.5:
+ profile["warm"] = True
+ else:
+ profile["sccache_cold"] = int(executed[-1]) * float(average[-1]) / EFFECTIVE_CORES
+ elif "Cache restored from key" in text:
+ profile["warm"] = True
+ return profile
+
+
+def sccache_cold_seconds(log: str) -> float | None:
+ return log_profile(log)["sccache_cold"]
+
+
+def combine(profiles: list[dict]) -> tuple[float, str]:
+ """Cold compile seconds over the sampled logs, and the basis: "sccache"
+ (statistics from a run that mostly missed), "cargo" (cargo timings of runs
+ that did not hit a cache) or "warm-only" (every sampled run was warm, so
+ there is no cold evidence)."""
+ cold = [p["sccache_cold"] for p in profiles if p["sccache_cold"]]
+ if cold:
+ return max(cold), "sccache"
+ unwarmed = [p["cargo"] for p in profiles if not p["warm"]]
+ if unwarmed:
+ return max(unwarmed), "cargo"
+ return 0.0, "warm-only" if profiles else "cargo"
+
+
+def estimate(cold_s: float, from_sccache: bool = False) -> float:
+ """Seconds saved by a warm cache."""
+ return HIT_RATE * cold_s if from_sccache else SAVED_FRACTION * HIT_RATE * cold_s
+
+
+def verdict(benefit_s: float, restore_s: float, save_s: float, save_share: float, samples: int, min_runs: int,
+ basis: str = "cargo") -> str:
+ cost = restore_s + save_s * save_share
+ if samples < min_runs:
+ return "few runs"
+ if basis == "warm-only":
+ return "insufficient cold evidence"
+ if benefit_s >= MIN_BENEFIT_S and benefit_s >= MIN_RATIO * cost:
+ return "keep"
+ return "drop?"
+
+
+def workflows_with_cache(root: Path) -> list[str]:
+ found = []
+ for path in sorted((root / ".github" / "workflows").glob("*.yml")):
+ text = path.read_text(encoding="utf-8", errors="replace")
+ if "Swatinem/rust-cache" in text or "actions/rust-cache" in text:
+ found.append(path.name)
+ return found
+
+
+def collect_jobs(repo: str, workflow: str, runs: int) -> list[dict]:
+ listing = gh_api(f"repos/{repo}/actions/workflows/{workflow}/runs?per_page=50&status=completed")
+ if not listing:
+ return []
+ rows = []
+ done = [r for r in listing["workflow_runs"] if r["conclusion"] in ("success", "failure")][:runs]
+ for run in done:
+ jobs = gh_api(f"repos/{repo}/actions/runs/{run['id']}/jobs?per_page=100")
+ for job in (jobs or {}).get("jobs", []):
+ if job["conclusion"] not in ("success", "failure") or not job.get("completed_at"):
+ continue
+ cache = [s for s in job["steps"] if CACHE_STEP.search(s["name"]) and s.get("completed_at")]
+ if not cache:
+ continue
+ restore = sum(seconds(s["started_at"], s["completed_at"]) for s in cache if not s["name"].startswith("Post "))
+ save = sum(seconds(s["started_at"], s["completed_at"]) for s in cache if s["name"].startswith("Post "))
+ rows.append({
+ "workflow": workflow, "job": job["name"], "job_id": job["id"], "run": run["id"],
+ "event": run["event"], "restore": restore, "save": save,
+ "total": seconds(job["started_at"], job["completed_at"]),
+ })
+ return rows
+
+
+def cold_compile(repo: str, samples: list[dict]) -> tuple[float, str]:
+ """Cold compile seconds and their basis, from the logs of the shortest,
+ median and longest job of the group."""
+ ordered = sorted(samples, key=lambda x: x["total"])
+ picks = {job["job_id"]: job for job in (ordered[0], ordered[len(ordered) // 2], ordered[-1])}
+ profiles = []
+ for job in picks.values():
+ log = gh_api(f"repos/{repo}/actions/jobs/{job['job_id']}/logs", raw=True)
+ if log:
+ profiles.append(log_profile(log))
+ return combine(profiles)
+
+
+def audit(repo: str, workflows: list[str], runs: int, min_runs: int, workers: int) -> list[dict]:
+ with futures.ThreadPoolExecutor(workers) as pool:
+ collected = list(pool.map(lambda w: collect_jobs(repo, w, runs), workflows))
+ groups: dict[tuple[str, str], list[dict]] = defaultdict(list)
+ for rows in collected:
+ for row in rows:
+ groups[(row["workflow"], row["job"])].append(row)
+ with futures.ThreadPoolExecutor(workers) as pool:
+ keys = list(groups)
+ colds = list(pool.map(lambda k: cold_compile(repo, groups[k]), keys))
+ report = []
+ for key, (cold, basis) in zip(keys, colds):
+ samples = groups[key]
+ saves = [x["save"] for x in samples if x["save"] > SAVE_STEP_MIN_S]
+ restore = statistics.median(x["restore"] for x in samples)
+ save = statistics.median(saves) if saves else 0.0
+ share = len(saves) / len(samples)
+ benefit = estimate(cold, basis == "sccache")
+ report.append({
+ "workflow": key[0], "job": key[1], "runs": len(samples),
+ "restore_s": round(restore), "save_s": round(save), "save_share": round(share, 2),
+ "cold_compile_s": round(cold), "basis": basis, "benefit_s": round(benefit),
+ "verdict": verdict(benefit, restore, save, share, len(samples), min_runs, basis),
+ })
+ order = {"drop?": 0, "insufficient cold evidence": 1}
+ return sorted(report, key=lambda r: (order.get(r["verdict"], 2), r["workflow"], r["job"]))
+
+
+def markdown(report: list[dict]) -> str:
+ lines = ["| workflow | job | runs | restore s | save s (share) | cold compile s (basis) | est. benefit s | verdict |",
+ "|---|---|---|---|---|---|---|---|"]
+ for r in report:
+ lines.append(f"| {r['workflow']} | {r['job']} | {r['runs']} | {r['restore_s']} | {r['save_s']} ({r['save_share']}) | "
+ f"{r['cold_compile_s']} ({r['basis']}) | {r['benefit_s']} | {r['verdict']} |")
+ return "\n".join(lines)
+
+
+def main(argv: list[str] | None = None) -> int:
+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
+ parser.add_argument("--repo", default="trycua/cua")
+ parser.add_argument("--workflows", nargs="*", help="workflow file names (default: every workflow with a rust-cache step)")
+ parser.add_argument("--runs", type=int, default=12, help="completed runs sampled per workflow")
+ parser.add_argument("--min-runs", type=int, default=3)
+ parser.add_argument("--workers", type=int, default=8)
+ parser.add_argument("--format", choices=("md", "json"), default="md")
+ parser.add_argument("--root", type=Path, default=Path(__file__).resolve().parents[2], help="checkout used to find workflows")
+ args = parser.parse_args(argv)
+ workflows = args.workflows or workflows_with_cache(args.root)
+ report = audit(args.repo, workflows, args.runs, args.min_runs, args.workers)
+ print(json.dumps(report, indent=2) if args.format == "json" else markdown(report))
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/.github/scripts/tests/test_ci_cache_audit.py b/.github/scripts/tests/test_ci_cache_audit.py
new file mode 100644
index 0000000000..96c6c27709
--- /dev/null
+++ b/.github/scripts/tests/test_ci_cache_audit.py
@@ -0,0 +1,115 @@
+"""Fixtures for ci_cache_audit.py (the Rust cache cost audit)."""
+
+import sys
+import unittest
+from pathlib import Path
+
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import ci_cache_audit as audit # noqa: E402
+
+
+class CargoSecondsTests(unittest.TestCase):
+ def test_sums_every_finished_line_and_ignores_ansi(self):
+ log = (
+ "\x1b[1m\x1b[32m Finished\x1b[0m `dev` profile [unoptimized] target(s) in 1m 23s\n"
+ "noise\n"
+ " Finished `release` profile [optimized] target(s) in 45.5s\n"
+ )
+ self.assertAlmostEqual(audit.cargo_seconds(log), 83 + 45.5)
+
+ def test_no_cargo_output_is_zero(self):
+ self.assertEqual(audit.cargo_seconds("nothing compiled here\n"), 0.0)
+
+
+class VerdictTests(unittest.TestCase):
+ def test_long_compile_is_kept(self):
+ benefit = audit.estimate(30 * 60) # a 30 minute cold build
+ self.assertEqual(audit.verdict(benefit, 34, 19, 0.1, samples=6, min_runs=3), "keep")
+
+ def test_short_compile_is_dropped(self):
+ benefit = audit.estimate(40) # 40 s cold: about 19 s saved
+ self.assertEqual(audit.verdict(benefit, 14, 0, 0.0, samples=6, min_runs=3), "drop?")
+
+ def test_restore_that_eats_the_saving_is_dropped(self):
+ benefit = audit.estimate(150) # about 70 s saved, but the restore takes 60 s
+ self.assertEqual(audit.verdict(benefit, 60, 0, 0.0, samples=6, min_runs=3), "drop?")
+
+ def test_too_few_samples_is_not_a_verdict(self):
+ self.assertEqual(audit.verdict(900, 10, 10, 0.5, samples=2, min_runs=3), "few runs")
+
+ def test_sccache_estimate_matches_the_measured_warm_saving(self):
+ # e2b-bindings, cold run: 1968 requests executed at 1.523 s on 3.4
+ # effective cores; a warm directory saved 14.8 of the job's 32.8 minutes.
+ log = (
+ "2026-10-24T04:32:38.1Z Compile requests executed 1968\n"
+ "2026-10-24T04:32:38.1Z Cache hits 0\n"
+ "2026-10-24T04:32:38.1Z Average compiler 1.523 s\n"
+ )
+ cold = audit.sccache_cold_seconds(log)
+ predicted = audit.estimate(cold, from_sccache=True)
+ measured = 14.8 * 60
+ self.assertLess(abs(predicted - measured) / measured, 0.25)
+
+ def test_a_run_that_mostly_hit_says_nothing_about_a_cold_build(self):
+ log = (
+ "Compile requests executed 1968\n"
+ "Cache hits 1955\n"
+ "Average compiler 1.631 s\n"
+ )
+ self.assertIsNone(audit.sccache_cold_seconds(log))
+
+ def test_cargo_estimate_is_a_screen_that_runs_high(self):
+ # The same job's cargo wall times sum to 47.3 minutes (some invocations
+ # overlap): the estimate lands above the measured saving, within 50%.
+ measured = 14.8 * 60
+ predicted = audit.estimate(47.3 * 60)
+ self.assertGreater(predicted, measured)
+ self.assertLess((predicted - measured) / measured, 0.5)
+
+
+class WarmOnlyTests(unittest.TestCase):
+ WARM_LOG = (
+ "2026-10-24T05:00:00.1Z Compile requests executed 1968\n"
+ "2026-10-24T05:00:00.1Z Cache hits 1955\n"
+ "2026-10-24T05:00:00.1Z Average compiler 1.631 s\n"
+ " Finished `dev` profile [unoptimized] target(s) in 41.0s\n"
+ )
+ COLD_LOG = (
+ "2026-10-24T04:00:00.1Z Compile requests executed 1968\n"
+ "2026-10-24T04:00:00.1Z Cache hits 0\n"
+ "2026-10-24T04:00:00.1Z Average compiler 1.523 s\n"
+ " Finished `dev` profile [unoptimized] target(s) in 1500.0s\n"
+ )
+
+ def test_a_warm_run_is_not_a_cold_compile(self):
+ profile = audit.log_profile(self.WARM_LOG)
+ self.assertTrue(profile["warm"])
+ self.assertIsNone(profile["sccache_cold"])
+
+ def test_all_warm_logs_give_no_cold_evidence_and_no_drop(self):
+ cold, basis = audit.combine([audit.log_profile(self.WARM_LOG)] * 3)
+ self.assertEqual(basis, "warm-only")
+ self.assertEqual(
+ audit.verdict(audit.estimate(cold), 5, 0, 0.0, samples=12, min_runs=3, basis=basis),
+ "insufficient cold evidence",
+ )
+
+ def test_one_cold_log_among_warm_ones_is_enough(self):
+ cold, basis = audit.combine([audit.log_profile(self.WARM_LOG), audit.log_profile(self.COLD_LOG)])
+ self.assertEqual(basis, "sccache")
+ self.assertGreater(cold, 800)
+
+ def test_a_swatinem_restore_is_warm_but_a_miss_is_cold(self):
+ warm = audit.log_profile("Cache restored from key: v0-rust-x\n Finished `dev` profile target(s) in 20.0s\n")
+ miss = audit.log_profile("No cache found.\n Finished `dev` profile target(s) in 90.0s\n")
+ self.assertTrue(warm["warm"])
+ self.assertFalse(miss["warm"])
+ self.assertEqual(audit.combine([warm, miss]), (90.0, "cargo"))
+ self.assertEqual(audit.combine([warm]), (0.0, "warm-only"))
+
+ def test_no_logs_is_not_warm_only(self):
+ self.assertEqual(audit.combine([]), (0.0, "cargo"))
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/.github/workflows/cd-cua-spacesd.yml b/.github/workflows/cd-cua-spacesd.yml
index e5e3cf5fe3..bada98c749 100644
--- a/.github/workflows/cd-cua-spacesd.yml
+++ b/.github/workflows/cd-cua-spacesd.yml
@@ -172,10 +172,6 @@ jobs:
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
targets: ${{ matrix.target }}
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
- with:
- workspaces: "libs/cua-spacesd -> target"
- key: release-${{ matrix.target }}
- name: Build
working-directory: libs/cua-spacesd
env:
@@ -233,10 +229,6 @@ jobs:
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
targets: aarch64-apple-darwin, x86_64-apple-darwin
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
- with:
- workspaces: "libs/cua-spacesd -> target"
- key: release-darwin-universal
- name: Build arm64 and x86_64
working-directory: libs/cua-spacesd
run: |
@@ -396,10 +388,10 @@ jobs:
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
targets: x86_64-pc-windows-msvc
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: "libs/cua-spacesd -> target"
- key: release-x86_64-pc-windows-msvc
+ shared-key: libs-cua-spacesd-release
- name: Require Authenticode for a published release
if: env.PUBLISH == 'true' && github.repository == 'trycua/cua' && (vars.AZURE_CLIENT_ID == '' || vars.AZURE_ARTIFACT_SIGNING_ENDPOINT == '')
run: |
diff --git a/.github/workflows/cd-image-windows.yml b/.github/workflows/cd-image-windows.yml
index 6fc3b7e0a7..c5e0c74218 100644
--- a/.github/workflows/cd-image-windows.yml
+++ b/.github/workflows/cd-image-windows.yml
@@ -84,11 +84,10 @@ jobs:
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
targets: x86_64-pc-windows-msvc
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: "libs/cua-spacesd -> target"
- key: image-windows-x86_64-pc-windows-msvc
- cache-on-failure: true
+ shared-key: libs-cua-spacesd-release
- name: Build cua-spacesd.exe
working-directory: libs/cua-spacesd
run: cargo build --locked --release --target "$TARGET" -p cua-spacesd --bin cua-spacesd
@@ -142,10 +141,9 @@ jobs:
- name: Install protoc
run: sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends protobuf-compiler libprotobuf-dev
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cli-amd64
- name: Build the cua CLI
working-directory: libs/cua
run: cargo build --release --locked -p cua-cli --features byoc
diff --git a/.github/workflows/cd-images-spacesd-release.yml b/.github/workflows/cd-images-spacesd-release.yml
index dff64fa5bd..b45b662a3f 100644
--- a/.github/workflows/cd-images-spacesd-release.yml
+++ b/.github/workflows/cd-images-spacesd-release.yml
@@ -186,10 +186,6 @@ jobs:
run: |
scripts/images/install-release-tools.sh --push-only
cd libs/cua && (rustup show active-toolchain || rustup toolchain install)
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
- with:
- workspaces: libs/cua
- key: images-pins
- name: Commit as the App's bot user (contributor-attribution resolves it)
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
diff --git a/.github/workflows/chaos-cua-compat.yml b/.github/workflows/chaos-cua-compat.yml
index 13b6de476f..a5931d4dd7 100644
--- a/.github/workflows/chaos-cua-compat.yml
+++ b/.github/workflows/chaos-cua-compat.yml
@@ -59,10 +59,10 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: chaos-cua-compat
+ shared-key: libs-cua-compat
- name: cua-chaos tooling (scheduler, inventories, runner)
run: cd libs/cua && cargo test --locked -p cua-chaos
- name: E2B gateway under seeded chaos, leak check after every seed
@@ -82,12 +82,11 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: chaos-cua-compat-spaces
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
diff --git a/.github/workflows/ci-cua-compat-daytona.yml b/.github/workflows/ci-cua-compat-daytona.yml
index 615f991618..1cfe171362 100644
--- a/.github/workflows/ci-cua-compat-daytona.yml
+++ b/.github/workflows/ci-cua-compat-daytona.yml
@@ -46,10 +46,10 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cua-compat-daytona
+ shared-key: libs-cua-compat
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
@@ -90,10 +90,10 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cua-compat-daytona
+ shared-key: libs-cua-compat
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
diff --git a/.github/workflows/ci-cua-compat-modal.yml b/.github/workflows/ci-cua-compat-modal.yml
index c2b189cfed..f6c3762a56 100644
--- a/.github/workflows/ci-cua-compat-modal.yml
+++ b/.github/workflows/ci-cua-compat-modal.yml
@@ -50,10 +50,10 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cua-compat-modal
+ shared-key: libs-cua-compat
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
@@ -105,10 +105,10 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cua-compat-modal
+ shared-key: libs-cua-compat
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
@@ -159,12 +159,11 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: cua-compat-e2e
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
diff --git a/.github/workflows/ci-cua-compat.yml b/.github/workflows/ci-cua-compat.yml
index 2341c77ea0..de1cfee6a1 100644
--- a/.github/workflows/ci-cua-compat.yml
+++ b/.github/workflows/ci-cua-compat.yml
@@ -24,6 +24,16 @@ on:
- "libs/cua/crates/cua-spacesd-client/src/testing.rs"
- "tests/compat/**"
- ".github/workflows/ci-cua-compat.yml"
+ # Main keeps the Rust cache family (libs-cua-compat, Linux and macOS) warm
+ # for the pull request runs above; the weekly run alone let it expire.
+ push:
+ branches: [main]
+ paths:
+ - "libs/cua/crates/cua-compat/**"
+ - "libs/cua/crates/cua-cli/src/compat_cmd.rs"
+ - "libs/cua/crates/cua-spacesd-client/src/testing.rs"
+ - "tests/compat/**"
+ - ".github/workflows/ci-cua-compat.yml"
schedule:
- cron: "41 6 * * 1"
workflow_dispatch:
@@ -33,7 +43,9 @@ permissions:
concurrency:
group: ci-cua-compat-${{ github.ref }}-${{ github.event_name }}
- cancel-in-progress: true
+ # Only superseded pull request runs are cancelled: a cancelled main run
+ # saves no cache.
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
@@ -60,10 +72,10 @@ jobs:
uses: dtolnay/[email protected]
with:
components: clippy, rustfmt
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cua-compat
+ shared-key: libs-cua-compat
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
@@ -83,6 +95,8 @@ jobs:
surface:
name: E2B SDK surface
+ # Not on main pushes: those exist to keep the hermetic job's Rust cache warm.
+ if: github.event_name != 'push'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -96,7 +110,7 @@ jobs:
/tmp/pinned/bin/pip install -q "e2b==$(cat tests/compat/e2b/PINNED)"
/tmp/pinned/bin/python tests/compat/e2b/surface.py --diff "tests/compat/e2b/fixtures/surface-$(cat tests/compat/e2b/PINNED).json"
- name: Latest SDK matches the newest snapshot (drift)
- if: github.event_name != 'pull_request'
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
run: |
python -m venv /tmp/latest
/tmp/latest/bin/pip install -q -U e2b
@@ -105,7 +119,9 @@ jobs:
live-e2b:
name: live E2B conformance (drift)
- if: github.event_name != 'pull_request'
+ # Paid E2B sandboxes and a live provider: the weekly run and manual runs only,
+ # never the main pushes that keep the Rust cache warm.
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 20
env:
diff --git a/.github/workflows/ci-cua-microvm.yml b/.github/workflows/ci-cua-microvm.yml
index b0e16b1648..073df6d50a 100644
--- a/.github/workflows/ci-cua-microvm.yml
+++ b/.github/workflows/ci-cua-microvm.yml
@@ -70,10 +70,10 @@ jobs:
with:
components: clippy, rustfmt
targets: x86_64-unknown-linux-musl, aarch64-unknown-linux-musl
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cua-microvm
+ shared-key: libs-cua-vmm
- name: Format
run: cargo fmt -p cua-vmm -p cua-microvm-init -- --check
- name: Clippy
@@ -106,10 +106,10 @@ jobs:
- uses: dtolnay/[email protected]
with:
targets: aarch64-unknown-linux-musl
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cua-microvm-macos
+ shared-key: libs-cua-vmm
- name: cua-vz Swift tests
working-directory: libs/cua/vz
run: swift test
diff --git a/.github/workflows/ci-cua-oci-spacesd.yml b/.github/workflows/ci-cua-oci-spacesd.yml
index 3ec32b18cf..28e61a84b0 100644
--- a/.github/workflows/ci-cua-oci-spacesd.yml
+++ b/.github/workflows/ci-cua-oci-spacesd.yml
@@ -60,10 +60,10 @@ jobs:
targets: x86_64-unknown-linux-musl
- name: musl toolchain
run: sudo apt-get update -qq && sudo apt-get install -y -qq musl-tools
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: "libs/cua-spacesd -> target"
- key: oci-static-musl
+ shared-key: libs-cua-spacesd-static
- name: Build
working-directory: libs/cua-spacesd
run: cargo build --locked --profile static --target x86_64-unknown-linux-musl -p cua-spacesd --bin cua-spacesd
@@ -95,10 +95,9 @@ jobs:
- name: Install protoc
uses: ./.github/actions/setup-protoc
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: "tests/e2e/local-runtimes -> target"
- key: oci-any
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: cua-spacesd-linux-x86_64
diff --git a/.github/workflows/ci-cua-perception-release.yml b/.github/workflows/ci-cua-perception-release.yml
index 941dd6f2da..f799d6d4af 100644
--- a/.github/workflows/ci-cua-perception-release.yml
+++ b/.github/workflows/ci-cua-perception-release.yml
@@ -81,7 +81,10 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- - uses: ./.github/actions/rust-cache
+ # Only macOS compiles long enough (about 1 minute of cacheable work) to
+ # pay for the restore; Linux and Windows take 5 to 25 seconds cold.
+ - if: runner.os == 'macOS'
+ uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua-driver/rust
- name: Compile and test Cua Perception
diff --git a/.github/workflows/ci-cua-proto.yml b/.github/workflows/ci-cua-proto.yml
index eaecce40ee..73e6054551 100644
--- a/.github/workflows/ci-cua-proto.yml
+++ b/.github/workflows/ci-cua-proto.yml
@@ -80,6 +80,7 @@ jobs:
- uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
+ shared-key: libs-cua-proto
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
diff --git a/.github/workflows/ci-cua-spaces.yml b/.github/workflows/ci-cua-spaces.yml
index 8620a2a10c..b3c56b65cd 100644
--- a/.github/workflows/ci-cua-spaces.yml
+++ b/.github/workflows/ci-cua-spaces.yml
@@ -158,9 +158,8 @@ jobs:
libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \
libx11-dev libxkbcommon-dev libwayland-dev libxcb1-dev libx11-xcb-dev \
libxkbcommon-x11-dev libxrandr-dev libxi-dev libudev-dev
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
- key: rust-tests
workspaces: |
apps/cua-spaces/src-tauri -> target
libs/cua -> target
@@ -182,9 +181,12 @@ jobs:
run: |
rustup show active-toolchain || rustup toolchain install
rustup target add wasm32-unknown-unknown
+ # The wasm build is small: share the small family the web UI jobs use
+ # rather than restoring the multi-GB libs-cua family for it.
- uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
+ shared-key: apps-cua-spaces-core-wasm
- uses: ./.github/actions/wasm-bindgen
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- uses: actions/setup-node@v4
@@ -243,16 +245,15 @@ jobs:
run: |
rustup show active-toolchain || rustup toolchain install
rustup target add wasm32-unknown-unknown
+ # One cache step: a second one on the same directory made both save a
+ # full copy.
- uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
+ shared-key: spaces-bundle-${{ matrix.name }}
- uses: ./.github/actions/wasm-bindgen
- name: Install protoc
uses: ./.github/actions/setup-protoc
- - uses: ./.github/actions/rust-cache
- with:
- workspaces: libs/cua
- shared-key: spaces-bundle-${{ matrix.name }}
- name: Install Linux build dependencies
if: runner.os == 'Linux'
run: |
diff --git a/.github/workflows/ci-cua-spacesd-html5.yml b/.github/workflows/ci-cua-spacesd-html5.yml
index d1a10af9f3..fb707f94a6 100644
--- a/.github/workflows/ci-cua-spacesd-html5.yml
+++ b/.github/workflows/ci-cua-spacesd-html5.yml
@@ -69,8 +69,5 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- - uses: ./.github/actions/rust-cache
- with:
- workspaces: libs/cua
- run: cargo fmt -p cua-spacesd-html5 -- --check
- run: cargo test --locked -p cua-spacesd-html5 --features standalone
diff --git a/.github/workflows/ci-elastic.yml b/.github/workflows/ci-elastic.yml
index 97a1d8fe38..8bf2d48492 100644
--- a/.github/workflows/ci-elastic.yml
+++ b/.github/workflows/ci-elastic.yml
@@ -75,12 +75,12 @@ jobs:
- uses: dtolnay/[email protected]
with:
components: clippy, rustfmt
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: elastic
+ shared-key: libs-cua-test
- name: Format
working-directory: libs/cua
run: cargo fmt -p cua-cluster -p cua-spaces -p cua-byoc -- --check
diff --git a/.github/workflows/ci-vm-density.yml b/.github/workflows/ci-vm-density.yml
index d7c42fc7f3..78ca46e2d9 100644
--- a/.github/workflows/ci-vm-density.yml
+++ b/.github/workflows/ci-vm-density.yml
@@ -68,10 +68,10 @@ jobs:
- name: Install protoc
uses: ./.github/actions/setup-protoc
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: vm-density-unit
+ shared-key: libs-cua-vmm
- name: Accounting, admission, QEMU arguments, profiles, placement
run: >
cargo test --locked -p cua-vmm --lib -- density:: qemu::
@@ -92,12 +92,12 @@ jobs:
- name: Install protoc
uses: ./.github/actions/setup-protoc
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: vm-density-kvm
+ shared-key: libs-cua-qemu-tests
- name: QEMU, KVM and the Linux reference disk
run: |
sudo apt-get update -qq
diff --git a/.github/workflows/compat-drift.yml b/.github/workflows/compat-drift.yml
index 92291b1aa7..19d8d4de4b 100644
--- a/.github/workflows/compat-drift.yml
+++ b/.github/workflows/compat-drift.yml
@@ -197,10 +197,10 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: cua-compat-drift
+ shared-key: libs-cua-compat
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
@@ -237,12 +237,11 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: cua-compat-e2e
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
diff --git a/.github/workflows/docs-compile-lanes.yml b/.github/workflows/docs-compile-lanes.yml
index ab215ccf82..37f8d37c22 100644
--- a/.github/workflows/docs-compile-lanes.yml
+++ b/.github/workflows/docs-compile-lanes.yml
@@ -21,6 +21,20 @@ on:
- "tests/e2e/cua-sdk/docs/extract.py"
- "tests/e2e/cua-sdk/docs/preludes/**"
- ".github/workflows/docs-compile-lanes.yml"
+ # Main keeps the Rust cache (docs-rust) warm for the pull request runs above.
+ push:
+ branches: [main]
+ paths:
+ - "docs/content/docs/**"
+ - "libs/cua/swift/**"
+ - "libs/cua/kotlin/**"
+ - "libs/cua/crates/**"
+ - "libs/cua/Cargo.toml"
+ - "libs/cua/Cargo.lock"
+ - "tests/e2e/cua-sdk/docs/compile_lane.py"
+ - "tests/e2e/cua-sdk/docs/extract.py"
+ - "tests/e2e/cua-sdk/docs/preludes/**"
+ - ".github/workflows/docs-compile-lanes.yml"
workflow_dispatch:
permissions:
@@ -28,7 +42,7 @@ permissions:
concurrency:
group: docs-compile-lanes-${{ github.ref }}
- cancel-in-progress: true
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
# Cua programs and packages run here never send usage telemetry.
@@ -37,7 +51,8 @@ env:
jobs:
swift:
- if: ${{ !startsWith(github.head_ref, 'release-please--branches--') }}
+ # Not on main pushes: those exist to keep the rust lane's cache warm.
+ if: ${{ github.event_name != 'push' && !startsWith(github.head_ref, 'release-please--branches--') }}
name: swift blocks
runs-on: macos-14
timeout-minutes: 30
@@ -51,7 +66,8 @@ jobs:
run: python3 tests/e2e/cua-sdk/docs/compile_lane.py --lane swift
kotlin:
- if: ${{ !startsWith(github.head_ref, 'release-please--branches--') }}
+ # Not on main pushes: those exist to keep the rust lane's cache warm.
+ if: ${{ github.event_name != 'push' && !startsWith(github.head_ref, 'release-please--branches--') }}
name: kotlin blocks
runs-on: ubuntu-latest
timeout-minutes: 20
@@ -81,9 +97,9 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: ". -> target-docs-rust"
- key: docs-rust
+ shared-key: docs-rust
- name: Type-check the Rust blocks
run: python3 tests/e2e/cua-sdk/docs/compile_lane.py --lane rust
diff --git a/.github/workflows/e2e-compat-examples.yml b/.github/workflows/e2e-compat-examples.yml
index 4876cb2b20..9bd60d5f99 100644
--- a/.github/workflows/e2e-compat-examples.yml
+++ b/.github/workflows/e2e-compat-examples.yml
@@ -91,12 +91,11 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: cua-compat-e2e
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
diff --git a/.github/workflows/e2e-cua-compat-daytona.yml b/.github/workflows/e2e-cua-compat-daytona.yml
index 0db5a105a4..fd6d89fcd3 100644
--- a/.github/workflows/e2e-cua-compat-daytona.yml
+++ b/.github/workflows/e2e-cua-compat-daytona.yml
@@ -36,12 +36,11 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: cua-compat-e2e
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
diff --git a/.github/workflows/e2e-cua-compat-e2b-cases.yml b/.github/workflows/e2e-cua-compat-e2b-cases.yml
index db0ef6d926..2b5d92bd4b 100644
--- a/.github/workflows/e2e-cua-compat-e2b-cases.yml
+++ b/.github/workflows/e2e-cua-compat-e2b-cases.yml
@@ -41,12 +41,11 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: cua-compat-e2b-cases
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
diff --git a/.github/workflows/e2e-cua-compat.yml b/.github/workflows/e2e-cua-compat.yml
index 356e9726ae..0aa13eba85 100644
--- a/.github/workflows/e2e-cua-compat.yml
+++ b/.github/workflows/e2e-cua-compat.yml
@@ -37,12 +37,11 @@ jobs:
uses: ./.github/actions/setup-protoc
- name: Install pinned Rust toolchain
uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: cua-compat-e2e
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml
index e2aa182136..f1b82ce994 100644
--- a/.github/workflows/nightly-build.yml
+++ b/.github/workflows/nightly-build.yml
@@ -53,10 +53,10 @@ jobs:
- name: Install protoc
uses: ./.github/actions/setup-protoc
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: build-qemu
+ shared-key: libs-cua-qemu-tests
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version: "1.24"
diff --git a/.github/workflows/nightly-e2b-rollouts.yml b/.github/workflows/nightly-e2b-rollouts.yml
index 6b606de33a..1a87e71cc0 100644
--- a/.github/workflows/nightly-e2b-rollouts.yml
+++ b/.github/workflows/nightly-e2b-rollouts.yml
@@ -58,7 +58,7 @@ jobs:
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua -> target
- name: Install build deps and gVisor
diff --git a/.github/workflows/nightly-fork-batch.yml b/.github/workflows/nightly-fork-batch.yml
index f7cb547018..ec488a4f7a 100644
--- a/.github/workflows/nightly-fork-batch.yml
+++ b/.github/workflows/nightly-fork-batch.yml
@@ -67,12 +67,11 @@ jobs:
uses: dtolnay/[email protected]
with:
targets: wasm32-unknown-unknown
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: |
libs/cua
libs/cua-spacesd
- key: cua-e2e
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
diff --git a/.github/workflows/nightly-qemu-fork.yml b/.github/workflows/nightly-qemu-fork.yml
index e9d5837923..1afc6da4fa 100644
--- a/.github/workflows/nightly-qemu-fork.yml
+++ b/.github/workflows/nightly-qemu-fork.yml
@@ -88,10 +88,10 @@ jobs:
- name: Install protoc
uses: ./.github/actions/setup-protoc
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: qemu-fork
+ shared-key: libs-cua-qemu-tests
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version: "1.24"
diff --git a/.github/workflows/nightly-qemu-ready.yml b/.github/workflows/nightly-qemu-ready.yml
index ac149536bb..7392e72d9b 100644
--- a/.github/workflows/nightly-qemu-ready.yml
+++ b/.github/workflows/nightly-qemu-ready.yml
@@ -62,10 +62,10 @@ jobs:
- name: Install protoc
uses: ./.github/actions/setup-protoc
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: qemu-ready
+ shared-key: libs-cua-qemu-tests
- name: Install QEMU and firmware
run: |
set -euo pipefail
diff --git a/.github/workflows/nightly-qemu-vmm.yml b/.github/workflows/nightly-qemu-vmm.yml
index 891237e7ee..d5c935d6ba 100644
--- a/.github/workflows/nightly-qemu-vmm.yml
+++ b/.github/workflows/nightly-qemu-vmm.yml
@@ -60,10 +60,10 @@ jobs:
- name: Install protoc
uses: ./.github/actions/setup-protoc
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: qemu-vmm
+ shared-key: libs-cua-vmm
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version: "1.24"
diff --git a/.github/workflows/space-egress-nightly.yml b/.github/workflows/space-egress-nightly.yml
index c3d4f5e471..a32bd02462 100644
--- a/.github/workflows/space-egress-nightly.yml
+++ b/.github/workflows/space-egress-nightly.yml
@@ -59,10 +59,10 @@ jobs:
- name: Install protoc
uses: ./.github/actions/setup-protoc
- uses: dtolnay/[email protected]
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: space-egress-containers
+ shared-key: libs-cua-qemu-tests
- name: nftables and gVisor
run: |
set -euo pipefail
@@ -114,10 +114,10 @@ jobs:
- uses: dtolnay/[email protected]
with:
targets: x86_64-unknown-linux-musl
- - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
+ - uses: ./.github/actions/rust-cache
with:
workspaces: libs/cua
- key: space-egress-vms
+ shared-key: libs-cua-qemu-tests
- name: QEMU, pasta, and user namespaces for pasta
run: |
set -euo pipefail