3434 description : torch-commit
3535 has_code_changes :
3636 required : false
37- type : boolean
37+ type : string
3838 description : Whether to run full workflow or not
39- default : true
39+ default : ' true'
4040 secrets :
4141 gcloud-service-key :
4242 required : true
@@ -82,57 +82,57 @@ jobs:
8282 BAZEL_REMOTE_CACHE : 1
8383 steps :
8484 - name : Checkout actions
85- if : ${{ inputs.has_code_changes }}
85+ if : ${{ inputs.has_code_changes }} == 'true'
8686 uses : actions/checkout@v4
8787 with :
8888 sparse-checkout : |
8989 .github/workflows/setup
9090 path : .actions
9191 - name : Setup
92- if : ${{ inputs.has_code_changes }}
92+ if : ${{ inputs.has_code_changes }} == 'true'
9393 uses : ./.actions/.github/workflows/setup
9494 with :
9595 torch-commit : ${{ inputs.torch-commit }}
9696 cuda : ${{ inputs.install-cuda-plugin && true || false }}
9797 wheels-artifact : torch-xla-wheels
9898 cuda-plugin-artifact : ${{ inputs.install-cuda-plugin && 'cuda-plugin' || null }}
9999 - 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 }}
101101 uses : actions/download-artifact@v4
102102 with :
103103 name : cpp-test-bin
104104 path : /tmp/test/bin
105105 # GitHub Actions doesn't preserve executable permissions
106106 # https://github.com/actions/download-artifact?tab=readme-ov-file#permission-loss
107107 - 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 }}
109109 run : |
110110 chmod +x /tmp/test/bin/*
111111 ls -l /tmp/test/bin
112112 - name : Check GPU
113- if : ${{ inputs.has_code_changes }} && ${{ inputs.install-cuda-plugin }}
113+ if : ${{ inputs.has_code_changes }} == 'true' && ${{ inputs.install-cuda-plugin }}
114114 run : nvidia-smi
115115 - name : Install test deps
116- if : ${{ inputs.has_code_changes }}
116+ if : ${{ inputs.has_code_changes }} == 'true'
117117 shell : bash
118118 run : |
119119 # TODO: Add these in setup.py
120120 pip install fsspec
121121 pip install rich
122122 - name : Checkout PyTorch Repo
123- if : ${{ inputs.has_code_changes }}
123+ if : ${{ inputs.has_code_changes }} == 'true'
124124 uses : actions/checkout@v4
125125 with :
126126 repository : pytorch/pytorch
127127 path : pytorch
128128 ref : ${{ inputs.torch-commit }}
129129 - name : Checkout PyTorch/XLA Repo
130- if : ${{ inputs.has_code_changes }}
130+ if : ${{ inputs.has_code_changes }} == 'true'
131131 uses : actions/checkout@v4
132132 with :
133133 path : pytorch/xla
134134 - name : Extra CI deps
135- if : ${{ inputs.has_code_changes }}
135+ if : ${{ inputs.has_code_changes }} == 'true'
136136 shell : bash
137137 run : |
138138 set -x
@@ -143,11 +143,11 @@ jobs:
143143 pip install -r pytorch/xla/benchmarks/requirements.txt
144144 fi
145145 - name : Test
146- if : ${{ inputs.has_code_changes }}
146+ if : ${{ inputs.has_code_changes }} == 'true'
147147 shell : bash
148148 run : pytorch/xla/.github/scripts/run_tests.sh pytorch/ pytorch/xla/ $USE_COVERAGE
149149 - name : Upload coverage results
150- if : ${{ inputs.has_code_changes }} && ${{ inputs.collect-coverage }}
150+ if : ${{ inputs.has_code_changes }} == 'true' && ${{ inputs.collect-coverage }}
151151 shell : bash
152152 env :
153153 CIRCLE_WORKFLOW_ID : ${{ github.run_id }}
@@ -192,6 +192,6 @@ jobs:
192192 fi
193193 fi
194194 - name : Report no code changes
195- if : ${{ ! inputs.has_code_changes }}
195+ if : ${{ inputs.has_code_changes }} == 'false'
196196 run : |
197197 echo "No code changes were detected that require running the full test suite."
0 commit comments