Skip to content
10 changes: 2 additions & 8 deletions .github/workflows/therock-ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
name: TheRock CI for rocgdb

# Temporarily disabled: using multi-arch CI only (therock-multi-arch-ci.yml).
# Re-enable by restoring push/pull_request triggers.
on:
push:
branches:
- amd-staging
- amd-staging-rocgdb-*
pull_request:
branches:
- amd-staging
- amd-staging-rocgdb-*
workflow_dispatch:

permissions:
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/therock-multi-arch-ci-asan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Copyright Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT

# Multi-Arch CI Host ASAN for rocgdb
#
# This workflow runs host Address Sanitizer (ASAN) builds and tests
# using TheRock's multi-arch CI pipeline.

name: TheRock Multi-Arch CI ASAN

on:
push:
branches:
- amd-staging
- amd-staging-rocgdb-*
pull_request:
types: [labeled]
workflow_dispatch:
inputs:
linux_amdgpu_families:
type: string
description: "Insert comma-separated list of Linux GPU families to build and test. ex: gfx94X, gfx120X"
default: ""
linux_test_labels:
type: string
description: "If enabled, reduce test set on Linux to the list of labels prefixed with 'test:'. ex: test:rocgdb"
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:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
setup:
if: >-
${{
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:multi-arch-asan')
}}
uses: ROCm/TheRock/.github/workflows/setup_multi_arch.yml@97f6cb5db25304b4c74f80fa273e9f1a271c58e3 # users/lumachad/rocgdb/multi-arch-ci
with:
build_variant: "host-asan"
# targets gfx94X and gfx950 are selected to replicate the ASAN coverage in TheRock
# as ASAN builds and tests require more resources, we only target these two architectures for the time being.
linux_amdgpu_families: ${{ inputs.linux_amdgpu_families || 'gfx94X,gfx950' }}
linux_test_labels: ${{ inputs.linux_test_labels || '' }}
prebuilt_stages: ${{ inputs.prebuilt_stages || '' }}
baseline_run_id: ${{ inputs.baseline_run_id || '' }}
repository: ROCm/TheRock
ref: "97f6cb5db25304b4c74f80fa273e9f1a271c58e3" # users/lumachad/rocgdb/multi-arch-ci
external_repo: '{"repository":"${{ github.repository }}","ref":"${{ github.sha }}","extra_cmake_options":"-DTHEROCK_USE_EXTERNAL_ROCGDB=ON","skip_packaging":true}'

linux_build_and_test:
name: Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }}
needs: setup
if: >-
${{
needs.setup.outputs.linux_build_config != '' &&
needs.setup.outputs.enable_build_jobs == 'true'
}}
uses: ROCm/TheRock/.github/workflows/multi_arch_ci_linux.yml@97f6cb5db25304b4c74f80fa273e9f1a271c58e3 # users/lumachad/rocgdb/multi-arch-ci
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 }}
changed_projects: "rocgdb"
repository: ROCm/TheRock
ref: "97f6cb5db25304b4c74f80fa273e9f1a271c58e3" # users/lumachad/rocgdb/multi-arch-ci
permissions:
contents: read
id-token: write

multi_arch_ci_summary:
name: Multi-Arch CI Summary
# always() is needed to show the job statuses regardless of failure
if: always()
needs:
- setup
- linux_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: "97f6cb5db25304b4c74f80fa273e9f1a271c58e3" # users/lumachad/rocgdb/multi-arch-ci
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) }}'
37 changes: 37 additions & 0 deletions .github/workflows/therock-multi-arch-ci-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT

# Nightly trigger for Multi-Arch CI
#
# This workflow triggers therock-multi-arch-ci.yml via workflow_dispatch
# with specific GPU families. This is needed because TheRock's setup_multi_arch
# workflow runs all families when triggered by schedule, ignoring inputs.
# By using workflow_dispatch, TheRock respects our specified families.

name: TheRock Multi-Arch CI Nightly Trigger

on:
schedule:
- cron: "0 7 * * *" # Runs nightly at 7 AM UTC
pull_request:
types: [labeled]

permissions:
actions: write
contents: read

jobs:
multi-arch-ci-nightly-trigger:
if: >-
${{
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:multi-arch-nightly')
}}
runs-on: ubuntu-latest
steps:
- name: Trigger Multi-Arch CI with specific GPU families
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4
with:
workflow: therock-multi-arch-ci.yml
ref: ${{ github.event_name == 'pull_request' && github.head_ref || 'amd-staging' }}
inputs: '{ "linux_amdgpu_families": "gfx94X,gfx950" }'
112 changes: 112 additions & 0 deletions .github/workflows/therock-multi-arch-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Copyright Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT

# Multi-Arch CI for rocgdb
#
# 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

name: TheRock Multi-Arch CI

on:
pull_request:
types: [labeled]
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:rocgdb"
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:
setup:
if: >-
${{
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:multi-arch')
}}
uses: ROCm/TheRock/.github/workflows/setup_multi_arch.yml@97f6cb5db25304b4c74f80fa273e9f1a271c58e3
with:
build_variant: "release"
linux_amdgpu_families: ${{ inputs.linux_amdgpu_families || 'gfx94X,gfx950' }}
linux_test_labels: ${{ inputs.linux_test_labels || '' }}
prebuilt_stages: ${{ inputs.prebuilt_stages || '' }}
baseline_run_id: ${{ inputs.baseline_run_id || '' }}
repository: ROCm/TheRock
ref: "97f6cb5db25304b4c74f80fa273e9f1a271c58e3" # users/lumachad/rocgdb/multi-arch-ci
external_repo: '{"repository":"${{ github.repository }}","ref":"${{ github.sha }}","extra_cmake_options":"-DTHEROCK_USE_EXTERNAL_ROCGDB=ON","skip_packaging":true}'

linux_build_and_test:
name: Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }}
needs: setup
if: >-
${{
needs.setup.outputs.linux_build_config != '' &&
needs.setup.outputs.enable_build_jobs == 'true'
}}
uses: ROCm/TheRock/.github/workflows/multi_arch_ci_linux.yml@97f6cb5db25304b4c74f80fa273e9f1a271c58e3
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 }}
changed_projects: "rocgdb"
repository: ROCm/TheRock
ref: "97f6cb5db25304b4c74f80fa273e9f1a271c58e3" # users/lumachad/rocgdb/multi-arch-ci
permissions:
contents: read
id-token: write

multi_arch_ci_summary:
name: Multi-Arch CI Summary
if: always()
needs:
- setup
- linux_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: "97f6cb5db25304b4c74f80fa273e9f1a271c58e3" # users/lumachad/rocgdb/multi-arch-ci
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) }}'
Loading