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
9 changes: 9 additions & 0 deletions .github/workflows/ais-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
platform:
required: true
type: string
rocm_version:
description: "Target ROCm MAJOR.MINOR.PATCH Version."
required: true
type: string
permissions:
contents: read
packages: read
Expand All @@ -32,6 +36,7 @@ jobs:
with:
dockerfile_changed: ${{ needs.AIS_CI_Pre-check.outputs.changed_dockerfile == '1' }}
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
build_and_test:
# cancelled() needed. Otherwise success() implicitly added and fails if build_AIS_CI_image skipped.
if: ${{ !cancelled() && needs.build_AIS_CI_image.outputs.ci_image_build_satisfied == 'true' }}
Expand All @@ -41,6 +46,7 @@ jobs:
ci_image: ${{ needs.build_AIS_CI_image.outputs.ci_image }}
cxx_compiler: amdclang++
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
upload_artifacts: true
build_and_test_other_compilers:
# Try building on other compilers, but keep as separate job.
Expand All @@ -59,6 +65,7 @@ jobs:
ci_image: ${{ needs.build_AIS_CI_image.outputs.ci_image }}
cxx_compiler: ${{ matrix.cxx_compiler }}
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
AIS_system_tests:
# cancelled() needed. Otherwise success() implicitly added and fails if the chained
# dependency build_AIS_CI_image is skipped.
Expand All @@ -70,10 +77,12 @@ jobs:
ais_hipfile_pkg_filename: ${{ needs.build_and_test.outputs.ais_hipfile_pkg_filename }}
ci_image: ${{ needs.build_and_test.outputs.ci_image }}
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
build_and_test_Nvidia:
if: ${{ !cancelled() && needs.build_AIS_CI_image.outputs.ci_image_build_satisfied == 'true' }}
needs: [AIS_CI_Pre-check, build_AIS_CI_image]
uses: ./.github/workflows/build-ais-nvidia.yml
with:
ci_image: ${{ needs.build_AIS_CI_image.outputs.ci_image }}
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
20 changes: 13 additions & 7 deletions .github/workflows/build-ais-ci-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: new_CI_image
run-name: Build the Docker image for AIS CI.
env:
AIS_CI_IMAGE_NAME: ais_ci_${{ inputs.platform }}
AIS_DOCKER_REGISTRY: ghcr.io/rocm/hipfile
AIS_DOCKER_REGISTRY: ghcr.io/${{ github.repository }}
AIS_INPUT_ROCM_VERSION: ${{ inputs.rocm_version }}
AIS_PR_BASE_URL: https://github.com/ROCm/hipFile/pull
on:
workflow_call:
Expand All @@ -18,6 +19,10 @@ on:
platform:
required: true
type: string
rocm_version:
description: "Target ROCm MAJOR.MINOR.PATCH Version."
required: true
type: string
outputs:
ci_image:
description: |
Expand All @@ -26,7 +31,7 @@ on:
Otherwise, returns the current CI image name & tag.
value: >-
${{
jobs.build_AIS_image.result == 'skipped' && format('ghcr.io/rocm/hipfile/ais_ci_{0}:latest', inputs.platform) ||
jobs.build_AIS_image.result == 'skipped' && format('ghcr.io/{0}/ais_ci_{1}:latest-rocm{2}', github.repository, inputs.platform, inputs.rocm_version) ||
jobs.build_AIS_image.result == 'success' && jobs.build_AIS_image.outputs.new_ci_image ||
null
}}
Expand Down Expand Up @@ -59,15 +64,15 @@ jobs:
steps:
- name: Set CI environment variables
run: |
echo "AIS_CI_IMAGE_TAG=$(echo ${{ github.ref }} | sed 's|[^a-zA-Z0-9]|-|g')" >> "${GITHUB_ENV}"
echo "AIS_CI_IMAGE_TAG=$(echo ${{ github.ref }} | sed 's|[^a-zA-Z0-9]|-|g')-rocm${AIS_INPUT_ROCM_VERSION}" >> "${GITHUB_ENV}"
echo "AIS_PR_NUMBER=$(echo ${{ github.ref }} | sed 's|[^0-9]||g')" >> "${GITHUB_ENV}"
- name: Set target AIS CI Image
id: ci-image
run: |
echo "AIS_CI_IMAGE=${AIS_DOCKER_REGISTRY}/${AIS_CI_IMAGE_NAME}:${AIS_CI_IMAGE_TAG}" \
>> "${GITHUB_OUTPUT}"
echo "AIS_CI_LATEST_CACHE=${AIS_DOCKER_REGISTRY}/${AIS_CI_IMAGE_NAME}:latest-cache" \
>> "${GITHUB_OUTPUT}"
AIS_CI_IMAGE="${AIS_DOCKER_REGISTRY}/${AIS_CI_IMAGE_NAME}:${AIS_CI_IMAGE_TAG}"
echo "AIS_CI_IMAGE=$(printf '%s' ${AIS_CI_IMAGE} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_OUTPUT}"
AIS_CI_LATEST_CACHE="${AIS_DOCKER_REGISTRY}/${AIS_CI_IMAGE_NAME}:latest-rocm${AIS_INPUT_ROCM_VERSION}-cache"
echo "AIS_CI_LATEST_CACHE=$(printf '%s' ${AIS_CI_LATEST_CACHE} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_OUTPUT}"
- name: Fetching code repository...
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
- name: Authenticating to GitHub Container Registry.
Expand All @@ -91,6 +96,7 @@ jobs:
${{ github.head_ref }} for PR #${AIS_PR_NUMBER}. \
PR URL: ${AIS_PR_BASE_URL}/${AIS_PR_NUMBER}" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--build-arg ROCM_VERSION=${AIS_INPUT_ROCM_VERSION} \
--cache-from=type=registry,ref="${{ steps.ci-image.outputs.AIS_CI_IMAGE }}" \
--cache-from=type=registry,ref="${{ steps.ci-image.outputs.AIS_CI_LATEST_CACHE }}" \
--push \
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-ais-nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ run-name: Build AIS for Nvidia platforms
env:
AIS_INPUT_CI_IMAGE: ${{ inputs.ci_image }}
AIS_INPUT_PLATFORM: ${{ inputs.platform }}
AIS_INPUT_ROCM_VERSION: ${{ inputs.rocm_version }}
AIS_MOUNT_PATH: /mnt/ais/ext4
on:
workflow_call:
Expand All @@ -13,6 +14,10 @@ on:
platform:
required: true
type: string
rocm_version:
description: "Target ROCm MAJOR.MINOR.PATCH Version."
required: true
type: string
permissions:
contents: read
packages: read
Expand All @@ -34,7 +39,7 @@ jobs:
echo "AIS_SAFE_COMPILER_NAME=$(echo ${AIS_INPUT_CXX_COMPILER} | sed 's|[\+]|plus|g')" >> "${GITHUB_ENV}"
- name: Set AIS CI container name
run: |
echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER}_${{ github.job }}_${AIS_INPUT_PLATFORM}_${AIS_SAFE_COMPILER_NAME}" >> "${GITHUB_ENV}"
echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER}_${{ github.job }}_${AIS_INPUT_PLATFORM}_${AIS_INPUT_ROCM_VERSION}_${AIS_SAFE_COMPILER_NAME}" >> "${GITHUB_ENV}"
- name: Fetching code repository...
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
Expand Down
33 changes: 29 additions & 4 deletions .github/workflows/build-ais.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: build_and_test
run-name: Build, Test, and Analyze AIS
env:
AIS_GHA_CMD_FILES_DOCKER_DIR: /root/github
AIS_INPUT_BUILD_ID: ${{ inputs.build_id }}
AIS_INPUT_CI_IMAGE: ${{ inputs.ci_image }}
AIS_INPUT_CXX_COMPILER: ${{ inputs.cxx_compiler }}
AIS_INPUT_JOB_DESIGNATOR: ${{ inputs.job_designator }}
AIS_INPUT_PLATFORM: ${{ inputs.platform }}
AIS_INPUT_UPLOAD_ARTIFACTS: ${{ inputs.upload_artifacts }}
AIS_MOUNT_PATH: /mnt/ais/ext4
Expand All @@ -14,21 +16,34 @@ env:
inputs.platform == 'ubuntu' && 'apt'
}}
AIS_PKG_TYPE: ${{ inputs.platform == 'ubuntu' && 'DEB' || 'RPM' }}
AIS_ROCM_VERSION: 7.2.0
AIS_INPUT_ROCM_VERSION: ${{ inputs.rocm_version }}
# Code coverage report only vetted to work for amdclang++ on Ubuntu
AIS_USE_CODE_COVERAGE: ${{ inputs.cxx_compiler == 'amdclang++' && inputs.platform == 'ubuntu' }}
on:
workflow_call:
inputs:
build_id:
default: 9999
description: "Number assigned by the build orchestrator."
required: false
type: number
ci_image:
required: true
type: string
cxx_compiler:
required: true
type: string
job_designator:
description: "Qualifies the type of job building hipFile."
required: false
type: string
platform:
required: true
type: string
rocm_version:
description: "Target ROCm MAJOR.MINOR.PATCH Version."
required: true
type: string
upload_artifacts:
default: false
description: "Upload binaries and the build tree as artifacts to GitHub."
Expand Down Expand Up @@ -59,6 +74,13 @@ jobs:
runs-on: [ubuntu-24.04]
steps:
- name: Set early AIS CI environment variables
# ROCm Build Environment Args
# - JOB_DESIGNATOR
# - BUILD_ID
# - SLES_BUILD_ID_PREFIX (will be instead be set in SUSE based DOCKERFILE's)
# - CPACK_<TYPE>_PACKAGE_RELEASE (made up of the above)
# - ROCM_VERSION (set in DOCKERFILE)
# See: https://github.com/ROCm/ROCm/blob/8aa43d132f0d541eb5303dc532f5931cb80ad87a/tools/rocm-build/envsetup.sh#L25-L42
run: |
echo "AIS_PR_NUMBER=$(echo ${{ github.ref }} | sed 's|[^0-9]||g')" >> "${GITHUB_ENV}"
echo "AIS_GHA_CMD_FILES_DIR=${GITHUB_ENV%/*}" >> "${GITHUB_ENV}"
Expand All @@ -67,7 +89,7 @@ jobs:
# We should expect that there are multiple instances of this job with different cxx_compilers.
# On non-pull_request triggering workflows, AIS_PR_NUMBER may be empty.
run: |
echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER:=${{ github.run_id }}}_${{ github.job }}_${AIS_INPUT_PLATFORM}_${AIS_SAFE_COMPILER_NAME}" >> "${GITHUB_ENV}"
echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER:=${{ github.run_id }}}_${{ github.job }}_${AIS_INPUT_PLATFORM}_${AIS_INPUT_ROCM_VERSION}_${AIS_SAFE_COMPILER_NAME}" >> "${GITHUB_ENV}"
- name: Fetching code repository...
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
Expand Down Expand Up @@ -107,18 +129,21 @@ jobs:
run: |
docker exec \
-e "_AIS_INPUT_CXX_COMPILER=${AIS_INPUT_CXX_COMPILER}" \
-e "_AIS_ROCM_VERSION=${AIS_ROCM_VERSION}" \
-e "BUILD_ID=${AIS_INPUT_BUILD_ID}" \
-e "JOB_DESIGNATOR=${AIS_INPUT_JOB_DESIGNATOR}" \
-t \
-w /ais/hipFile/build \
"${AIS_CONTAINER_NAME}" \
/bin/bash -c '
export CPACK_DEBIAN_PACKAGE_RELEASE="${JOB_DESIGNATOR}${SLES_BUILD_ID_PREFIX}${BUILD_ID}~$(source /etc/os-release && echo ${VERSION_ID})"
export CPACK_RPM_PACKAGE_RELEASE="${JOB_DESIGNATOR}${SLES_BUILD_ID_PREFIX}${BUILD_ID}"
cmake \
-DCMAKE_CXX_COMPILER="${_AIS_INPUT_CXX_COMPILER}" \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCMAKE_HIP_PLATFORM=amd \
-DAIS_BUILD_DOCS=ON \
-DAIS_USE_CODE_COVERAGE=${{ env.AIS_USE_CODE_COVERAGE == 'true' && 'ON' || 'OFF' }} \
-DROCM_PATH="/opt/rocm-${_AIS_ROCM_VERSION}" \
-DROCM_VERSION="${ROCM_VERSION}" \
..
'
- name: Build hipFile for the AMD platform (${{ inputs.cxx_compiler }})
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/nightly-build-ais.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
platform:
required: true
type: string
rocm_version:
description: "Target ROCm MAJOR.MINOR.PATCH Version."
required: true
type: string
outputs:
ais_hipfile_pkg_dev_filename:
description: "Filename for the hipFile development DEB/RPM package."
Expand All @@ -23,6 +27,7 @@ jobs:
with:
dockerfile_changed: false
platform: ${{ inputs.platform }}
rocm_version: ${{ inputs.rocm_version }}
build_hipFile:
if: ${{ !cancelled() && needs.get_AIS_CI_image.outputs.ci_image_build_satisfied == 'true' }}
needs: [get_AIS_CI_image]
Expand All @@ -32,3 +37,4 @@ jobs:
cxx_compiler: amdclang++
platform: ${{ inputs.platform }}
upload_artifacts: true
rocm_version: ${{ inputs.rocm_version }}
7 changes: 5 additions & 2 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: nightly-release
run-name: Create a nightly release of hipFile
on:
schedule:
- cron: "0 0 * * *"
- cron: "0/10 * * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
Expand All @@ -22,9 +22,12 @@ jobs:
- rocky
- suse
- ubuntu
rocm_versions:
- 7.2.0
uses: ./.github/workflows/nightly-build-ais.yml
with:
platform: ${{ matrix.platform }}
rocm_version: ${{ matrix.rocm_versions }}
publish_release:
needs: [build_nightly_hipFile]
runs-on: [ubuntu-24.04]
Expand Down Expand Up @@ -69,7 +72,7 @@ jobs:
Nightly Build as of: $(date)

