Skip to content
Closed
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
88 changes: 78 additions & 10 deletions .github/workflows/multi_arch_build_portable_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ on:
description: "JSON config for external repo checkout (repository, ref, checkout_path, source_package, fetch_sources_args)"
type: string
default: ""
projects:
description: "Space-separated list of specific projects to build (e.g., 'rocblas miopen'). For external repo builds to enable only touched projects."
type: string
default: ""
affected_stages:
description: "Comma-separated list of build stages to run, or 'all' for full build. Stages not listed will be skipped."
type: string
default: "all"

permissions:
contents: read
Expand All @@ -70,7 +78,12 @@ 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') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'compiler-runtime'))
}}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -85,6 +98,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -94,7 +108,12 @@ jobs:
# ==========================================================================
runtime-tests:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'runtime-tests') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'runtime-tests') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'runtime-tests'))
}}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -109,6 +128,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -118,7 +138,12 @@ jobs:
# ==========================================================================
wsl-rocdxg:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'wsl-rocdxg') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'wsl-rocdxg') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'wsl-rocdxg'))
}}
uses: ./.github/workflows/multi_arch_build_wsl_rocdxg_artifacts.yml
secrets: inherit
with:
Expand All @@ -132,6 +157,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -141,7 +167,12 @@ jobs:
# ==========================================================================
math-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'math-libs') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'math-libs') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_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 All @@ -166,6 +197,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -178,7 +210,12 @@ jobs:
# ==========================================================================
comm-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'comm-libs') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'comm-libs') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'comm-libs'))
}}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -194,6 +231,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -204,7 +242,12 @@ jobs:
# ==========================================================================
storage-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'storage-libs') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'storage-libs') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'storage-libs'))
}}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -220,6 +263,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -229,7 +273,12 @@ jobs:
# ==========================================================================
debug-tools:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'debug-tools') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'debug-tools') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'debug-tools'))
}}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -244,6 +293,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -253,7 +303,12 @@ jobs:
# ==========================================================================
dctools-core:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'dctools-core') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'dctools-core') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'dctools-core'))
}}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -268,6 +323,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -277,7 +333,12 @@ jobs:
# ==========================================================================
profiler-apps:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'profiler-apps') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'profiler-apps') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'profiler-apps'))
}}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -292,6 +353,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -301,7 +363,12 @@ jobs:
# ==========================================================================
media-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'media-libs') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'media-libs') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'media-libs'))
}}
uses: ./.github/workflows/multi_arch_build_portable_linux_artifacts.yml
secrets: inherit
with:
Expand All @@ -316,6 +383,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
13 changes: 12 additions & 1 deletion .github/workflows/multi_arch_build_portable_linux_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ on:
description: "JSON config for external repo checkout (generated by detect_external_repo_config.py)"
type: string
default: ""
projects:
description: "Space-separated list of specific projects to build (e.g., 'rocblas miopen'). For external repo builds to enable only touched projects."
type: string
default: ""

jobs:
build_stage:
Expand Down Expand Up @@ -142,13 +146,20 @@ jobs:

- name: Get stage configuration
id: stage_config
env:
PROJECTS: ${{ inputs.projects }}
run: |
PROJECTS_ARG=""
if [[ -n "${PROJECTS}" ]]; then
PROJECTS_ARG="--projects ${PROJECTS}"
fi
Comment on lines 151 to +155

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.

${{ inputs.projects }} expanded straight into the shell is the Actions injection footgun. Passing it through env: keeps it as a plain variable. The unquoted ${PROJECTS} on the args line still word-splits into multiple --projects values, so behavior is unchanged.

Suggested change
run: |
PROJECTS_ARG=""
if [[ -n "${{ inputs.projects }}" ]]; then
PROJECTS_ARG="--projects ${{ inputs.projects }}"
fi
env:
PROJECTS: ${{ inputs.projects }}
run: |
PROJECTS_ARG=""
if [[ -n "${PROJECTS}" ]]; then
PROJECTS_ARG="--projects ${PROJECTS}"
fi

python build_tools/configure_stage.py \
--stage="${STAGE_NAME}" \
--amdgpu-families="${{ inputs.amdgpu_family }}" \
--dist-amdgpu-families="${{ inputs.dist_amdgpu_families }}" \
--manylinux \
--gha-output
--gha-output \
${PROJECTS_ARG}

- name: Install stage python deps
if: ${{ steps.stage_config.outputs.pip_install_cmd }}
Expand Down
40 changes: 36 additions & 4 deletions .github/workflows/multi_arch_build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ on:
description: "JSON config for external repo checkout (repository, ref, checkout_path, source_package)"
type: string
default: ""
projects:
description: "Space-separated list of specific projects to build (e.g., 'rocblas miopen'). For external repo builds to enable only touched projects."
type: string
default: ""
affected_stages:
description: "Comma-separated list of build stages to run, or 'all' for full build. Stages not listed will be skipped."
type: string
default: "all"

permissions:
contents: read
Expand All @@ -68,7 +76,12 @@ 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') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'compiler-runtime'))
}}
uses: ./.github/workflows/multi_arch_build_windows_artifacts.yml
secrets: inherit
with:
Expand All @@ -83,6 +96,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -92,7 +106,12 @@ jobs:
# ==========================================================================
runtime-tests:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'runtime-tests') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'runtime-tests') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'runtime-tests'))
}}
uses: ./.github/workflows/multi_arch_build_windows_artifacts.yml
secrets: inherit
with:
Expand All @@ -107,6 +126,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -116,7 +136,12 @@ jobs:
# ==========================================================================
math-libs:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'math-libs') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'math-libs') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_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 All @@ -141,6 +166,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Expand All @@ -150,7 +176,12 @@ jobs:
# ==========================================================================
debug-tools:
needs: compiler-runtime
if: ${{ !cancelled() && !failure() && !contains(inputs.prebuilt_stages, 'debug-tools') }}
if: >-
${{
!cancelled() && !failure() &&
!contains(inputs.prebuilt_stages, 'debug-tools') &&
(inputs.affected_stages == 'all' || contains(inputs.affected_stages, 'debug-tools'))
}}
uses: ./.github/workflows/multi_arch_build_windows_artifacts.yml
secrets: inherit
with:
Expand All @@ -165,6 +196,7 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
external_repo_config: ${{ inputs.external_repo_config }}
projects: ${{ inputs.projects }}
permissions:
contents: read
id-token: write
Loading
Loading