diff --git a/apps/hash-graph/docs/task-dependencies.json b/apps/hash-graph/docs/task-dependencies.json index ad841e994d4..36ae95391b5 100644 --- a/apps/hash-graph/docs/task-dependencies.json +++ b/apps/hash-graph/docs/task-dependencies.json @@ -32,7 +32,12 @@ }, "compile": { "dependsOn": [], - "cache": false, + "env": [ + "CARGO_PROFILE_*", + "RUNNER_ARCH", + "RUNNER_OS", + "RUSTFLAGS" + ], "affectedBy": [ "darwin-kperf-codegen", "error-stack-macros" diff --git a/apps/hash-graph/turbo.json b/apps/hash-graph/turbo.json index e145b52630f..f510bcbf2fd 100644 --- a/apps/hash-graph/turbo.json +++ b/apps/hash-graph/turbo.json @@ -89,7 +89,14 @@ ] }, "compile": { - "command": ["cargo", "build", "--bin", "hash-graph", "--all-features"] + "command": ["cargo", "build", "--bin", "hash-graph", "--all-features"], + "cache": true, + // The root manifest carries the profiles and the workspace dependency versions. + "inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/Cargo.toml"], + "outputs": ["$TURBO_ROOT$/target/debug/hash-graph"], + // Turbo does not hash the platform, so a binary restored from the remote cache + // could otherwise come from another OS or architecture. + "env": ["CARGO_PROFILE_*", "RUSTFLAGS", "RUNNER_ARCH", "RUNNER_OS"] }, "compile:release": { "command": [