34
34
description : torch-commit
35
35
has_code_changes :
36
36
required : false
37
- type : boolean
37
+ type : string
38
38
description : Whether to run full workflow or not
39
- default : true
39
+ default : ' true'
40
40
secrets :
41
41
gcloud-service-key :
42
42
required : true
@@ -82,57 +82,57 @@ jobs:
82
82
BAZEL_REMOTE_CACHE : 1
83
83
steps :
84
84
- name : Checkout actions
85
- if : ${{ inputs.has_code_changes }}
85
+ if : ${{ inputs.has_code_changes }} == 'true'
86
86
uses : actions/checkout@v4
87
87
with :
88
88
sparse-checkout : |
89
89
.github/workflows/setup
90
90
path : .actions
91
91
- name : Setup
92
- if : ${{ inputs.has_code_changes }}
92
+ if : ${{ inputs.has_code_changes }} == 'true'
93
93
uses : ./.actions/.github/workflows/setup
94
94
with :
95
95
torch-commit : ${{ inputs.torch-commit }}
96
96
cuda : ${{ inputs.install-cuda-plugin && true || false }}
97
97
wheels-artifact : torch-xla-wheels
98
98
cuda-plugin-artifact : ${{ inputs.install-cuda-plugin && 'cuda-plugin' || null }}
99
99
- name : Fetch CPP test binaries
100
- if : ${{ inputs.has_code_changes }} && ${{ matrix.run_cpp_tests }}
100
+ if : ${{ inputs.has_code_changes }} == 'true' && ${{ matrix.run_cpp_tests }}
101
101
uses : actions/download-artifact@v4
102
102
with :
103
103
name : cpp-test-bin
104
104
path : /tmp/test/bin
105
105
# GitHub Actions doesn't preserve executable permissions
106
106
# https://github.com/actions/download-artifact?tab=readme-ov-file#permission-loss
107
107
- name : Set CPP test permissions
108
- if : ${{ inputs.has_code_changes }} && ${{ matrix.run_cpp_tests }}
108
+ if : ${{ inputs.has_code_changes }} == 'true' && ${{ matrix.run_cpp_tests }}
109
109
run : |
110
110
chmod +x /tmp/test/bin/*
111
111
ls -l /tmp/test/bin
112
112
- name : Check GPU
113
- if : ${{ inputs.has_code_changes }} && ${{ inputs.install-cuda-plugin }}
113
+ if : ${{ inputs.has_code_changes }} == 'true' && ${{ inputs.install-cuda-plugin }}
114
114
run : nvidia-smi
115
115
- name : Install test deps
116
- if : ${{ inputs.has_code_changes }}
116
+ if : ${{ inputs.has_code_changes }} == 'true'
117
117
shell : bash
118
118
run : |
119
119
# TODO: Add these in setup.py
120
120
pip install fsspec
121
121
pip install rich
122
122
- name : Checkout PyTorch Repo
123
- if : ${{ inputs.has_code_changes }}
123
+ if : ${{ inputs.has_code_changes }} == 'true'
124
124
uses : actions/checkout@v4
125
125
with :
126
126
repository : pytorch/pytorch
127
127
path : pytorch
128
128
ref : ${{ inputs.torch-commit }}
129
129
- name : Checkout PyTorch/XLA Repo
130
- if : ${{ inputs.has_code_changes }}
130
+ if : ${{ inputs.has_code_changes }} == 'true'
131
131
uses : actions/checkout@v4
132
132
with :
133
133
path : pytorch/xla
134
134
- name : Extra CI deps
135
- if : ${{ inputs.has_code_changes }}
135
+ if : ${{ inputs.has_code_changes }} == 'true'
136
136
shell : bash
137
137
run : |
138
138
set -x
@@ -143,11 +143,11 @@ jobs:
143
143
pip install -r pytorch/xla/benchmarks/requirements.txt
144
144
fi
145
145
- name : Test
146
- if : ${{ inputs.has_code_changes }}
146
+ if : ${{ inputs.has_code_changes }} == 'true'
147
147
shell : bash
148
148
run : pytorch/xla/.github/scripts/run_tests.sh pytorch/ pytorch/xla/ $USE_COVERAGE
149
149
- name : Upload coverage results
150
- if : ${{ inputs.has_code_changes }} && ${{ inputs.collect-coverage }}
150
+ if : ${{ inputs.has_code_changes }} == 'true' && ${{ inputs.collect-coverage }}
151
151
shell : bash
152
152
env :
153
153
CIRCLE_WORKFLOW_ID : ${{ github.run_id }}
@@ -192,6 +192,6 @@ jobs:
192
192
fi
193
193
fi
194
194
- name : Report no code changes
195
- if : ${{ ! inputs.has_code_changes }}
195
+ if : ${{ inputs.has_code_changes }} == 'false'
196
196
run : |
197
197
echo "No code changes were detected that require running the full test suite."
0 commit comments