name: TheRock Test Packages on: workflow_call: inputs: therock_ref: type: string required: true projects_to_test: type: string amdgpu_families: type: string test_runs_on: type: string platform: type: string test_type: type: string permissions: contents: read jobs: configure_test_matrix: name: "Configure test matrix" runs-on: ${{ inputs.test_runs_on }} if: ${{ inputs.test_runs_on != '' }} outputs: components: ${{ steps.configure.outputs.components }} steps: - name: "Fetch 'build_tools' from repository" uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: "ROCm/TheRock" ref: ${{ inputs.therock_ref }} - 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@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: 3.12 - name: "Configuring CI options" env: PROJECTS_TO_TEST: ${{ inputs.projects_to_test }} TEST_TYPE: ${{ inputs.test_type }} AMDGPU_FAMILIES: ${{ inputs.amdgpu_families }} CI_CONFIG_PATH: ci-config id: configure run: python ./build_tools/github_actions/fetch_test_configurations.py test_components: name: 'Test ${{ matrix.components.job_name }}' 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) }} uses: './.github/workflows/therock-test-component.yml' with: artifact_run_id: ${{ github.run_id }} therock_ref: ${{ inputs.therock_ref }} amdgpu_families: ${{ inputs.amdgpu_families }} # Per-component runner selection: # 1. Multi-GPU components use the multi-GPU runner # 2. CPU-only components use standard GitHub runners # 3. Per-component runner (set by fetch_test_configurations.py) test_runs_on: >- ${{ (matrix.components.multi_gpu_runner != '' && matrix.components.multi_gpu_runner) || (matrix.components.linux_cpu_runner == true && 'aws-linux-scale-rocm-prod') || matrix.components.test_runner }} platform: ${{ inputs.platform }} component: ${{ toJSON(matrix.components) }} secrets: inherit