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
28 changes: 17 additions & 11 deletions .github/workflows/multi_arch_build_portable_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ on:
type: string
default: ""
description: "Comma-separated build stages to skip (artifacts already copied by the orchestrator)"
skip_stages:
type: string
default: ""
description: >-
Comma-separated build stages to drop from the graph entirely. Unlike
prebuilt_stages, no artifacts exist for these stages afterwards.
build_runs_on:
type: string
default: "aws-linux-scale-rocm-prod"
Expand Down Expand Up @@ -90,7 +96,7 @@ jobs:
# STAGE: compiler-runtime (generic)
# ==========================================================================
compiler-runtime:
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'compiler-runtime') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'compiler-runtime') && !contains(inputs.skip_stages, 'compiler-runtime') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -115,7 +121,7 @@ jobs:
# ==========================================================================
runtime-tests:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'runtime-tests') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'runtime-tests') && !contains(inputs.skip_stages, 'runtime-tests') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -140,7 +146,7 @@ jobs:
# ==========================================================================
wsl-rocdxg:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'wsl-rocdxg') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'wsl-rocdxg') && !contains(inputs.skip_stages, 'wsl-rocdxg') }}
uses: ./.github/workflows/multi_arch_build_wsl_rocdxg_artifacts.yml
secrets: inherit
with:
Expand All @@ -164,7 +170,7 @@ jobs:
# ==========================================================================
math-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'math-libs') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'math-libs') && !contains(inputs.skip_stages, 'math-libs') }}
strategy:
# `fail-fast: false` lets all families complete even if one fails.
# This is useful for CI (to see all failures at once), but for releases
Expand Down Expand Up @@ -202,7 +208,7 @@ jobs:
# ==========================================================================
comm-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'comm-libs') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'comm-libs') && !contains(inputs.skip_stages, 'comm-libs') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -229,7 +235,7 @@ jobs:
# ==========================================================================
storage-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'storage-libs') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'storage-libs') && !contains(inputs.skip_stages, 'storage-libs') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -255,7 +261,7 @@ jobs:
# ==========================================================================
debug-tools:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'debug-tools') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'debug-tools') && !contains(inputs.skip_stages, 'debug-tools') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -280,7 +286,7 @@ jobs:
# ==========================================================================
dctools-core:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'dctools-core') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'dctools-core') && !contains(inputs.skip_stages, 'dctools-core') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -305,7 +311,7 @@ jobs:
# ==========================================================================
profiler-apps:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'profiler-apps') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'profiler-apps') && !contains(inputs.skip_stages, 'profiler-apps') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -330,7 +336,7 @@ jobs:
# ==========================================================================
cv-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'cv-libs') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'cv-libs') && !contains(inputs.skip_stages, 'cv-libs') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -355,7 +361,7 @@ jobs:
# ==========================================================================
media-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'media-libs') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'media-libs') && !contains(inputs.skip_stages, 'media-libs') }}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/multi_arch_build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ on:
type: string
default: ""
description: "Comma-separated build stages to skip (artifacts already copied by the orchestrator)"
skip_stages:
type: string
default: ""
description: >-
Comma-separated build stages to drop from the graph entirely. Unlike
prebuilt_stages, no artifacts exist for these stages afterwards.
build_runs_on:
type: string
default: "azure-windows-scale-rocm"
Expand Down Expand Up @@ -90,7 +96,7 @@ jobs:
# STAGE: compiler-runtime (generic)
# ==========================================================================
compiler-runtime:
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'compiler-runtime') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'compiler-runtime') && !contains(inputs.skip_stages, 'compiler-runtime') }}
uses: ./.github/workflows/multi_arch_build_windows_artifacts.yml
secrets: inherit
with:
Expand All @@ -115,7 +121,7 @@ jobs:
# ==========================================================================
runtime-tests:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'runtime-tests') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'runtime-tests') && !contains(inputs.skip_stages, 'runtime-tests') }}
uses: ./.github/workflows/multi_arch_build_windows_artifacts.yml
secrets: inherit
with:
Expand All @@ -140,7 +146,7 @@ jobs:
# ==========================================================================
math-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'math-libs') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'math-libs') && !contains(inputs.skip_stages, 'math-libs') }}
strategy:
# `fail-fast: false` lets all families complete even if one fails.
# This is useful for CI (to see all failures at once), but for releases
Expand Down Expand Up @@ -175,7 +181,7 @@ jobs:
# ==========================================================================
debug-tools:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'debug-tools') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'debug-tools') && !contains(inputs.skip_stages, 'debug-tools') }}
uses: ./.github/workflows/multi_arch_build_windows_artifacts.yml
secrets: inherit
with:
Expand Down Expand Up @@ -203,7 +209,7 @@ jobs:
# out by configure_stage.py, so they are not built here.
media-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'media-libs') }}
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'media-libs') && !contains(inputs.skip_stages, 'media-libs') }}
uses: ./.github/workflows/multi_arch_build_windows_artifacts.yml
secrets: inherit
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/multi_arch_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ on:
type: boolean
default: true
description: "Build native Linux packages and run install tests"
build_stages:
type: string
default: ""
description: "Comma-separated allowlist of build stages (empty = build all). Stages outside this list are skipped entirely."
pull_request:
types:
- labeled
Expand Down Expand Up @@ -121,6 +125,7 @@ jobs:
build_pytorch: ${{ github.event_name != 'workflow_dispatch' || inputs.build_pytorch }}
build_jax: ${{ github.event_name != 'workflow_dispatch' || inputs.build_jax }}
build_native_linux: ${{ github.event_name != 'workflow_dispatch' || inputs.build_native_linux }}
build_stages: ${{ inputs.build_stages || '' }}
secrets: inherit

