-
Notifications
You must be signed in to change notification settings - Fork 4
94 lines (87 loc) · 2.61 KB
/
Copy pathbackend-test.yaml
File metadata and controls
94 lines (87 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Backend Test
on:
workflow_call:
inputs:
vendor:
description: 'BLAS_VENDOR value (e.g. nvidia, ascend, moore)'
required: true
type: string
runner_label:
description: 'GitHub Actions runner label'
required: true
type: string
gpu_check_script:
description: 'Path to GPU check script (leave empty to skip)'
required: false
type: string
default: ''
test_script:
description: "Temporary parameter for alpha-ops test"
required: false
type: string
default: ''
changed_files:
description: 'List of changed files in a PR'
required: false
type: string
default: ''
pr_id:
description: 'ID of the PR'
required: false
type: string
default: ''
jobs:
test:
runs-on: ${{ inputs.runner_label }}
concurrency:
group: >-
op-test-${{ inputs.vendor }}-
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
steps:
- id: checkout-attempt-1
uses: actions/checkout@v4
continue-on-error: true
- id: sleep-1
if: steps.checkout-attempt-1.outcome == 'failure'
shell: bash
run: sleep 30s
- id: checkout-attempt-2
if: steps.checkout-attempt-1.outcome == 'failure'
uses: actions/checkout@v4
continue-on-error: true
- id: sleep-2
if: steps.checkout-attempt-2.outcome == 'failure'
shell: bash
run: sleep 30s
- id: checkout-attempt-3
if: steps.checkout-attempt-2.outcome == 'failure'
uses: actions/checkout@v4
- name: Setup FlagBLAS
shell: bash
env:
RUNNER_LABEL: ${{ inputs.runner_label }}
run: |
source tools/set-env.sh ${{ inputs.vendor }}
./setup.sh ${{ inputs.vendor }}
- name: Check GPU availability
if: ${{ inputs.gpu_check_script != '' }}
shell: bash
run: |
bash ${{ inputs.gpu_check_script }}
- name: Test alpha ops
if: ${{ inputs.test_script != '' }}
env:
CHANGED_FILES: ${{ inputs.changed_files }}
shell: bash
run: |
bash ${{ inputs.test_script }} ${{ inputs.vendor }} ${{ inputs.pr_id }}
- name: Run backend tests
if: ${{ inputs.test_script == '' }}
shell: bash
env:
CHANGED_FILES: ${{ inputs.changed_files }}
run: |
source .venv/bin/activate
source tools/set-env.sh ${{ inputs.vendor }}
tools/run_op.sh ${{ inputs.pr_id }}