Fichiers
rocm-systems/.github/workflows/therock-test-packages.yml
T
Geo Min b0a9a2386f [ci] Adding TheRock CI coverage for rocm-core (#868)
* TheRock CI points to rocm systems

* Fixing depth

* Fixing cache path

* Adding core components

* Adding more packages

* try this for windows building

* Add math libs

* Adding core only

* Attempt with no ccache

* adding patching

* Adding ls test

* adding this

* removing ls test

* changing dir name

* Adding cleanup for patch

* Adding ref

* adding correct no include

* Adding new temp branch for testing

* empty commit

* empty commit

* Adding commit hash bump

* Adding new hash for removed patches

* Adding TheRock submodule bump

* trying with compiler removed test

* Try dvc pull windows

* Update .github/workflows/therock-ci-linux.yml

Co-authored-by: Marius Brehler <marius.brehler@gmail.com>

* Adding correct env

* revert to ../

* Adding path

* try new var

* Adding new branch

* Adding correct hash

* Update .github/workflows/therock-ci-linux.yml

Co-authored-by: Marius Brehler <marius.brehler@gmail.com>

* Update .github/workflows/therock-ci-windows.yml

Co-authored-by: Marius Brehler <marius.brehler@gmail.com>

---------

Co-authored-by: Marius Brehler <marius.brehler@gmail.com>
2025-09-30 16:08:50 -07:00

123 lignes
4.5 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: build_tools
path: "prejob"
repository: "ROCm/TheRock"
# 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: "ROCm/TheRock"
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
sparse-checkout: build_tools
path: "prejob"
repository: "ROCm/TheRock"
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: "ROCm/TheRock"
- name: Run setup test environment workflow
uses: './.github/actions/setup_test_environment'
with:
ARTIFACT_RUN_ID: ${{ env.ARTIFACT_RUN_ID }}
AMDGPU_FAMILIES: ${{ 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'