Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/multi_arch_release_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,12 @@ jobs:
env:
KPACK_SPLIT: ${{ needs.build_python_packages.outputs.kpack_split }}
run: |
# Temporary: --skip-native-packages until the MSI build workflow is
# wired into this release pipeline (see #1987).
python build_tools/github_actions/publish_rocm_to_release_buckets.py \
--run-id="${{ github.run_id }}" \
--platform=windows \
--release-type="${BUILD_RELEASE_TYPE}" \
--kpack-split="${KPACK_SPLIT}" \
--structured \
--skip-native-packages
--structured

trigger_test_artifacts_per_family:
needs: [build_artifacts]
Expand Down
54 changes: 2 additions & 52 deletions build_tools/github_actions/publish_rocm_to_release_buckets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [x] tarballs
- [x] python packages
- [x] native linux packages
- [x] native windows packages
- [ ] native windows packages

Example with ``--run-id 12345 --platform linux --release-type dev``:

Expand Down Expand Up @@ -43,11 +43,6 @@
s3://therock-prerelease-artifacts/12345-linux/packages/rpm/
-> s3://therock-repo-amd-rc-core/v5/rocm/core/packages/rpm/

native windows packages (dev/nightly), with ``--platform windows``:

s3://therock-dev-artifacts/12345-windows/packages/msi/
-> s3://therock-repo-amd-dev-core/v5/rocm/core/packages/msi/20250101-12345/

ASAN build variant:

For ASAN builds (--build-variant asan), python packages are skipped and
Expand Down Expand Up @@ -283,49 +278,6 @@ def publish_native_linux_packages(
raise FileNotFoundError(f"No {pkg_type} packages found at {source.s3_uri}")


def publish_native_windows_packages(
artifacts_root: WorkflowOutputRoot,
release_type: str,
backend: StorageBackend,
) -> None:
"""Copy native Windows MSI packages from the artifacts bucket to the release bucket.

The source MSIs were uploaded by upload_package_repo.py (called from
multi_arch_build_native_windows_packages.yml) as loose .msi files.

dev/nightly example:
s3://therock-dev-artifacts/12345-windows/packages/msi/
-> s3://therock-repo-amd-dev-core/v5/rocm/core/packages/msi/20250101-12345/

prerelease example:
s3://therock-prerelease-artifacts/12345-windows/packages/msi/
-> s3://therock-repo-amd-rc-core/v5/rocm/core/packages/msi/
"""
dest_bucket = get_product_release_bucket_config(release_type, "core")
today = datetime.date.today().strftime("%Y%m%d")

source = artifacts_root.native_windows_packages("msi")

# TODO(#1987): the destination path scheme per release channel is not yet
# settled for Windows MSIs. This mirrors the native Linux packages (a
# {date}-{run_id} subdirectory for dev/nightly, a stable path for
# prerelease), but MSIs may not need the dated subdirectory the way the
# Linux package repositories do; revisit whether to follow python
# packages/tarballs and use one path across all release channels instead.
base_path = "v5/rocm/core/packages"
if release_type == "prerelease":
dest_prefix = f"{base_path}/msi"
else:
dest_prefix = f"{base_path}/msi/{today}-{artifacts_root.run_id}"

dest = StorageLocation(dest_bucket.name, dest_prefix)
logger.info("Native msi packages: %s -> %s", source.s3_uri, dest.s3_uri)
count = backend.copy_directory(source, dest)
logger.info("Copied %d files for msi packages", count)
if count == 0:
raise FileNotFoundError(f"No msi packages found at {source.s3_uri}")


def main(argv: list[str]) -> None:
parser = argparse.ArgumentParser(
description="Publish ROCm release files to release buckets"
Expand Down Expand Up @@ -366,7 +318,7 @@ def main(argv: list[str]) -> None:
parser.add_argument(
"--skip-native-packages",
action="store_true",
help="Skip publishing native packages (Linux deb/rpm, Windows msi)",
help="Skip publishing native Linux packages (deb/rpm)",
)
parser.add_argument(
"--dry-run", action="store_true", help="Print plan without copying"
Expand Down Expand Up @@ -408,8 +360,6 @@ def main(argv: list[str]) -> None:
publish_native_linux_packages(
artifacts_root, args.release_type, backend, args.build_variant
)
if artifacts_root.platform == "windows" and not args.skip_native_packages:
publish_native_windows_packages(artifacts_root, args.release_type, backend)


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_dev_linux_copies_native_packages(self, mock_copy):
)

@mock.patch("_therock_utils.storage_backend.S3StorageBackend.copy_directory")
def test_windows_copies_native_msi_packages(self, mock_copy):
def test_windows_skips_native_packages(self, mock_copy):
mock_copy.return_value = 1
main(
[
Expand All @@ -146,16 +146,8 @@ def test_windows_copies_native_msi_packages(self, mock_copy):
"--dry-run",
]
)
# Calls: tarballs, python x2, msi (4 calls)
self.assertEqual(mock_copy.call_count, 4)
# msi packages are the last call
msi_source, msi_dest = mock_copy.call_args_list[3].args
self.assertEqual(msi_source.bucket, "therock-nightly-artifacts")
self.assertEqual(msi_source.relative_path, "99-windows/packages/msi")
self.assertEqual(msi_dest.bucket, "therock-repo-amd-nightly-core")
self.assertRegex(
msi_dest.relative_path, r"^v5/rocm/core/packages/msi/\d{8}-99$"
)
# Only tarballs + python x2 (3 calls) — native packages skipped for windows
self.assertEqual(mock_copy.call_count, 3)

@mock.patch("_therock_utils.storage_backend.S3StorageBackend.copy_directory")
def test_raises_when_no_tarballs_found(self, mock_copy):
Expand Down
Loading