Skip to content

Commit fcd7bff

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

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/conda-package.yml

Lines changed: 14 additions & 12 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: |
@@ -294,15 +294,17 @@ jobs:
294294
- name: Smoke test
295295
shell: cmd /C CALL {0}
296296
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'))"
297+
conda activate dpctl_test && \
298+
python -c "import sys; print(sys.executable)" && \
299+
python -c "import dpctl; dpctl.lsplatform()" && \
300+
python -c "import dpctl; print(dpctl.get_devices(backend='opencl', device_type='gpu'))" && \
301+
python -c "import dpctl; print(dpctl.get_num_devices(backend='opencl', device_type='gpu'))"
301302
- name: Run tests
302303
shell: cmd /C CALL {0}
303304
run: |
304-
python -c "import sys; print(sys.executable)"
305-
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
305+
conda activate dpctl_test && \
306+
python -c "import sys; print(sys.executable)" && \
307+
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
306308
307309
upload_linux:
308310
needs: test_linux

0 commit comments

Comments
 (0)