Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b503af0
feat(packaging): publish amdrocm-repo via workflow outputs
lsudarsh-amd Aug 11, 2026
58a3688
test(packaging): add test coverage for amdrocm-repo promotion to rele…
lsudarsh-amd Aug 12, 2026
f03e791
feat(packaging): add amdrocm-repo package for ROCm repository setup
lsudarsh-amd Aug 11, 2026
2d60e4e
docs(packaging): correct why per-profile repo packages collide
lsudarsh-amd Aug 13, 2026
de7e7b4
feat(packaging): target the RFC0012 stream repositories
lsudarsh-amd Aug 28, 2026
e112b77
feat(packaging): resolve stream parameters from the build line
lsudarsh-amd Aug 28, 2026
3d18eee
fix(packaging): enable jinja2 select_autoescape for the repo templates
lsudarsh-amd Aug 28, 2026
02cc544
Merge origin/main into shared/amdrocm-repo-publish
lsudarsh-amd Sep 15, 2026
88c8f04
Merge branch 'main' into shared/amdrocm-repo-package
nunnikri Sep 19, 2026
6ec918a
feat(packaging): name repo packages per distro and add the rc stream
lsudarsh-amd Sep 22, 2026
314da96
feat(ci): wire the amdrocm-repo package into native package CI
lsudarsh-amd Aug 11, 2026
4b5e805
feat(ci): build amdrocm-repo against the RFC0012 streams
lsudarsh-amd Aug 28, 2026
c5b094c
fix(packaging): align the repo package harness with per-stream naming
lsudarsh-amd Sep 28, 2026
b838e56
fix(packaging): only embed the pinned signing key; fix docs
lsudarsh-amd Sep 30, 2026
ba940f0
fix(ci): address review on the amdrocm-repo workflow
lsudarsh-amd Sep 30, 2026
dce4f4f
Merge remote-tracking branch 'origin/main' into shared/amdrocm-repo-p…
lsudarsh-amd Sep 30, 2026
459dcbb
Merge branch 'shared/amdrocm-repo-package' into shared/amdrocm-repo-p…
lsudarsh-amd Sep 30, 2026
a0bfec8
Merge remote-tracking branch 'origin/shared/amdrocm-repo-publish' int…
lsudarsh-amd Sep 30, 2026
f693784
fix(ci): suppress zizmor finding and grant id-token to amdrocm-repo s…
lsudarsh-amd Oct 6, 2026
80a0040
Merge remote-tracking branch 'origin/main' into shared/amdrocm-repo-p…
lsudarsh-amd Oct 7, 2026
79ad88f
Merge remote-tracking branch 'origin/shared/amdrocm-repo-package' int…
lsudarsh-amd Oct 7, 2026
f11c8d9
Merge remote-tracking branch 'origin/shared/amdrocm-repo-publish' int…
lsudarsh-amd Oct 7, 2026
c7500eb
fix(packaging): use --rocm-version as given for every stream
lsudarsh-amd Oct 13, 2026
a4189da
Merge remote-tracking branch 'origin/shared/amdrocm-repo-package' int…
lsudarsh-amd Oct 13, 2026
834c3c6
Merge remote-tracking branch 'origin/shared/amdrocm-repo-publish' int…
lsudarsh-amd Oct 13, 2026
ae70235
Merge remote-tracking branch 'origin/main' into shared/amdrocm-repo-p…
lsudarsh-amd Oct 13, 2026
65d5fe9
Merge remote-tracking branch 'origin/shared/amdrocm-repo-package' int…
lsudarsh-amd Oct 13, 2026
2d4ca70
Merge remote-tracking branch 'origin/shared/amdrocm-repo-publish' int…
lsudarsh-amd Oct 13, 2026
5700c95
Upload the repo package to amdrepos/
lsudarsh-amd Oct 14, 2026
bca691b
Skip TSAN builds and upload the repo package with the new script
lsudarsh-amd Oct 14, 2026
49fc1a4
Merge remote-tracking branch 'origin/shared/amdrocm-repo-publish' int…
lsudarsh-amd Oct 14, 2026
5a6c168
Rename the repo package folder to amd-repo-setup
lsudarsh-amd Oct 15, 2026
19bd8b3
Call the renamed upload_repo_setup_package.py
lsudarsh-amd Oct 15, 2026
1b0af2e
Merge remote-tracking branch 'origin/shared/amdrocm-repo-publish' int…
lsudarsh-amd Oct 15, 2026
3892158
Publish the repo package to v5/amd-repo-setup/
lsudarsh-amd Oct 16, 2026
c97cfd8
Build the repo package once and inspect it before upload
lsudarsh-amd Oct 16, 2026
97aff39
Merge remote-tracking branch 'origin/shared/amdrocm-repo-publish' int…
lsudarsh-amd Oct 16, 2026
e4aea6a
Move the shared workflow-output and promotion changes to a new PR
lsudarsh-amd Oct 19, 2026
6dfa00e
Drop the promotion note from the stage job comment
lsudarsh-amd Oct 19, 2026
2aed73e
Merge branch 'shared/amdrocm-repo-publish' into shared/amdrocm-repo-ci
lsudarsh-amd Oct 19, 2026
6cab81e
refactor(packaging): rename the repo package to amd-repo-setup
lsudarsh-amd Oct 19, 2026
07d9b27
Merge branch 'shared/amdrocm-repo-package' into shared/amdrocm-repo-p…
lsudarsh-amd Oct 19, 2026
56fb52e
Rename the repo package to amd-repo-setup
lsudarsh-amd Oct 19, 2026
acd3cf6
Merge branch 'shared/amdrocm-repo-publish' into shared/amdrocm-repo-ci
lsudarsh-amd Oct 19, 2026
d7ccb2a
Rename the repo package to amd-repo-setup in the workflow
lsudarsh-amd Oct 19, 2026
119adea
fix(packaging): fail fast on a missing signing key and show gpg errors
lsudarsh-amd Oct 20, 2026
605c41a
Merge branch 'shared/amdrocm-repo-package' into shared/amdrocm-repo-p…
lsudarsh-amd Oct 20, 2026
f709e51
Merge branch 'shared/amdrocm-repo-publish' into shared/amdrocm-repo-ci
lsudarsh-amd Oct 20, 2026
dc016b4
Write the uploaded package's URL to GITHUB_OUTPUT
lsudarsh-amd Oct 22, 2026
e4e5433
Merge branch 'shared/amdrocm-repo-publish' into shared/amdrocm-repo-ci
lsudarsh-amd Oct 22, 2026
98e65cc
Run the amd-repo-setup jobs on ubuntu-26.04
lsudarsh-amd Oct 22, 2026
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
204 changes: 204 additions & 0 deletions .github/workflows/multi_arch_build_native_linux_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ on:
built_packages.txt exist under the packages directory.
type: boolean
default: true
enable_repo_setup_package:
description: "Build, verify and upload the amd-repo-setup package"
type: boolean
required: false
default: false
outputs:
package_repository_url:
description: "Public repository URL for package installation"
Expand All @@ -72,6 +77,75 @@ permissions:
run-name: Build ${{ inputs.native_package_type }} packages (${{ inputs.rocm_version }}, ${{ inputs.dist_amdgpu_families }}${{ inputs.release_type && format(', {0}', inputs.release_type) || '' }})

