name: TheRock Test Packages on: workflow_dispatch: inputs: projects_to_test: type: string description: "Comma-separated list of projects to test" test_type: type: string default: "standard" description: "Test type (quick, standard, comprehensive, full)" amdgpu_families: type: string description: "GPU family to test (e.g., gfx94X-dcgpu, gfx125X-dcgpu)" test_runs_on: type: string description: "Runner label to use for tests" platform: type: string default: "linux" description: "Platform (linux or windows)" artifact_run_id: type: string default: "" description: "Run ID to fetch artifacts from (leave empty for current run)" sanity_check_only_for_family: type: boolean default: false description: "Run only sanity check for this family" workflow_call: inputs: projects_to_test: type: string test_type: type: string default: "standard" amdgpu_families: type: string test_runs_on: type: string platform: type: string artifact_run_id: type: string default: "" sanity_check_only_for_family: type: boolean default: false permissions: contents: read jobs: configure_test_matrix: name: "Configure test matrix" # Use standard GitHub runner for config - no GPU needed runs-on: ubuntu-24.04 if: ${{ inputs.test_runs_on != '' }} outputs: components: ${{ steps.configure.outputs.components }} platform: ${{ steps.configure.outputs.platform }} sanity_component: ${{ steps.configure.outputs.sanity_component }} steps: - name: "Fetch 'build_tools' from repository" uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: repository: "ROCm/TheRock" ref: release/therock-10.0 - name: Checkout CI config uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: ROCm/therock-ci-config ref: main path: ci-config continue-on-error: true - name: Setting up Python uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: python-version: 3.12 - name: "Configuring CI options" env: PROJECTS_TO_TEST: ${{ inputs.projects_to_test }} AMDGPU_FAMILIES: ${{ inputs.amdgpu_families }} WINDOWS_HIP_ROCR_TESTS: ${{ contains(inputs.projects_to_test, 'hip-tests') }} CI_CONFIG_PATH: ci-config id: configure run: python ./build_tools/github_actions/fetch_test_configurations.py --platform ${{ inputs.platform }} test_sanity_check: name: 'Test Sanity Check' needs: configure_test_matrix uses: './.github/workflows/therock-test-component.yml' with: artifact_run_id: ${{ inputs.artifact_run_id }} amdgpu_families: ${{ inputs.amdgpu_families }} # Use the runner selected by fetch_test_configurations.py # TEMPORARY: For gfx125X-dcgpu, use inputs.test_runs_on since test_runner is not # configured in therock-ci-config yet (limited MI455 machines) test_runs_on: >- ${{ (contains(inputs.amdgpu_families, 'gfx125X') && inputs.test_runs_on) || fromJSON(needs.configure_test_matrix.outputs.sanity_component).test_runner }} platform: ${{ needs.configure_test_matrix.outputs.platform }} component: ${{ needs.configure_test_matrix.outputs.sanity_component }} test_components: name: 'Test ${{ matrix.components.job_name }}' needs: [test_sanity_check, configure_test_matrix] # skip tests if no test matrix to run and sanity check only requested if: ${{ needs.configure_test_matrix.outputs.components != '[]' && !inputs.sanity_check_only_for_family }} strategy: fail-fast: false matrix: components: ${{ fromJSON(needs.configure_test_matrix.outputs.components) }} uses: './.github/workflows/therock-test-component.yml' with: artifact_run_id: ${{ inputs.artifact_run_id }} amdgpu_families: ${{ inputs.amdgpu_families }} # Route to the appropriate runner: # 1. Multi-GPU components use the multi-GPU runner # 2. CPU-only components use standard GitHub runners (azure-linux-scale-rocm) # 3. Per-component runner (set by fetch_test_configurations.py) # TEMPORARY: For gfx125X-dcgpu, use inputs.test_runs_on since test_runner is not # configured in therock-ci-config yet (limited MI455 machines) test_runs_on: >- ${{ (contains(inputs.amdgpu_families, 'gfx125X') && inputs.test_runs_on) || (matrix.components.multi_gpu_runner != '' && matrix.components.multi_gpu_runner) || (matrix.components.linux_cpu_runner == true && 'azure-linux-scale-rocm') || matrix.components.test_runner }} platform: ${{ needs.configure_test_matrix.outputs.platform }} component: ${{ toJSON(matrix.components) }}