File tree Expand file tree Collapse file tree 2 files changed +46
-3
lines changed Expand file tree Collapse file tree 2 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 33
33
type : string
34
34
default : ' 2025.0'
35
35
description : Python version
36
+ files-changed :
37
+ required : true
38
+ type : string
39
+ default : ' false'
40
+ description : Check if filtered file changed
41
+ has-label :
42
+ required : true
43
+ type : string
44
+ default : ' false'
45
+ description : Check if labelled
36
46
37
47
permissions : read-all
38
48
42
52
jobs :
43
53
Torch-XPU-Windows-UT :
44
54
runs-on : ${{ inputs.runner }}
55
+ if : ${{ inputs.files-changed == 'true' || inputs.has-label == 'true' }}
45
56
timeout-minutes : 900
46
57
steps :
47
58
- name : Checkout torch-xpu-ops
Original file line number Diff line number Diff line change @@ -222,13 +222,45 @@ jobs:
222
222
pytorch : ${{ needs.preci-linux-build-abi-0.outputs.torch_commit_id }}
223
223
ut : op_extended
224
224
runner : linux.idc.xpu
225
-
225
+
226
+ check-conditions :
227
+ if : ${{ github.repository_owner == 'intel' }}
228
+ name : preci-win-conditions-filter
229
+ runs-on : ubuntu-22.04
230
+ outputs :
231
+ files-changed : ${{ steps.check-files.outputs.src_changed }}
232
+ has-label : ${{ steps.check-label.outputs.results }}
233
+ steps :
234
+ - uses : dorny/paths-filter@v2
235
+ id : check-files
236
+ with :
237
+ filters : |
238
+ src_changed:
239
+ - 'cmake/**'
240
+ - 'tools/**'
241
+ - 'src/**.cmake'
242
+ - 'CMakeLists.txt'
243
+ - 'test/sycl/CMakeLists.txt'
244
+ - 'src/xccl/CMakeLists.txt'
245
+ - 'src/ATen/CMakeLists.txt'
246
+ - 'src/CMakeLists.txt'
247
+ - '.github/workflows/_windows_ut.yml'
248
+
249
+ - name : Check Label
250
+ id : check-label
251
+ run : |
252
+ LABEL_EXISTS=$(echo '${{ toJSON(github.event.pull_request.labels) }}' | jq 'any(.name == "windows_ci")')
253
+ echo $LABEL_EXISTS
254
+ echo "results=$LABEL_EXISTS" >> $GITHUB_OUTPUT
255
+
226
256
preci-windows :
227
257
# Don't run on forked repos and draft PRs
228
- if : ${{ (github.repository_owner == 'intel') && (github.event.pull_request.draft == false) && contains(github.event.pull_request.labels.*.name, 'windows_ci') }}
258
+ if : ${{ (github.repository_owner == 'intel') && (github.event.pull_request.draft == false) }}
229
259
name : preci-windows
230
- needs : preci-lint-check
260
+ needs : [ preci-lint-check, check-conditions]
231
261
uses : ./.github/workflows/_windows_ut.yml
232
262
with :
233
263
ut : op_extended
234
264
runner : Windows_CI
265
+ files-changed : ${{ needs.check-conditions.outputs.files-changed }}
266
+ has-label : ${{ needs.check-conditions.outputs.has-label }}
You can’t perform that action at this time.
0 commit comments