From 76d101b7a8348eaf411c4ebbed5f064e46dd106f Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Tue, 4 Aug 2026 13:27:22 +0200 Subject: [PATCH] Share sccache between manual dev builds and CI SCCACHE_DIR/CARGO_TARGET_DIR now point at /var/local/sccache and /var/local/cargo-target, shared with the interactive dev shell via a new `builders` group, instead of the CI job hitting a leftover personal sccache server it had no permission to write build output for. --- .gitea/workflows/deploy.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 843e0e9..8975471 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -15,6 +15,11 @@ jobs: CARGO_HOME: /var/local/cargo RUSTUP_HOME: /var/local/rustup PATH: /var/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin + # 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_DIR: /var/local/sccache + CARGO_TARGET_DIR: /var/local/cargo-target steps: - uses: actions/checkout@v4 @@ -26,8 +31,8 @@ jobs: set -euo pipefail rel="/srv/app/uhhm-portal/releases/${{ github.sha }}" mkdir -p "$rel" - cp target/release/portal "$rel/uhhm-portal" - cp -r target/site "$rel/site" + cp "$CARGO_TARGET_DIR/release/portal" "$rel/uhhm-portal" + cp -r "$CARGO_TARGET_DIR/site" "$rel/site" ln -sfn "$rel" /srv/app/uhhm-portal/current # Sourced from this repo's own Settings -> Actions Variables/Secrets,