-
Notifications
You must be signed in to change notification settings - Fork 293
Introduce unified test framework for benchmark and functional tests #2803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2188233
5adda5a
64d9a40
7db3292
ee49925
8013e71
fb3521b
0d2b187
398c9b7
7f6bbd3
bf9cf14
a56f9c4
48d75c7
049af2e
1ef8ecb
a5957e3
c87ecac
a9d7c26
22d338e
23d0b0f
c0d0ed0
9d5f728
0112ef5
49097fe
1f1451b
d752368
245c6b0
7181402
82579d5
c1839fa
6564b8e
b725f8d
6590d7e
f0568fe
52cae62
7387c37
fece860
39deb97
e9e6ed1
49a64c0
7329da8
f58d124
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| name: Run Functional Tests | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| artifact_group: | ||
| description: 'Build artifact group to test (e.g., gfx94X-dcgpu, gfx101X-dgpu, gfx1151, gfx120X-all)' | ||
| type: string | ||
| artifact_run_id: | ||
| description: 'GitHub Actions run ID where artifacts were built (empty to use current run)' | ||
| type: string | ||
| default: "" | ||
| amdgpu_families: | ||
| description: 'Comma-separated list of AMD GPU families to test (e.g., gfx908, gfx90a, gfx942)' | ||
| type: string | ||
| test_runs_on: | ||
| description: 'GitHub Actions runner label for the test machine' | ||
| type: string | ||
| workflow_call: | ||
| inputs: | ||
| artifact_group: | ||
| description: 'Build artifact group to test (e.g., gfx94X-dcgpu, gfx101X-dgpu, gfx1151, gfx120X-all)' | ||
| type: string | ||
| artifact_run_id: | ||
| description: 'GitHub Actions run ID where artifacts were built (empty to use current run)' | ||
| type: string | ||
| default: "" | ||
| amdgpu_families: | ||
| description: 'Comma-separated list of AMD GPU families to test (e.g., gfx908, gfx90a, gfx942)' | ||
| type: string | ||
| test_runs_on: | ||
| description: 'GitHub Actions runner label for the test machine' | ||
| type: string | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| configure_test_matrix: | ||
| name: "Configure functional test matrix" | ||
| # if there is a test machine available | ||
| if: ${{ inputs.test_runs_on != '' }} | ||
| runs-on: ${{ inputs.test_runs_on }} | ||
| outputs: | ||
| components: ${{ steps.configure.outputs.components }} | ||
| platform: ${{ steps.configure.outputs.platform }} | ||
| steps: | ||
| - name: "Fetch 'build_tools' from repository" | ||
| if: ${{ runner.os == 'Windows' }} | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||
| with: | ||
| sparse-checkout: build_tools | ||
| path: "prejob" | ||
|
|
||
| # Checkout failure is possible on Windows, as it's the first job on a GPU test runner. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To prevent checkout failures on Windows. |
||
| # 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||
|
|
||
| - name: Setting up Python | ||
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 | ||
| with: | ||
| python-version: 3.12 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this version requirement necessary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Python is needed to run |
||
|
|
||
| - name: "Configuring test options" | ||
| id: configure | ||
| env: | ||
| ARTIFACT_GROUP: ${{ inputs.artifact_group }} | ||
| AMDGPU_FAMILIES: ${{ inputs.amdgpu_families }} | ||
| IS_FUNCTIONAL_TESTS: "true" | ||
| run: python ./build_tools/github_actions/fetch_test_configurations.py | ||
|
|
||
| run_functional_tests: | ||
| name: 'Run Functional Tests ${{ 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/test_component.yml | ||
| secrets: inherit | ||
| with: | ||
| artifact_run_id: ${{ inputs.artifact_run_id }} | ||
| artifact_group: ${{ inputs.artifact_group }} | ||
| amdgpu_families: ${{ inputs.amdgpu_families }} | ||
| test_runs_on: ${{ inputs.test_runs_on }} | ||
| platform: ${{ needs.configure_test_matrix.outputs.platform }} | ||
| component: ${{ toJSON(matrix.components) }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add descriptions to all those params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I've added descriptions to all input parameters in the workflow file.