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
24 changes: 18 additions & 6 deletions .github/workflows/multi_arch_build_native_windows_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ jobs:
ROCM_VERSION: ${{ inputs.rocm_version }}
MSI_VERSION: ${{ inputs.msi_version }}
PACKAGES: ${{ inputs.packages }}
ARTIFACTS_OUTPUT_DIR: ${{ github.workspace }}/artifacts
ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/artifacts
MSI_DIR: ${{ github.workspace }}/msi-output
RELEASE_TYPE: ${{ inputs.release_type }}
steps:
Expand All @@ -128,11 +130,22 @@ jobs:
- name: Install WiX Toolset v4
run: dotnet tool install --global wix --version "4.*"

# The generator installs two driver-supplied System32 DLLs (amdhip64_6.dll,
- name: Fetch Windows artifacts
run: |
python build_tools/artifact_manager.py fetch \
--run-id="${ARTIFACT_RUN_ID}" \
--run-github-repo="${ARTIFACT_GITHUB_REPO}" \
--platform=windows \
--stage=all \
--generic-only \
--exclude-components=dbg,dev,doc,run,test \
--output-dir="${ARTIFACTS_OUTPUT_DIR}"

# The generator requires two driver-supplied System32 DLLs (amdhip64_6.dll,
# amd_comgr_2.dll) that are DVC-tracked under
# rocm-systems/shared/amdgpu-windows-interop/legacy/ rather than committed
# to git, and fails if they are missing. Initialize the rocm-systems
# submodule at this checkout's pinned commit and materialize its DVC files.
# rocm-systems/shared/amdgpu-windows-interop/legacy/. Initialize the
# rocm-systems submodule at this checkout's pinned commit and materialize
# its DVC files.
- name: Fetch rocm-systems DVC files
timeout-minutes: 10
run: |
Expand All @@ -147,8 +160,7 @@ jobs:
# knowledge of the package-to-filename mapping.
python build_tools/packaging/windows/generate_msi_wxs.py \
--packages "${PACKAGES}" \
--run-id "${ARTIFACT_RUN_ID}" \
--run-github-repo "${ARTIFACT_GITHUB_REPO}" \
--artifact-dir "${ARTIFACTS_DIR}" \
--package-version "${MSI_VERSION}" \
--display-version "${ROCM_VERSION}" \
--output-dir "${MSI_DIR}"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/multi_arch_ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ jobs:
uses: ./.github/workflows/multi_arch_build_native_windows_packages.yml
with:
artifact_run_id: ${{ github.run_id }}
artifact_github_repo: ${{ github.repository }}
rocm_version: ${{ inputs.rocm_package_version }}
msi_version: ${{ inputs.rocm_msi_package_version }}
# Only the runtime package is published in CI artifacts today; core's
Expand Down
5 changes: 4 additions & 1 deletion build_tools/github_actions/detect_external_repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
"cmake_source_var": "THEROCK_ROCM_SYSTEMS_SOURCE_DIR",
"submodule_path": "rocm-systems",
"skip_submodules": ["rocm-systems"],
"dvc_projects": ["external-rocm-systems"],
# --dvc-projects replaces fetch_sources.py's default project list rather
# than extending it, so "rocm-libraries" is listed explicitly to pull the
# rocSPARSE/hipSPARSE test matrices ClientMatrices.cmake needs.
"dvc_projects": ["external-rocm-systems", "rocm-libraries"],
},
"rocgdb": {
"cmake_source_var": "THEROCK_ROCGDB_SOURCE_DIR",
Expand Down
8 changes: 5 additions & 3 deletions build_tools/github_actions/tests/dvc_external_repo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ def test_rocm_systems_has_dvc_projects(self):
"rocm-systems config must have dvc_projects for wsl-rocdxg builds",
)

# Verify it contains external-rocm-systems
# "rocm-libraries" is required for the rocSPARSE/hipSPARSE test matrices:
# --dvc-projects replaces fetch_sources.py's default list rather than
# extending it, so dropping it breaks the math-libs stage.
self.assertEqual(
config["dvc_projects"],
["external-rocm-systems"],
"dvc_projects should contain external-rocm-systems path",
["external-rocm-systems", "rocm-libraries"],
"dvc_projects should contain external-rocm-systems and rocm-libraries",
)

def test_rocm_systems_has_all_required_keys(self):
Expand Down
24 changes: 21 additions & 3 deletions build_tools/packaging/windows/generate_msi_wxs.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,19 @@ def parse_args() -> argparse.Namespace:
action="store_true",
help="List available package names and exit.",
)
parser.add_argument(
"--artifact-dir",
type=Path,
default=None,
metavar="PATH",
help=(
"Path to a directory of already-extracted artifacts. When set, "
"the generator uses these artifacts directly and skips any fetch "
"(--run-id and --build-root are ignored). Use this when the "
"workflow fetches artifacts in a dedicated step before calling "
"the generator."
),
)
parser.add_argument(
"--run-id",
default=None,
Expand Down Expand Up @@ -753,10 +766,15 @@ class WixDocument:
def resolve_artifact_dir(args: argparse.Namespace) -> Path:
"""Return the directory of extracted artifacts for the selected source.

Fetches from the CI run when --run-id is set (once; the fetch is not
package-specific), otherwise points at the local build tree. Callers that
build several packages should resolve this once and reuse it.
Resolution order:
1. --artifact-dir: caller already fetched; use as-is (no network I/O).
2. --run-id: fetch from S3 via artifact_manager.py.
3. --build-root: local CMake build tree.

Callers that build several packages should resolve this once and reuse it.
"""
if getattr(args, "artifact_dir", None) is not None:
return args.artifact_dir
if args.run_id:
return fetch_artifacts(
run_id=args.run_id,
Expand Down
Loading