Skip to content

Commit 99e49c0

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

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/conda-package.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ jobs:
194194
with:
195195
auto-activate-base: true
196196
activate-environment: ""
197+
- name: Checkout repo
198+
# We do not need the checkout, but it sets up GITHUB_WORKSPACE env. variable
199+
uses: actions/checkout@v2
200+
with:
201+
fetch-depth: 0
197202
- name: Install conda-build
198203
# Needed to be able to run conda index
199204
run: conda install conda-build
@@ -206,7 +211,7 @@ jobs:
206211
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.GITHUB_WORKSPACE }}/channel --override-channels --info --json > ${{ env.GITHUB_WORKSPACE }}\ver.json
207212
more ${{ env.GITHUB_WORKSPACE }}\ver.json
208213
- name: Collect dependencies
209-
shell: cmd
214+
shell: cmd /C CALL {0}
210215
run: |
211216
@ECHO ON
212217
copy /Y ${{ env.GITHUB_WORKSPACE }}\ver.json .
@@ -230,7 +235,7 @@ jobs:
230235
- name: Install opencl_rt
231236
run: conda install opencl_rt -c intel --override-channels
232237
- name: Install dpctl
233-
shell: cmd
238+
shell: cmd /C CALL {0}
234239
run: |
235240
@ECHO ON
236241
copy /Y ${{ env.GITHUB_WORKSPACE }}\ver.json .
@@ -239,9 +244,10 @@ jobs:
239244
SET PACKAGE_VERSION=%%F
240245
)
241246
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
242-
# Test installed packages
247+
REM Test installed packages
243248
conda list
244249
- name: Add library
250+
shell: pwsh
245251
run: |
246252
echo "OCL_ICD_FILENAMES=C:\Miniconda\Library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
247253
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
@@ -274,16 +280,16 @@ jobs:
274280
(Get-Content $cl_cfg) -replace '^CL_CONFIG_TBB_DLL_PATH =', 'CL_CONFIG_TBB_DLL_PATH = C:\Miniconda\Library\bin' | Set-Content $cl_cfg
275281
}
276282
- name: Smoke test
283+
shell: cmd /C CALL {0}
277284
run: |
278285
set SYCL_ENABLE_HOST_DEVICE=1
279-
& { [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Miniconda\Library\bin\", [EnvironmentVariableTarget]::Machine) }
280286
python -c "import dpctl; dpctl.lsplatform()"
281287
python -c "import dpctl; print(dpctl.get_devices(backend='opencl', device_type='gpu'))"
282288
python -c "import dpctl; print(dpctl.get_num_devices(backend='opencl', device_type='gpu'))"
283289
- name: Run tests
290+
shell: cmd /C CALL {0}
284291
run: |
285292
set SYCL_ENABLE_HOST_DEVICE=1
286-
& { [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Miniconda\Library\bin\", [EnvironmentVariableTarget]::Machine) }
287293
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
288294
289295
upload_linux:

0 commit comments

Comments
 (0)