Files
TheRock/rocm-systems/.github/workflows/therock-multi-arch-ci.yml
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

209 lines
8.5 KiB
YAML

# Copyright Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT
# Multi-Arch CI for rocm-systems
#
# This workflow replicates TheRock's multi-arch CI pipeline by calling
# TheRock's reusable workflows directly. It provides sharded, multi-stage
# builds with per-architecture testing.
#
# Key differences from therock-ci.yml:
# - Uses TheRock's multi-arch sharded build pipeline (foundation -> compiler-runtime -> math-libs)
# - Supports prebuilt stages to skip certain build stages
# - Better parallelization across GPU architectures
# TheRock ref: using main until full migration, then switch to pinned SHA (TheRock#3343)
# NOTE: update all `@<ref>` refs and `ref:` inputs together when switching
# =============================================================================
# TEMPORARY: MI455 (gfx125X) bringup configuration
# TODO(geomin12): Remove this block once MI455 is fully enabled in therock-ci-config
#
# The gfx125x_family_overrides JSON configures MI455-specific test settings:
# - test-runs-on: Custom runner label for MI455 hardware
# - test_labels_for_family: Limit tests to hip-tests, rocrtst (sanity always runs)
# - Container options with ulimit for RCCL compatibility
# =============================================================================
name: TheRock Multi-Arch CI
on:
workflow_dispatch:
inputs:
linux_amdgpu_families:
type: string
description: "Insert comma-separated list of Linux GPU families to build and test. ex: gfx94X, gfx120X (empty = skip linux)"
default: ""
linux_test_labels:
type: string
description: "If enabled, reduce test set on Linux to the list of labels prefixed with 'test:'. ex: test:rocprim, test:hipcub"
default: ""
windows_amdgpu_families:
type: string
description: "Insert comma-separated list of Windows GPU families to build and test. ex: gfx94X, gfx120X (empty = skip windows)"
default: ""
windows_test_labels:
type: string
description: "If enabled, reduce test set on Windows to the list of labels prefixed with 'test:' ex: test:rocprim, test:hipcub"
default: ""
prebuilt_stages:
type: string
default: ""
description: "Comma-separated build stages to skip (or 'all' for all stages); artifacts are copied from baseline_run_id instead"
baseline_run_id:
type: string
default: ""
description: "Workflow run ID to copy prebuilt stage artifacts from; required when prebuilt_stages is set"
permissions:
contents: read
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit). The workflow name is prepended to avoid conflicts between
# different workflows.
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
configure:
name: Configure Changed Projects
runs-on: ubuntu-24.04
outputs:
changed_projects: ${{ steps.configure.outputs.changed_projects }}
run_all_tests: ${{ steps.configure.outputs.run_all_tests }}
skip_tests: ${{ steps.configure.outputs.skip_tests }}
steps:
- name: Checkout repository config
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: .github/repos-config.json
sparse-checkout-cone-mode: false
- name: Checkout TheRock for configure script
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ROCm/TheRock
ref: main
path: _therock
sparse-checkout: build_tools/github_actions
sparse-checkout-cone-mode: true
- name: Configure CI
id: configure
run: |
python3 _therock/build_tools/github_actions/configure_external_repo_ci.py \
--event-name "${{ github.event_name }}" \
--github-repo "${{ github.repository }}" \
--base-sha "${{ github.event.pull_request.base.sha }}" \
--head-sha "${{ github.event.pull_request.head.sha }}" \
--config-path ".github/repos-config.json"
setup:
needs: configure
uses: ROCm/TheRock/.github/workflows/setup_multi_arch.yml@main
with:
build_variant: "release"
# Limit GPU families for rocm-systems CI
# Note: gfx125X is added for MI455 bringup with limited tests (hip-tests, rocrtst, sanity)
linux_amdgpu_families: ${{ inputs.linux_amdgpu_families || 'gfx94X,gfx950,gfx125X' }}
windows_amdgpu_families: ${{ inputs.windows_amdgpu_families || 'gfx1151' }}
linux_test_labels: ${{ inputs.linux_test_labels || '' }}
windows_test_labels: ${{ inputs.windows_test_labels || '' }}
prebuilt_stages: ${{ inputs.prebuilt_stages || '' }}
baseline_run_id: ${{ inputs.baseline_run_id || '' }}
repository: ROCm/TheRock
ref: main
# TEMPORARY: MI455 bringup - pass family_overrides to configure test runner and limited tests
# TODO(geomin12): Remove family_overrides once MI455 is in therock-ci-config
# NOTE: MI455 machine is down - test-runs-on set to "" until back online (was: linux-mi455-gpu-rocm)
external_repo: >-
{
"repository": "${{ github.repository }}",
"ref": "${{ github.sha }}",
"family_overrides": {
"gfx125x": {
"linux": {
"test-runs-on": "",
"test_labels_for_family": ["test:hip-tests", "test:rocrtst"],
"fetch-gfx-targets": ["gfx1250"]
}
}
}
}
linux_build_and_test:
name: Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }}
needs: [configure, setup]
if: >-
${{
needs.setup.outputs.linux_build_config != '' &&
needs.setup.outputs.enable_build_jobs == 'true' &&
needs.configure.outputs.skip_tests != 'true'
}}
uses: ROCm/TheRock/.github/workflows/multi_arch_ci_linux.yml@main
secrets: inherit
with:
build_config: ${{ needs.setup.outputs.linux_build_config }}
test_labels: ${{ needs.setup.outputs.linux_test_labels }}
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
test_type: ${{ needs.setup.outputs.test_type }}
external_repo_config: ${{ needs.setup.outputs.external_repo_config }}
# Empty string when run_all_tests=true triggers full test run in downstream workflow
changed_projects: ${{ needs.configure.outputs.run_all_tests == 'true' && '' || needs.configure.outputs.changed_projects }}
repository: ROCm/TheRock
ref: main
permissions:
contents: read
id-token: write
windows_build_and_test:
name: Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }}
needs: [configure, setup]
if: >-
${{
needs.setup.outputs.windows_build_config != '' &&
needs.setup.outputs.enable_build_jobs == 'true' &&
needs.configure.outputs.skip_tests != 'true'
}}
uses: ROCm/TheRock/.github/workflows/multi_arch_ci_windows.yml@main
secrets: inherit
with:
build_config: ${{ needs.setup.outputs.windows_build_config }}
test_labels: ${{ needs.setup.outputs.windows_test_labels }}
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
test_type: ${{ needs.setup.outputs.test_type }}
external_repo_config: ${{ needs.setup.outputs.external_repo_config }}
# Empty string when run_all_tests=true triggers full test run in downstream workflow
changed_projects: ${{ needs.configure.outputs.run_all_tests == 'true' && '' || needs.configure.outputs.changed_projects }}
repository: ROCm/TheRock
ref: main
permissions:
contents: read
id-token: write
multi_arch_ci_summary:
name: Multi-Arch CI Summary
if: always()
needs:
- setup
- linux_build_and_test
- windows_build_and_test
runs-on: ubuntu-24.04
steps:
- name: Checkout TheRock repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: "ROCm/TheRock"
ref: main
sparse-checkout: build_tools/github_actions
sparse-checkout-cone-mode: true
- name: Evaluate workflow results
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
python build_tools/github_actions/workflow_summary.py \
--needs-json '${{ toJSON(needs) }}'