[chore](trx-rs): add sccache compilation cache
Bake sccache into the SDK image and enable it via RUSTC_WRAPPER in CI and the devcontainer (not repo-wide, so non-SDK builds are unaffected). - container/Containerfile: install the sccache musl binary. - ci.yml: RUSTC_WRAPPER=sccache, CARGO_INCREMENTAL=0, SCCACHE_DIR=/sccache, cache size cap, plus a `sccache --show-stats` step per job. - runner-config.example.yaml: bind-mount /var/cache/sccache into job containers so the cache persists across runs and is shared between jobs. - .devcontainer: enable sccache with a named cache volume. Assisted-By: Claude Code (claude-opus-4) Claude-Session: https://claude.ai/code/session_01NFpGtGTWUEYXLwZeZs2RAV Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -27,7 +27,9 @@ cache:
|
||||
|
||||
container:
|
||||
# Cap every job container's CPU so CI stays within the 2-thread budget even
|
||||
# if capacity is raised later.
|
||||
options: "--cpus=2"
|
||||
# if capacity is raised later. The -v mount persists the sccache cache on the
|
||||
# host (create it first: `mkdir -p /var/cache/sccache`), matching SCCACHE_DIR
|
||||
# in the workflow.
|
||||
options: "--cpus=2 -v /var/cache/sccache:/sccache"
|
||||
# Reuse the host VM's Docker network for the built-in cache/artifact server.
|
||||
network: "host"
|
||||
|
||||
Reference in New Issue
Block a user