Files
rocm-systems/.github/workflows/therock-test-packages.yml
T
Joseph Macaranas 11d9472e5f Bump TheRock SHA for CI 20251230 (#2466)
* Bump TheRock SHA for CI 20251230
* Remove patch and align workflows between OS
2026-01-05 13:00:37 -05:00

127 rader
4.8 KiB
YAML

name: TheRock Test Packages
on:
workflow_call:
inputs:
project_to_test:
type: string
amdgpu_families:
type: string
test_runs_on:
type: string
platform:
type: string
permissions:
contents: read
jobs:
configure_test_matrix:
name: "Configure test matrix"
runs-on: ubuntu-24.04
if: ${{ inputs.test_runs_on != '' }}
outputs:
components: ${{ steps.configure.outputs.components }}
steps:
- name: "Fetch 'build_tools' from repository"
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
sparse-checkout: build_tools
path: "prejob"
repository: "ROCm/TheRock"
ref: df5e21e3b8449ade0af12bcf94c0113510e97f6d # 2025-12-30 commit
# Checkout failure is possible on Windows, as it's the first job on a GPU test runner.
# Post-job cleanup isn't necessary since no executables are launched in this job.
- name: Pre-job cleanup processes on Windows
if: ${{ runner.os == 'Windows' }}
shell: powershell
run: . '${{ github.workspace }}\prejob\build_tools\github_actions\cleanup_processes.ps1'
- name: "Checking out repository"
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: "ROCm/TheRock"
ref: df5e21e3b8449ade0af12bcf94c0113510e97f6d # 2025-12-30 commit
- name: "Configuring CI options"
env:
PLATFORM: ${{ inputs.platform }}
project_to_test: ${{ inputs.project_to_test }}
id: configure
run: python ./build_tools/github_actions/fetch_test_configurations.py
test_components:
name: 'Test ${{ matrix.components.job_name }}'
runs-on: ${{ inputs.test_runs_on }}
container:
image: ${{ inputs.platform == 'linux' && 'ghcr.io/rocm/no_rocm_image_ubuntu24_04@sha256:405945a40deaff9db90b9839c0f41d4cba4a383c1a7459b28627047bf6302a26' || null }}
options: --ipc host
--group-add video
--device /dev/kfd
--device /dev/dri
--group-add 992
--env-file /etc/podinfo/gha-gpu-isolation-settings
needs: configure_test_matrix
# skip tests if no test matrix to run
if: ${{ needs.configure_test_matrix.outputs.components != '[]' }}
strategy:
fail-fast: false
matrix:
components: ${{ fromJSON(needs.configure_test_matrix.outputs.components) }}
defaults:
run:
shell: bash
env:
VENV_DIR: ${{ github.workspace }}/.venv
ARTIFACT_RUN_ID: "${{ github.run_id }}"
OUTPUT_ARTIFACTS_DIR: ${{ github.workspace }}/build
THEROCK_BIN_DIR: "./build/bin"
steps:
- name: "Fetch 'build_tools' from repository"
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
sparse-checkout: build_tools
path: "prejob"
repository: "ROCm/TheRock"
ref: df5e21e3b8449ade0af12bcf94c0113510e97f6d # 2025-12-30 commit
- name: Pre-job cleanup processes on Windows
if: ${{ runner.os == 'Windows' }}
shell: powershell
run: . '${{ github.workspace }}\prejob\build_tools\github_actions\cleanup_processes.ps1'
- name: Checkout Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: "ROCm/TheRock"
ref: df5e21e3b8449ade0af12bcf94c0113510e97f6d # 2025-12-30 commit
- name: Run setup test environment workflow
uses: './.github/actions/setup_test_environment'
with:
ARTIFACT_RUN_ID: ${{ env.ARTIFACT_RUN_ID }}
ARTIFACT_GROUP: ${{ inputs.amdgpu_families }}
OUTPUT_ARTIFACTS_DIR: ${{ env.OUTPUT_ARTIFACTS_DIR }}
VENV_DIR: ${{ env.VENV_DIR }}
FETCH_ARTIFACT_ARGS: ${{ matrix.components.fetch_artifact_args }}
PLATFORM: ${{ inputs.platform }}
IS_PR_FROM_FORK: ${{ github.event.pull_request.head.repo.fork }}
- name: Install additional packages
if: ${{ inputs.platform == 'linux' && (matrix.components.job_name == 'rocblas' || matrix.components.job_name == 'hipblaslt') }}
run: sudo apt install libgfortran5 -y
- name: Test
timeout-minutes: ${{ matrix.components.timeout_minutes }}
run: |
if [ "${{ inputs.PLATFORM }}" == "linux" ]; then source ${VENV_DIR}/bin/activate ; else . ${VENV_DIR}/Scripts/activate ; fi
${{ matrix.components.test_script }}
# GitHub's 'Complete job' step is unaware of launched executables
# and will fail to clean up orphan processes.
- name: Post-job cleanup processes on Windows
if: ${{ always() && runner.os == 'Windows' }}
shell: powershell
run: . '${{ github.workspace }}\build_tools\github_actions\cleanup_processes.ps1'