CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
179 lines
7.0 KiB
YAML
179 lines
7.0 KiB
YAML
# Copyright Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
name: Build Windows Python Packages
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
artifact_github_repo:
|
|
description: "GitHub repository for artifact_run_id"
|
|
type: string
|
|
default: ROCm/TheRock
|
|
artifact_run_id:
|
|
description: "artifact_run_id to download artifacts from"
|
|
type: string
|
|
default: "17865324892" # TODO: default to the most recent successful run (using a script)
|
|
artifact_group:
|
|
description: "artifact_group to build (e.g. 'gfx94X-dcgpu' for single family builds, 'multi-arch-release' for multi-arch builds with 'amdgpu_families' set)"
|
|
type: string
|
|
amdgpu_families:
|
|
description: "amdgpu_families for multi-arch builds as a semicolon-separated list (e.g. 'gfx94X-dcgpu;gfx120X-all'). Leave empty for single-family builds (those only use artifact_group)"
|
|
type: string
|
|
default: ""
|
|
linux_amdgpu_families:
|
|
description: "Linux side of the cross-platform family pair for multi-arch builds; used to advertise the union of device extras in the rocm sdist. Leave empty for single-platform builds."
|
|
type: string
|
|
default: ""
|
|
windows_amdgpu_families:
|
|
description: "Windows side of the cross-platform family pair. See linux_amdgpu_families."
|
|
type: string
|
|
default: ""
|
|
multiarch_index:
|
|
description: "Enable multi-arch indexing (generates per-family indexes)"
|
|
type: boolean
|
|
default: false
|
|
package_version:
|
|
description: "package_version to set on packages, e.g. '7.13.0.dev0+dbd7369489260265fc6ddfc9d0de1262a95fe974'"
|
|
type: string
|
|
release_type:
|
|
description: 'Release type: "ci" for CI, or "dev", "nightly", "prerelease".'
|
|
type: string
|
|
default: ""
|
|
repository:
|
|
description: "Repository to checkout. Defaults to github.repository."
|
|
type: string
|
|
default: ""
|
|
ref:
|
|
description: "Branch, tag, or SHA to checkout. Defaults to the triggering ref."
|
|
type: string
|
|
default: ""
|
|
workflow_call:
|
|
inputs:
|
|
artifact_github_repo:
|
|
type: string
|
|
artifact_run_id:
|
|
type: string
|
|
default: ""
|
|
artifact_group:
|
|
type: string
|
|
amdgpu_families:
|
|
type: string
|
|
default: ""
|
|
linux_amdgpu_families:
|
|
type: string
|
|
default: ""
|
|
windows_amdgpu_families:
|
|
type: string
|
|
default: ""
|
|
multiarch_index:
|
|
type: boolean
|
|
default: false
|
|
package_version:
|
|
type: string
|
|
release_type:
|
|
type: string
|
|
default: ci
|
|
repository:
|
|
description: "Repository to checkout. Defaults to github.repository."
|
|
type: string
|
|
default: ""
|
|
ref:
|
|
description: "Branch, tag, or SHA to checkout. Defaults to the triggering ref."
|
|
type: string
|
|
default: ""
|
|
outputs:
|
|
package_find_links_url:
|
|
description: URL for pip --find-links to install built packages
|
|
value: ${{ jobs.build_rocm_wheels.outputs.package_find_links_url }}
|
|
kpack_split:
|
|
description: "true if this is a kpack-split flat build, false for legacy per-family"
|
|
value: ${{ jobs.build_rocm_wheels.outputs.kpack_split }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
run-name: Build Windows Python Packages (${{ inputs.artifact_group }}, ${{ inputs.package_version }})
|
|
|
|
jobs:
|
|
build_rocm_wheels:
|
|
name: Build Python | ${{ inputs.artifact_group }}
|
|
runs-on: ${{ github.repository_owner == 'ROCm' && 'azure-windows-scale-rocm' || 'windows-2022' }}
|
|
permissions:
|
|
id-token: write
|
|
outputs:
|
|
package_find_links_url: ${{ steps.upload.outputs.package_find_links_url }}
|
|
kpack_split: ${{ steps.upload.outputs.kpack_split }}
|
|
env:
|
|
ARTIFACT_RUN_ID: "${{ inputs.artifact_run_id != '' && inputs.artifact_run_id || github.run_id }}"
|
|
ARTIFACTS_DIR: "${{ github.workspace }}/artifacts"
|
|
PACKAGES_DIR: "${{ github.workspace }}/packages"
|
|
RELEASE_TYPE: ${{ inputs.release_type }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
repository: ${{ inputs.repository || github.repository }}
|
|
ref: ${{ inputs.ref }}
|
|
|
|
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install Python requirements
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Fetch artifacts
|
|
run: |
|
|
if [ -n "${{ inputs.amdgpu_families }}" ]; then
|
|
# Multi-arch mode: use artifact_manager.py to fetch all families
|
|
echo "Fetching artifacts for multiple families: ${{ inputs.amdgpu_families }}"
|
|
python ./build_tools/artifact_manager.py fetch \
|
|
--run-id="${{ env.ARTIFACT_RUN_ID }}" \
|
|
--run-github-repo="${{ inputs.artifact_github_repo }}" \
|
|
--stage=all \
|
|
--amdgpu-families="${{ inputs.amdgpu_families }}" \
|
|
--expand-family-to-targets \
|
|
--output-dir="${{ github.workspace }}"
|
|
# NOTE: artifact_manager.py appends /artifacts to --output-dir
|
|
# in non-flatten mode, so pass workspace root here so that
|
|
# artifacts land in ARTIFACTS_DIR ($workspace/artifacts).
|
|
else
|
|
# Single-family mode: use fetch_artifacts.py (backward compatible)
|
|
echo "Fetching artifacts for single family: ${{ inputs.artifact_group }}"
|
|
python ./build_tools/fetch_artifacts.py \
|
|
--run-github-repo="${{ inputs.artifact_github_repo }}" \
|
|
--run-id="${{ env.ARTIFACT_RUN_ID }}" \
|
|
--artifact-group="${{ inputs.artifact_group }}" \
|
|
--output-dir="${{ env.ARTIFACTS_DIR }}"
|
|
fi
|
|
|
|
- name: Build Python packages
|
|
run: |
|
|
python ./build_tools/build_python_packages.py \
|
|
--artifact-dir="${{ env.ARTIFACTS_DIR }}" \
|
|
--dest-dir="${{ env.PACKAGES_DIR }}" \
|
|
--version="${{ inputs.package_version }}" \
|
|
--linux-amdgpu-families="${{ inputs.linux_amdgpu_families }}" \
|
|
--windows-amdgpu-families="${{ inputs.windows_amdgpu_families }}"
|
|
|
|
- name: Configure AWS Credentials
|
|
uses: ./.github/actions/configure_aws_artifacts_credentials
|
|
with:
|
|
release_type: ${{ inputs.release_type }}
|
|
|
|
# NOTE: we use `github.run_id` and NOT `env.ARTIFACT_RUN_ID` here!
|
|
# This ensures that if they are different we _download_ artifacts from the
|
|
# input run's subdirectory and _upload_ to our current run's subdirectory.
|
|
- name: Upload Python packages
|
|
id: upload
|
|
run: |
|
|
python build_tools/github_actions/upload_python_packages.py \
|
|
--input-packages-dir="${{ env.PACKAGES_DIR }}" \
|
|
--artifact-group="${{ inputs.artifact_group }}" \
|
|
--run-id="${{ github.run_id }}" \
|
|
${{ inputs.multiarch_index && '--multiarch' || '' }}
|