Skip to content

Commit 8ba4de9

Browse files
committed
adding more workflows
1 parent fca9c16 commit 8ba4de9

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,25 @@ on:
7272
- "mi355x-amd_3"
7373

7474
jobs:
75+
verify-compatible-runner:
76+
runs-on: ubuntu-latest
77+
if: ${{ inputs.runner != '' }}
78+
steps:
79+
- name: Verify runner compatible
80+
shell: python
81+
run: |
82+
import re
83+
84+
inputs_name_re = re.match(r'^[^-]+-[^-]+-([^-]+)', ${{ inputs.name }})
85+
if inputs_name_re:
86+
config_gpu = inputs_name_re.group(1)
87+
inputs_runner_re = re.match(r'^([^-]+)', ${{ inputs.runner }})
88+
if inputs_runner_re:
89+
runner_gpu = inputs_runner_re.group(1)
90+
91+
assert config_gpu == runner_gpu, f"Specified runner '${{ inputs.runner }})' is not compatible with config '${{ inputs.name }}'""
92+
93+
7594
get-jobs:
7695
runs-on: ubuntu-latest
7796
outputs:

0 commit comments

Comments
 (0)