mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
build fast improvements
This commit is contained in:
+5
-4
@@ -8,10 +8,11 @@
|
||||
### Build cache layout and sccache
|
||||
|
||||
The fast build now chooses a cache bucket per Git worktree or branch so
|
||||
concurrent builds no longer fight over `target`. You can override the default
|
||||
bucket with `BUILD_FAST_CACHE_KEY=my-feature` when you need a stable directory
|
||||
for long lived experiments. The active bucket is echoed at the start of each
|
||||
run.
|
||||
concurrent builds no longer fight over `target`. Each bucket name includes a
|
||||
hash of the raw ref to keep slashes and similarly named branches distinct. You
|
||||
can override the default bucket with `BUILD_FAST_CACHE_KEY=my-feature` when you
|
||||
need a stable directory for long lived experiments. The active bucket is echoed
|
||||
at the start of each run.
|
||||
|
||||
Rust compiler outputs are still shared through `sccache` when it is available.
|
||||
For best results in a multi-worktree setup, configure a single `sccache`
|
||||
|
||||
+3
-1
@@ -256,9 +256,11 @@ if [ -z "${BUILD_FAST_CACHE_KEY:-}" ]; then
|
||||
else
|
||||
BRANCH_NAME_RAW="unknown"
|
||||
fi
|
||||
BRANCH_FINGERPRINT="$(hash_string "${BRANCH_NAME_RAW}")"
|
||||
BRANCH_HASH_SHORT="${BRANCH_FINGERPRINT:0:12}"
|
||||
WORKTREE_HASH="$(hash_string "${WORKTREE_ROOT}")"
|
||||
WORKTREE_HASH_SHORT="${WORKTREE_HASH:0:12}"
|
||||
CACHE_KEY_RAW="${BRANCH_NAME_RAW}-${WORKTREE_HASH_SHORT}"
|
||||
CACHE_KEY_RAW="${BRANCH_NAME_RAW}-${BRANCH_HASH_SHORT}-${WORKTREE_HASH_SHORT}"
|
||||
CACHE_KEY_SOURCE="branch/worktree"
|
||||
else
|
||||
CACHE_KEY_RAW="${BUILD_FAST_CACHE_KEY}"
|
||||
|
||||
Reference in New Issue
Block a user