@@ -247,21 +247,32 @@ jobs:
247
247
if : runner.os != 'Windows'
248
248
id : find_wheel_unix
249
249
shell : bash
250
+ env :
251
+ SUPPORT : ${{ matrix.pccl_build_cuda_support }}
250
252
run : |
251
253
for file in "${{ github.workspace }}/python/framework/dist/"*pccl*.whl; do
252
254
echo "wheel_path=$file" >> "$GITHUB_OUTPUT"
253
- echo "wheel_name=${file##*/}" >> "$GITHUB_OUTPUT"
255
+ base="${file##*/}"
256
+ name="${base%.whl}"
257
+ if [[ "$SUPPORT" == "ON" ]]; then suffix="cuda"; else suffix="nocuda"; fi
258
+ echo "wheel_name=${name}-${suffix}.whl" >> "$GITHUB_OUTPUT"
254
259
break
255
260
done
256
261
257
262
- name : Find Python wheel (Windows)
258
263
if : runner.os == 'Windows'
259
264
id : find_wheel_windows
260
265
shell : powershell
266
+ env :
267
+ SUPPORT : ${{ matrix.pccl_build_cuda_support }}
261
268
run : |
262
269
$file = Get-ChildItem -Path "${{ github.workspace }}\python\framework\dist" -Filter "*pccl*.whl" | Select-Object -First 1
263
270
echo "wheel_path=$($file.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8
264
- echo "wheel_name=$($file.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8
271
+ $base = $file.Name
272
+ $name = [System.IO.Path]::GetFileNameWithoutExtension($base)
273
+ if ($env:SUPPORT -eq 'ON') { $suffix = 'cuda' } else { $suffix = 'nocuda' }
274
+ $newName = "$name-$suffix.whl"
275
+ echo "wheel_name=$newName" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8
265
276
266
277
- name : Upload Release Asset
267
278
uses : actions/upload-release-asset@v1
@@ -270,5 +281,5 @@ jobs:
270
281
with :
271
282
upload_url : ${{ needs.create_release.outputs.upload_url }}
272
283
asset_path : ${{ runner.os == 'Windows' && steps.find_wheel_windows.outputs.wheel_path || steps.find_wheel_unix.outputs.wheel_path }}
273
- asset_name : ${{ replace( runner.os == 'Windows' && steps.find_wheel_windows.outputs.wheel_name || steps.find_wheel_unix.outputs.wheel_name, '.whl', matrix.pccl_build_cuda_support == 'ON' && 'cuda.whl' || 'nocuda.whl') }}
284
+ asset_name : ${{ runner.os == 'Windows' && steps.find_wheel_windows.outputs.wheel_name || steps.find_wheel_unix.outputs.wheel_name }}
274
285
asset_content_type : application/zip
0 commit comments