jobs:
# Resolve the parameters used to build and upload the amd-repo-setup package:
# the OS-profile build matrix for this package type, each profile's container
# image, and the repo.amd.com stream the build line configures, with its
# tier, packages base URL, signing-key URL and build sub-folder.
#
# The build line and the stream are different vocabularies: prerelease
# configures rc. release_type stays the workflow input because it also selects
# the artifact bucket; the stream is derived from it.
resolve_repo_setup_params:
name: Resolve amd-repo-setup parameters
# nightly and prerelease are the lines that upload the package. release
# configures a stream too, but has no artifacts bucket to upload into.
# Sanitizer variants skip: the resolved repository URL serves neither ASAN
# packages (promoted under packages-asan) nor TSAN ones (not promoted).
if: inputs.enable_repo_setup_package && contains(fromJSON('["nightly", "prerelease"]'), inputs.release_type) && !contains(inputs.build_variant, 'asan') && !contains(inputs.build_variant, 'tsan')
runs-on: ${{ github.repository_owner == 'ROCm' && inputs.build_runs_on || 'ubuntu-26.04' }}
container:
image: ghcr.io/rocm/no_rocm_image_ubuntu24_04@sha256:15241d0e87bf81fe0986006ab832a36ea53a2cda0f9a31b4a5dc7826bc2396b6
# Resolves parameters only; it needs no cloud credentials.
permissions:
contents: read
env:
NATIVE_PACKAGE_TYPE: ${{ inputs.native_package_type }}
RELEASE_TYPE: ${{ inputs.release_type }}
ARTIFACT_RUN_ID: "${{ inputs.artifact_run_id != '' && inputs.artifact_run_id || github.run_id }}"
outputs:
os_profiles: ${{ steps.derive.outputs.os_profiles }}
images: ${{ steps.derive.outputs.images }}
stream: ${{ steps.derive.outputs.stream }}
tier: ${{ steps.derive.outputs.tier }}
repo_base_url: ${{ steps.derive.outputs.repo_base_url }}
gpg_key_url: ${{ steps.derive.outputs.gpg_key_url }}
repo_sub_folder: ${{ steps.derive.outputs.repo_sub_folder }}
steps:
- name: "Quartz - started - build amd-repo-setup"
continue-on-error: true
if: ${{ vars.NOTIFY_QUARTZ_ENABLED == 'true' }}
uses: ROCm/Quartz/.github/actions/notify_quartz@f386a9756620938616af0b4d5d04b24ae6e0353f # notify_quartz/v1.1.1
with:
run_phase: started
reporting_workflow: multi_arch_build_native_linux_packages.yml
workflow_inputs: ${{ toJSON(inputs) }}
gh_app_client_id: ${{ secrets.GH_APP_HAULY_CID }}
gh_app_private_key: ${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}

- name: Checking out repository
timeout-minutes: 15
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

- name: Set up Python
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'

- name: Install Python requirements
run: pip install jinja2

- name: Derive amd-repo-setup parameters
id: derive
run: |
python ./build_tools/packaging/linux/get_url_repo_params.py get-repo-setup-params \
--pkg-type "${NATIVE_PACKAGE_TYPE}" \
--release-type "${RELEASE_TYPE}" \
--run-id "${ARTIFACT_RUN_ID}"

build_native_packages:
permissions:
contents: read
Expand Down Expand Up @@ -218,3 +292,133 @@ jobs:
workflow_step_outputs: ${{ toJSON(steps) }}
gh_app_client_id: ${{ secrets.GH_APP_HAULY_CID }}
gh_app_private_key: ${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}

# Build the amd-repo-setup package for each OS profile of this package type,
# check its contents and upload it to this run's artifacts bucket, under
# amd-repo-setup/<os_profile>/.
stage_repo_setup_package:
name: Stage amd-repo-setup (${{ matrix.os_profile }})
needs: [resolve_repo_setup_params]

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.

Do we need native packages build step also in dependency?

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.

Shouldn't be needed. The package only uses the setup job's parameters, nothing from the native build, and in the release workflow publish_to_release_buckets already waits for both native package builds, which include this job.

if: inputs.enable_repo_setup_package && needs.resolve_repo_setup_params.outputs.repo_base_url != ''
strategy:
fail-fast: false
matrix:
# resolve_repo_setup_params does not run on the lines that do not upload, and a
# skipped job's outputs are empty strings, which fromJSON cannot parse.
# Fall back to an empty matrix so this job skips cleanly.
os_profile: ${{ fromJSON(needs.resolve_repo_setup_params.outputs.os_profiles || '[]') }}
runs-on: ubuntu-26.04

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.

This github-hosted runner won't be able to upload packages on PRs from forks, see #9579. I'm fixing in #9581

permissions:
contents: read
id-token: write # Authenticate to AWS to upload the amd-repo-setup package.
container:
# get_url_repo_params.py manages image references for each OS profile.
# zizmor cannot inspect the dynamically selected image.
image: ${{ fromJSON(needs.resolve_repo_setup_params.outputs.images || '{}')[matrix.os_profile] }} # zizmor: ignore[unpinned-images]
env:
ROCM_VERSION: ${{ inputs.rocm_version }}
NATIVE_PACKAGE_TYPE: ${{ inputs.native_package_type }}
RELEASE_TYPE: ${{ inputs.release_type }}
ARTIFACT_RUN_ID: "${{ inputs.artifact_run_id != '' && inputs.artifact_run_id || github.run_id }}"
OS_PROFILE: ${{ matrix.os_profile }}
STREAM: ${{ needs.resolve_repo_setup_params.outputs.stream }}
TIER: ${{ needs.resolve_repo_setup_params.outputs.tier }}
REPO_BASE_URL: ${{ needs.resolve_repo_setup_params.outputs.repo_base_url }}
GPG_KEY_URL: ${{ needs.resolve_repo_setup_params.outputs.gpg_key_url }}
REPO_SUB_FOLDER: ${{ needs.resolve_repo_setup_params.outputs.repo_sub_folder }}
steps:
- name: Checkout
timeout-minutes: 15
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || '' }}

- name: Install system prerequisites
run: |
bash build_tools/packaging/linux/setup_repo_build_deps.sh \
--os-profile "${OS_PROFILE}"

- name: Setup Python
run: |
bash build_tools/packaging/linux/setup_python_cmd.sh \
--os-profile "${OS_PROFILE}" \
--install-runtime \
--output-format github

