build job: the extract stage stamps every unpacked file (the PC's persistent target dir judged 0.3.6 sources unchanged since the 0.3.5 build and linked new callers against stale crates); the packer stamps too, this guard holds if it regresses
This commit is contained in:
parent
c26d6bef72
commit
021a7158d5
1 changed files with 10 additions and 0 deletions
|
|
@ -283,6 +283,11 @@ pub fn extract_script(p: &BuildParams, job_id: &str, zip_wsl: &str) -> String {
|
|||
s.push_str("[ -f \"$ZIP\" ] || { echo \"RESULT extract zip missing at $ZIP\"; exit 2; }\n");
|
||||
s.push_str("rm -rf \"$B/src\" && mkdir -p \"$B/src\" && cp \"$ZIP\" \"$B/inputs.zip\" || { echo \"RESULT extract cannot copy the zip into $B\"; exit 2; }\n");
|
||||
s.push_str("unzip -q -o \"$B/inputs.zip\" -d \"$B/src\" || { echo \"RESULT extract unzip failed\"; exit 2; }\n");
|
||||
// every unpacked file (the zip root and the sibling igneum-pow) is stamped now: the target dir persists between
|
||||
// jobs and cargo judges freshness by mtime, so sources that keep the Mac's older mtimes would be taken as unchanged
|
||||
// since the last build and new callers linked against stale crates (5 October 2026: the 0.3.6 job built kaspad
|
||||
// against 0.3.5's consensus-core). The packer stamps too (push-build-inputs.sh); this guard holds if it regresses.
|
||||
s.push_str("find \"$B/src\" -type f -exec touch {} + || { echo \"RESULT extract cannot stamp the sources\"; exit 2; }\n");
|
||||
s.push_str("[ -f \"$SRC/manifest.json\" ] || { echo \"RESULT extract no manifest.json under $SRC\"; exit 2; }\n");
|
||||
s.push_str("echo \"RESULT extract ok $(find \"$B/src\" -type f | wc -l) files, $(du -sh \"$B/src\" | cut -f1) at $(now)\"\n");
|
||||
s
|
||||
|
|
@ -551,6 +556,11 @@ mod tests {
|
|||
let ex = extract_script(&p, id, "/mnt/c/it's/build-inputs.zip");
|
||||
assert!(ex.contains("ZIP='/mnt/c/it'\\''s/build-inputs.zip'"));
|
||||
assert!(ex.contains("unzip -q -o"));
|
||||
// the unpacked sources are stamped after the unzip and before the manifest check (cargo's mtime freshness)
|
||||
let unzip_at = ex.find("unzip -q -o").unwrap();
|
||||
let touch_at = ex.find("find \"$B/src\" -type f -exec touch {} +").expect("the extract stamps the sources");
|
||||
let manifest_at = ex.find("manifest.json").unwrap();
|
||||
assert!(unzip_at < touch_at && touch_at < manifest_at, "{ex}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue