refactor(artifacts): harmonize Windows to Linux raw-file collection
Windows produced an intermediate C:\CI\output\artifacts.zip that upload-artifact then re-zipped (zip-in-zip), while Linux deposited raw files. Make both paths consistent: the build stages raw outputs into a collect dir; collect zips it only as a transport archive, fetches, and extracts into the host artifact dir; actions/upload-artifact produces the single final archive. - _windows_build: param artifact_zip -> output_dir; stage raw files (in-place when source IS the collect dir, else wipe+copy), no Compress-Archive; absolute artifact-source resolved. - _windows_collect: zip guest dir as transport, fetch, extract (mirror _linux_collect); guest_path is now the collect directory. - job.py / build_run CLI: pass output_dir; rename --guest-artifact-zip -> --guest-output-dir. - Tests updated for the raw-file contract. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -322,8 +322,8 @@ def test_job_windows_branch_with_overrides(
|
||||
# CPU/RAM override patched the clone VMX.
|
||||
clone_vmx = next((tmp_path / "vms").rglob("*.vmx"), None)
|
||||
# After successful job the clone dir is deleted, so the file is gone.
|
||||
# Check that the Windows collect helper got the correct artifact path instead.
|
||||
assert calls["windows_collect"][0]["guest_path"].endswith("artifacts.zip")
|
||||
# Check that the Windows collect helper got the collect dir instead.
|
||||
assert calls["windows_collect"][0]["guest_path"] == "C:\\CI\\output"
|
||||
assert clone_vmx is None # cleaned up
|
||||
assert backend.calls[-1] == "delete"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user