- name: Install Python dependencies
run: |
$PYTHON_CMD -m venv /tmp/repo-venv
/tmp/repo-venv/bin/python -m pip install --upgrade pip
/tmp/repo-venv/bin/python -m pip install jinja2 boto3
echo "PYTHON_CMD=/tmp/repo-venv/bin/python" >> "$GITHUB_ENV"
# configure_aws_artifacts_credentials runs bare `python`, which these
# per-distro images do not provide. A venv always does, so putting its
# bin/ on PATH lets the credentials action run here and the package
# upload from the job that built it.
echo "/tmp/repo-venv/bin" >> "$GITHUB_PATH"

- name: Build amd-repo-setup
run: |
# The build sub-folder is empty except on a per-build stream, which is
# the only kind the builder accepts one for. The key URL is empty on an
# unsigned stream, where the builder needs none.
$PYTHON_CMD build_tools/packaging/linux/build_repo_setup_package.py \
--os-profile "${OS_PROFILE}" \
--stream "${STREAM}" \
--repo-base-url "${REPO_BASE_URL}" \
--gpg-key-url "${GPG_KEY_URL}" \
--repo-sub-folder "${REPO_SUB_FOLDER}" \
--rocm-version "${ROCM_VERSION}" \
--dest-dir repo-setup-package-out \
--verify-repo-url

# Check the package before it is uploaded: the repository file for this
# stream (and, on a signed stream, the key) at the expected paths, nothing
# it must not ship, and everything owned by root.
- name: Inspect amd-repo-setup
run: |
$PYTHON_CMD build_tools/packaging/linux/inspect_repo_setup_package.py \
--package-dir repo-setup-package-out \
--os-profile "${OS_PROFILE}" \
--stream "${STREAM}"

# Configured after the build so the key fetch, the repository check and
# the package build run without artifacts-bucket credentials.
- name: Configure AWS credentials for artifact uploads
uses: ./.github/actions/configure_aws_artifacts_credentials
with:
release_type: ${{ inputs.release_type }}

- name: Upload amd-repo-setup
id: upload-repo-setup-package
run: |
$PYTHON_CMD build_tools/packaging/linux/upload_repo_setup_package.py \
--dest-dir repo-setup-package-out \
--tier "${TIER}" \
--run-id "${ARTIFACT_RUN_ID}" \
--os-profile "${OS_PROFILE}" \
--pkg-type "${NATIVE_PACKAGE_TYPE}"

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.

No quartz integration for repo package creation

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.

Done, I've added Quartz integration. The setup job reports the start, and a new job reports completion, the same way test_native_linux_packages_install.yml does. These reports land on the same Quartz record as that of the build job, since Quartz keys on the run and the workflow file.


# Report the amd-repo-setup jobs' result to Quartz. resolve_repo_setup_params reports
# their start, so this runs only when that job ran.
notify_quartz_completed:
name: "Quartz - completed - build amd-repo-setup"
if: ${{ always() && vars.NOTIFY_QUARTZ_ENABLED == 'true' && needs.resolve_repo_setup_params.result != 'skipped' }}
needs: [resolve_repo_setup_params, stage_repo_setup_package]
runs-on: ubuntu-26.04
timeout-minutes: 10
continue-on-error: true
permissions:
contents: read
steps:
- name: "Quartz - completed - build amd-repo-setup"
uses: ROCm/Quartz/.github/actions/notify_quartz@f386a9756620938616af0b4d5d04b24ae6e0353f # notify_quartz/v1.1.1
with:
run_phase: completed
reporting_workflow: multi_arch_build_native_linux_packages.yml
workflow_inputs: ${{ toJSON(inputs) }}
workflow_captured_outputs: ${{ toJSON(needs) }}
gh_app_client_id: ${{ secrets.GH_APP_HAULY_CID }}
gh_app_private_key: ${{ secrets.GH_APP_HAULY_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
rev: v1.5.5
hooks:
- id: forbid-tabs
exclude: ".gitmodules|patches/.*|docs/development/git_chores.md|build_tools/packaging/linux/template/debian_rules.j2|third-party/sysdeps/linux/libdrm/patch_source.sh"
exclude: ".gitmodules|patches/.*|docs/development/git_chores.md|build_tools/packaging/linux/template/debian_rules.j2|build_tools/packaging/linux/template/repo/deb/rules.j2|third-party/sysdeps/linux/libdrm/patch_source.sh"

- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
Expand Down
1 change: 0 additions & 1 deletion build_tools/.gitignore

This file was deleted.

Loading
Loading