Skip to content

Commit bfc2e8d

Browse files
Fixing windows by using cmd shell to run tests
1 parent d8fc8dc commit bfc2e8d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/conda-package.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ jobs:
185185
env:
186186
CHANNELS: -c intel -c main --override-channels
187187

188+
defaults:
189+
run:
190+
shell: cmd /C CALL {0}
191+
188192
steps:
189193
- name: Download artifact
190194
uses: actions/download-artifact@v2
@@ -230,7 +234,6 @@ jobs:
230234
- name: Install opencl_rt
231235
run: conda install opencl_rt -c intel --override-channels
232236
- name: Install dpctl
233-
shell: cmd
234237
run: |
235238
@ECHO ON
236239
copy /Y ${{ env.GITHUB_WORKSPACE }}\ver.json .
@@ -239,9 +242,10 @@ jobs:
239242
SET PACKAGE_VERSION=%%F
240243
)
241244
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
242-
# Test installed packages
245+
REM Test installed packages
243246
conda list
244247
- name: Add library
248+
shell: pwsh
245249
run: |
246250
echo "OCL_ICD_FILENAMES=C:\Miniconda\Library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
247251
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
@@ -276,14 +280,12 @@ jobs:
276280
- name: Smoke test
277281
run: |
278282
set SYCL_ENABLE_HOST_DEVICE=1
279-
& { [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Miniconda\Library\bin\", [EnvironmentVariableTarget]::Machine) }
280283
python -c "import dpctl; dpctl.lsplatform()"
281284
python -c "import dpctl; print(dpctl.get_devices(backend='opencl', device_type='gpu'))"
282285
python -c "import dpctl; print(dpctl.get_num_devices(backend='opencl', device_type='gpu'))"
283286
- name: Run tests
284287
run: |
285288
set SYCL_ENABLE_HOST_DEVICE=1
286-
& { [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Miniconda\Library\bin\", [EnvironmentVariableTarget]::Machine) }
287289
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
288290
289291
upload_linux:

0 commit comments

Comments
 (0)