试点启用隔离 Rust 编译缓存并防止镜像叠层
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m23s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m34s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m23s
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m23s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m34s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m23s
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
仅在 AGC Rust lane 1 消费可信缓存快照,保持独立 target 和关闭增量编译 从远端 master 的确定提交构建快照,拒绝以已有对象缓存的镜像继续叠层 隔离缓存配置与进程状态,缓存故障回退真实编译并保留失败状态 增加命中统计、编译耗时和缓存行为验证 同步缓存来源、镜像保留及不中断运行中 CI 的运维约定
This commit is contained in:
@@ -150,6 +150,7 @@ function formatDuration(milliseconds) {
|
||||
// 编译一次,直接拿到测试可执行文件:后续每片都运行同一个二进制,不再各自调用 cargo,
|
||||
// 免得 N 个 cargo 去争 package cache 与 target 目录锁。
|
||||
function resolveTestExecutable() {
|
||||
const startedAt = Date.now();
|
||||
return new Promise((resolve, reject) => {
|
||||
const cargoArguments = buildCargoArguments({
|
||||
kind: options.targetKind,
|
||||
@@ -194,6 +195,9 @@ function resolveTestExecutable() {
|
||||
reject(new Error(`unable to start cargo: ${error.message}`));
|
||||
});
|
||||
child.on('close', (code) => {
|
||||
console.log(
|
||||
`[rust-shards] compile duration=${formatDuration(Date.now() - startedAt)} exit=${code}`,
|
||||
);
|
||||
if (code !== 0) {
|
||||
reject(
|
||||
new Error(
|
||||
|
||||
Reference in New Issue
Block a user