From abe13c139cf47ba75aed06309bf14fff49efba3e Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Tue, 4 Aug 2026 13:30:39 +0200 Subject: [PATCH] Give CI its own SCCACHE_SERVER_PORT Sharing the default port meant whichever context's server happened to be running (usually the interactive shell's, via rust-analyzer's background cargo checks) silently served the other's build requests too - and since sccache's server writes outputs under its own user, that meant permission-denied for whichever context didn't own it. Separate ports keep the server processes apart; SCCACHE_DIR is what's actually shared, giving real cache hits across both. --- .gitea/workflows/deploy.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 8975471..e4a114c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -18,7 +18,16 @@ jobs: # Shared with interactive dev builds (see ~/.config/fish/config.fish) # so a crate compiled once, by either a manual build or CI, is # cached for the other - real cache hits, not just a warm toolchain. + # SCCACHE_SERVER_PORT deliberately differs from the interactive + # dev shell's (4227): sccache's server is discovered by a fixed + # TCP port shared by every local user, so if both contexts used + # the same port, whichever one's server happened to be running + # would silently "win" and serve build requests it doesn't have + # filesystem permission for. Separate ports keep each context's + # own server answering its own requests; the cache directory + # (not the server process) is what's actually shared. SCCACHE_DIR: /var/local/sccache + SCCACHE_SERVER_PORT: "4228" CARGO_TARGET_DIR: /var/local/cargo-target steps: - uses: actions/checkout@v4