Skip to content

Commit 764fd26

Browse files
test_windows: install into dpctl_test env, activate it to use it
1 parent 645cbf0 commit 764fd26

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/conda-package.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ jobs:
176176
needs: build_windows
177177
runs-on: ${{ matrix.runner }}
178178
defaults:
179-
run:
180-
shell: cmd /C CALL {0}
179+
run:
180+
shell: cmd /C CALL {0}
181181
strategy:
182182
matrix:
183183
python: ['3.8', '3.9', '3.10']
@@ -229,7 +229,7 @@ jobs:
229229
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
230230
SET PACKAGE_VERSION=%%F
231231
)
232-
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
232+
conda install -n dpctl_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
233233
- name: Display lockfile content
234234
shell: pwsh
235235
run: Get-Content -Path .\lockfile
@@ -246,7 +246,7 @@ jobs:
246246
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
247247
- name: Install opencl_rt
248248
shell: cmd /C CALL {0}
249-
run: conda install opencl_rt -c intel --override-channels
249+
run: conda install -n dpctl_test opencl_rt -c intel --override-channels
250250
- name: Install dpctl
251251
shell: cmd /C CALL {0}
252252
run: |
@@ -259,13 +259,13 @@ jobs:
259259
SET PACKAGE_VERSION=%%F
260260
)
261261
SET "TEST_DEPENDENCIES=pytest pytest-cov cython"
262-
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
262+
conda install -n dpctl_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
263263
- name: Report content of test environment
264264
shell: cmd /C CALL {0}
265265
run: |
266266
echo "Value of CONDA enviroment variable was: " %CONDA%
267267
echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX%
268-
conda list
268+
conda info && conda list -n dpctl_test
269269
- name: Configure Intel OpenCL CPU RT
270270
shell: pwsh
271271
run: |
@@ -291,18 +291,18 @@ jobs:
291291
(Get-Content $cl_cfg) -replace '^CL_CONFIG_TBB_DLL_PATH =', "CL_CONFIG_TBB_DLL_PATH = $conda_env_library\bin" | Set-Content $cl_cfg
292292
Get-Content -Tail 5 -Path $cl_cfg
293293
}
294-
- name: Smoke test
294+
- name: Smoke test, step 1
295295
shell: cmd /C CALL {0}
296-
run: |
297-
python -c "import sys; print(sys.executable)"
298-
python -c "import dpctl; dpctl.lsplatform()"
299-
python -c "import dpctl; print(dpctl.get_devices(backend='opencl', device_type='gpu'))"
300-
python -c "import dpctl; print(dpctl.get_num_devices(backend='opencl', device_type='gpu'))"
296+
run: >-
297+
conda activate dpctl_test && python -c "import sys; print(sys.executable)"
298+
- name: Smoke test, step 2
299+
shell: cmd /C CALL {0}
300+
run: >-
301+
conda activate dpctl_test && python -c "import dpctl; dpctl.lsplatform()"
301302
- name: Run tests
302303
shell: cmd /C CALL {0}
303-
run: |
304-
python -c "import sys; print(sys.executable)"
305-
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
304+
run: >-
305+
conda activate dpctl_test && python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
306306
307307
upload_linux:
308308
needs: test_linux

0 commit comments

Comments
 (0)