The packages contained here are not suitable for production workloads.
These packages are currently tied to the current version of our CI (7.2).
Please see the filename for which version of ROCm the hipFile package belongs to.
" \
--prerelease \
--target develop \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- rocky
- suse
- ubuntu
rocm_versions:
- 7.2.0
uses: ./.github/workflows/ais-ci.yml
with:
platform: ${{ matrix.supported_platforms }}
rocm_version: ${{ matrix.rocm_versions }}
9 changes: 7 additions & 2 deletions .github/workflows/test-ais-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ env:
AIS_INPUT_HIPFILE_PKG_FILENAME: ${{ inputs.ais_hipfile_pkg_filename }}
AIS_INPUT_CI_IMAGE: ${{ inputs.ci_image }}
AIS_INPUT_PLATFORM: ${{ inputs.platform }}
AIS_INPUT_ROCM_VERSION: ${{ inputs.rocm_version }}
AIS_MOUNT_PATH: /mnt/ais/ext4
AIS_PKG_MGR: >-
${{
Expand All @@ -28,6 +29,10 @@ on:
platform:
required: true
type: string
rocm_version:
description: "Target ROCm MAJOR.MINOR.PATCH Version."
required: true
type: string
permissions:
contents: read
packages: read
Expand All @@ -39,7 +44,7 @@ jobs:
run: echo "AIS_PR_NUMBER=$(echo ${{ github.ref }} | sed 's|[^0-9]||g')" >> "${GITHUB_ENV}"
- name: Set AIS CI container name
run: |
echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER}_${{ github.job }}_${AIS_INPUT_PLATFORM}" >> "${GITHUB_ENV}"
echo "AIS_CONTAINER_NAME=${AIS_PR_NUMBER}_${{ github.job }}_${AIS_INPUT_PLATFORM}_${AIS_INPUT_ROCM_VERSION}" >> "${GITHUB_ENV}"
- name: Fetching hipFile repository...
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
Expand Down Expand Up @@ -184,7 +189,7 @@ jobs:
-w /ais/fio/build \
"${AIS_CONTAINER_NAME}" \
/bin/bash -c '
ROCM=/opt/rocm \
ROCM=/opt/rocm-${ROCM_VERSION} \
HIPFILE=/ais/hipFile \
HIPFILELIB=${HIPFILE}/build/src/amd_detail/ \
HIP_PLATFORM=amd \
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/update-ais-ci-image.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: update_CI_image
run-name: Update latest CI image
env:
AIS_DOCKER_REGISTRY: ghcr.io/rocm/hipfile
AIS_DOCKER_REGISTRY: ghcr.io/${{ github.repository }}
on:
pull_request_target: # A.K.A. This is a privileged action. See `pull_request`.
types:
Expand Down Expand Up @@ -36,6 +36,8 @@ jobs:
- rocky
- suse
- ubuntu
rocm_versions:
- 7.2.0
steps:
- name: Fetching code repository...
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
Expand All @@ -48,8 +50,8 @@ jobs:
- name: Set target AIS CI Image
id: ci-image
run: |
echo "AIS_CI_IMAGE=${AIS_DOCKER_REGISTRY}/${AIS_CI_IMAGE_NAME}:latest" \
>> "${GITHUB_OUTPUT}"
AIS_CI_IMAGE="${AIS_DOCKER_REGISTRY}/${AIS_CI_IMAGE_NAME}:latest-rocm${{ matrix.rocm_versions }}"
echo "AIS_CI_IMAGE=$(printf '%s' AIS_CI_IMAGE | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_OUTPUT}"
- name: Set Docker Cache Instruction
id: use-cache
# If triggered by a pull_request, pull_from_cache will be null. Note
Expand All @@ -74,7 +76,8 @@ jobs:
docker buildx build \
-f "${GITHUB_WORKSPACE}/util/docker/DOCKERFILE.${AIS_CI_IMAGE_NAME}" \
--label "org.opencontainers.image.description= \
Latest AIS CI Image for ${AIS_INPUT_PLATFORM}." \
Latest AIS CI Image for ${AIS_INPUT_PLATFORM} using ROCm ${{ matrix.rocm_versions }}." \
--build-arg ROCM_VERSION=${{ matrix.rocm_versions }} \
--cache-to=type=registry,ref="${{ steps.ci-image.outputs.AIS_CI_IMAGE }}-cache" \
${{ steps.use-cache.outputs.CACHE_FROM_CMD }} \
--push \
Expand Down
Loading
Loading