name: Test component on: workflow_call: inputs: artifact_run_id: type: string default: "" therock_ref: type: string required: true amdgpu_families: type: string test_runs_on: type: string component: type: string permissions: contents: read jobs: test_component: name: "Test ${{ fromJSON(inputs.component).job_name }} (shard ${{ matrix.shard }} of ${{ fromJSON(inputs.component).total_shards }})" runs-on: ${{ inputs.test_runs_on }} timeout-minutes: 60 container: image: ${{ fromJSON(inputs.component).container_image }} options: ${{ fromJSON(inputs.component).container_options }} strategy: fail-fast: false matrix: shard: ${{ fromJSON(inputs.component).shard_arr }} defaults: run: shell: bash env: ARTIFACT_RUN_ID: "${{ inputs.artifact_run_id != '' && inputs.artifact_run_id || github.run_id }}" OUTPUT_ARTIFACTS_DIR: "./build" VENV_DIR: ${{ github.workspace }}/.venv AMDGPU_FAMILIES: ${{ inputs.amdgpu_families }} ARTIFACT_GROUP: ${{ inputs.amdgpu_families }} steps: - name: Fetch 'build_tools' from TheRock uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: repository: "ROCm/TheRock" sparse-checkout: build_tools path: "prejob" - name: Pre-job cleanup GPU processes if: ${{ runner.os == 'Linux' }} timeout-minutes: 5 run: bash ./prejob/build_tools/github_actions/cleanup_processes.sh - name: Checkout TheRock repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: repository: "ROCm/TheRock" ref: ${{ inputs.therock_ref }} - name: Run setup test environment timeout-minutes: 15 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: ${{ fromJSON(inputs.component).fetch_artifact_args }} IS_PR_FROM_FORK: ${{ github.event.pull_request.head.repo.fork }} - name: Driver / GPU sanity check if: ${{ !fromJSON(inputs.component).linux_cpu_runner }} timeout-minutes: 3 run: python ./build_tools/print_driver_gpu_info.py - name: Test timeout-minutes: ${{ fromJSON(inputs.component).timeout_minutes }} env: SHARD_INDEX: ${{ matrix.shard }} TOTAL_SHARDS: ${{ fromJSON(inputs.component).total_shards }} run: ${{ fromJSON(inputs.component).test_script }} - name: Post-job cleanup GPU processes if: ${{ always() && runner.os == 'Linux' }} timeout-minutes: 5 run: bash ./build_tools/github_actions/cleanup_processes.sh