Skip to content

Commit 8dba598

Browse files
committed
Fix Windows release smoke import library staging
1 parent d77a7d0 commit 8dba598

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ jobs:
379379
'${{ matrix.import_library_name }}'
380380
)"
381381
if [[ -f "$import_lib_path" ]]; then
382-
cp "$import_lib_path" "dist/${{ matrix.platform_id }}/${{ matrix.import_library_name }}"
382+
r2_dir="$(dirname "${{ steps.package.outputs.r2-path }}")"
383+
cp "$import_lib_path" "$r2_dir/${{ matrix.import_library_name }}"
383384
fi
384385
385386
- name: Record windows dependent DLLs

scripts/release/test_release_workflow_contracts.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@ def test_windows_packaging_uses_workspace_absolute_out_dir(self) -> None:
4444
)
4545
self.assertNotIn("out-dir: dist/${{ matrix.platform_id }}", windows_section)
4646

47+
def test_windows_import_library_is_preserved_next_to_staged_dll(self) -> None:
48+
workflow_text = RELEASE_WORKFLOW.read_text(encoding="utf-8")
49+
windows_section = workflow_text.split("- name: Preserve windows import library", 1)[1]
50+
51+
self.assertIn(
52+
'r2_dir="$(dirname "${{ steps.package.outputs.r2-path }}")"',
53+
windows_section,
54+
)
55+
self.assertIn(
56+
'cp "$import_lib_path" "$r2_dir/${{ matrix.import_library_name }}"',
57+
windows_section,
58+
)
59+
4760

4861
if __name__ == "__main__":
4962
unittest.main()

0 commit comments

Comments
 (0)