Files
TheRock/rocm-systems/.github/workflows/hipfile-image-build.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

123 lines
4.9 KiB
YAML

name: new_CI_image
run-name: Build the Docker image for hipFile CI
env:
AIS_INPUT_CI_IMAGE_NAME: ${{ inputs.ci_image_name }}
AIS_INPUT_CI_IMAGE_CACHE: ${{ inputs.ci_image_cache }}
AIS_INPUT_CI_IMAGE_NAME_NVIDIA: ${{ inputs.ci_image_name_nvidia }}
AIS_INPUT_CI_IMAGE_CACHE_NVIDIA: ${{ inputs.ci_image_cache_nvidia }}
AIS_INPUT_ROCM_VERSION: ${{ inputs.rocm_version }}
AIS_INPUT_ROCM_NIGHTLY_BUILD: ${{ inputs.rocm_nightly_build }}
AIS_INPUT_PLATFORM: ${{ inputs.platform }}
# When publish_cache is set, also produce the floating registry cache.
AIS_BASE_CACHE_TO: ${{ case(inputs.publish_cache, format('--cache-to=type=registry,ref={0}', inputs.ci_image_cache), '') }}
AIS_NVIDIA_CACHE_TO: ${{ case(inputs.publish_cache, format('--cache-to=type=registry,ref={0}', inputs.ci_image_cache_nvidia), '') }}
on:
workflow_call:
inputs:
ci_image_name:
description: "Full CI image name & tag to build/push"
required: true
type: string
ci_image_cache:
description: "Full CI cache image name & tag for Docker build cache"
required: true
type: string
ci_image_name_nvidia:
description: "Full CI image name & nvidia tag to build/push"
required: true
type: string
ci_image_cache_nvidia:
description: "Full CI cache image name & nvidia tag for Docker build cache"
required: true
type: string
platform:
required: true
type: string
rocm_version:
description: "Target ROCm MAJOR.MINOR.PATCH Version"
required: true
type: string
rocm_nightly_build:
description: "Nightly build id (YYYYMMDD-<gha_run_id>); empty for non-nightly"
required: false
default: ""
type: string
publish_cache:
description: "Also push the floating registry cache (--cache-to); for nightly fallback builds only."
required: false
default: false
type: boolean
outputs:
ci_image:
description: "The full name & tag of the CI image to use."
value: ${{ inputs.ci_image_name }}
ci_image_nvidia:
description: "The full name & nvidia tag of the CI image to use."
value: ${{ inputs.ci_image_name_nvidia }}
permissions:
contents: read
packages: write
jobs:
build_AIS_image:
runs-on: [ubuntu-24.04]
container: docker:28.5
steps:
- name: Fetching code repository...
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
sparse-checkout: |
projects/hipfile
.github/workflows
- name: Authenticating to GitHub Container Registry.
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Docker Builder
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
with:
name: ais-builder
driver: docker-container
cache-binary: false # True uses the GHA Cache Backend
- name: Build base image for AIS CI
# The floating nightly cache is normally produced by
# hipfile-image-update-nightly.yml; publish_cache lets a per-PR nightly
# fallback build refresh it too (no other version should set publish_cache).
run: |
docker buildx build \
-f "${GITHUB_WORKSPACE}/projects/hipfile/util/docker/DOCKERFILE.ais_ci_${AIS_INPUT_PLATFORM}" \
--target base \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg ROCM_VERSION=${AIS_INPUT_ROCM_VERSION} \
--build-arg ROCM_NIGHTLY_BUILD=${AIS_INPUT_ROCM_NIGHTLY_BUILD} \
--cache-from=type=registry,ref="${AIS_INPUT_CI_IMAGE_NAME}" \
--cache-from=type=registry,ref="${AIS_INPUT_CI_IMAGE_CACHE}" \
${AIS_BASE_CACHE_TO} \
--push \
-t "${AIS_INPUT_CI_IMAGE_NAME}" \
"${GITHUB_WORKSPACE}/projects/hipfile/util/docker"
- name: Build NVIDIA image for AIS CI
run: |
docker buildx build \
-f "${GITHUB_WORKSPACE}/projects/hipfile/util/docker/DOCKERFILE.ais_ci_${AIS_INPUT_PLATFORM}" \
--target nvidia \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg ROCM_VERSION=${AIS_INPUT_ROCM_VERSION} \
--build-arg ROCM_NIGHTLY_BUILD=${AIS_INPUT_ROCM_NIGHTLY_BUILD} \
--cache-from=type=registry,ref="${AIS_INPUT_CI_IMAGE_NAME}" \
--cache-from=type=registry,ref="${AIS_INPUT_CI_IMAGE_NAME_NVIDIA}" \
--cache-from=type=registry,ref="${AIS_INPUT_CI_IMAGE_CACHE_NVIDIA}" \
${AIS_NVIDIA_CACHE_TO} \
--push \
-t "${AIS_INPUT_CI_IMAGE_NAME_NVIDIA}" \
"${GITHUB_WORKSPACE}/projects/hipfile/util/docker"