linux_build_and_test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/multi_arch_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
build_variant_cmake_preset: ${{ fromJSON(inputs.build_config).build_variant_cmake_preset }}
build_variant_suffix: ${{ fromJSON(inputs.build_config).build_variant_suffix }}
prebuilt_stages: ${{ fromJSON(inputs.build_config).prebuilt_stages }}
skip_stages: ${{ fromJSON(inputs.build_config).skip_stages }}
build_runs_on: ${{ fromJSON(inputs.build_config).build_runs_on }}
rocm_package_version: ${{ inputs.rocm_package_version }}
release_type: ${{ inputs.release_type }}
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 @@ -105,6 +105,7 @@ jobs:
build_variant_cmake_preset: ${{ fromJSON(inputs.build_config).build_variant_cmake_preset }}
build_variant_suffix: ${{ fromJSON(inputs.build_config).build_variant_suffix }}
prebuilt_stages: ${{ fromJSON(inputs.build_config).prebuilt_stages }}
skip_stages: ${{ fromJSON(inputs.build_config).skip_stages }}
build_runs_on: ${{ fromJSON(inputs.build_config).build_runs_on }}
rocm_package_version: ${{ inputs.rocm_package_version }}
release_type: ${{ inputs.release_type }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/setup_multi_arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ on:
description: "Comma-separated build stages to skip (artifacts copied from baseline_run_id instead)."
type: string
default: ""
build_stages:
description: >-
Comma-separated allowlist of build stages to run, e.g.
"compiler-runtime,runtime-tests". Every other stage is skipped
outright, with nothing built and no artifacts copied. Empty (the
default) builds every stage.
type: string
default: ""
Comment on lines +43 to +50

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's expose this to https://github.com/ROCm/TheRock/blob/main/.github/workflows/multi_arch_ci.yml for workflow_dispatch also, as that will

  1. Let us test the feature itself without needing to edit other workflows, see https://github.com/ROCm/TheRock/blob/main/TESTING.md#github-actions-workflows---validation-methods

    If a workflow does not run on pull_request events, test manually with workflow_dispatch (https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow) and link the test runs in the pull request description.

  2. Use this for https://github.com/ROCm/TheRock/blob/main/docs/development/ci_behavior_manipulation.md#workflow-dispatch. I'd like to use this to test just building compiler-runtime (or just the LLVM subproject actually, so a "build_subprojects" or "enable_subprojects" input that gets mapped to build stages and test subprojects could also be useful too)

I'm also looking over the current integration of these workflows into https://github.com/ROCm/rocm-libraries and https://github.com/ROCm/rocm-systems and I think we should consider changing https://github.com/ROCm/rocm-libraries/blob/develop/.github/workflows/therock-multi-arch-ci.yml from

jobs:
  ci-env:
     ...
  configure:
     ...
  resolve_therock_ref:
     ...
  setup:
    uses: ROCm/TheRock/.github/workflows/setup_multi_arch.yml@eb36dd0822a5e9a53c47fae4abad0b4a978fd6f5 # 08/21/2026
     ...
  linux_build_and_test:
    uses: ROCm/TheRock/.github/workflows/multi_arch_ci_linux.yml@eb36dd0822a5e9a53c47fae4abad0b4a978fd6f5 # 08/21/2026
     ...
  windows_build_and_test:
    uses: ROCm/TheRock/.github/workflows/multi_arch_ci_windows.yml@eb36dd0822a5e9a53c47fae4abad0b4a978fd6f5 # 08/21/2026
     ...
  multi_arch_ci_summary:
     ...

to:

jobs:
  multi_arch_ci:
    uses: ROCm/TheRock/.github/workflows/multi_arch_ci.yml@eb36dd0822a5e9a53c47fae4abad0b4a978fd6f5 # 08/21/2026

that would be less code to maintain in each repository, though it will require making all customized behaviors available to multi_arch_ci.yml (which will also let us centralize logging, testing, monitoring, etc.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the goal on having a singular uses call. That was my desired design for the original de-dupe effort on the legacy CI system.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

baseline_run_id:
description: "Workflow run ID to copy prebuilt stage artifacts from."
type: string
Expand Down Expand Up @@ -210,6 +218,7 @@ jobs:
LINUX_TEST_LABELS: ${{ inputs.linux_test_labels }}
WINDOWS_TEST_LABELS: ${{ inputs.windows_test_labels }}
PREBUILT_STAGES: ${{ inputs.prebuilt_stages }}
BUILD_STAGES: ${{ inputs.build_stages }}
BASELINE_RUN_ID: ${{ inputs.baseline_run_id }}
STAGE_REUSE_MODE: ${{ inputs.stage_reuse_mode }}
# The checkout commit is used for commit-compatibility checking.
Expand Down
Loading
Loading