Skip to content

Commit f38663b

Browse files
Do not install conda build into test_windows
Install conda index as a separate step.
1 parent 87d6e72 commit f38663b

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/conda-package.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,27 +261,33 @@ jobs:
261261
miniforge-variant: Miniforge3
262262
miniforge-version: latest
263263
auto-update-conda: true
264-
conda-build-version: '*'
265264
activate-environment: ${{ env.TEST_ENV_NAME }}
266265
python-version: ${{ matrix.python }}
266+
267+
- name: Install conda-index
268+
run: conda install conda-index
269+
267270
- name: Create conda channel with the artifact bit
268271
shell: cmd /C CALL {0}
269272
run: |
270273
echo ${{ env.workdir }}
271274
mkdir ${{ env.workdir }}\channel\win-64
272275
move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
273-
dir ${{ env.workdir }}\channel\win-64
276+
dir ${{ env.workdir }}\channel\win-64\
277+
274278
- name: Index the channel
275279
shell: cmd /C CALL {0}
276-
run: conda index ${{ env.workdir }}\channel
280+
run: python -m conda_index ${{ env.workdir }}\channel
277281

278282
- name: Dump dpctl version info from created channel into ver.json
279283
shell: cmd /C CALL {0}
280284
run: |
281285
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
286+
282287
- name: Output content of produced ver.json
283288
shell: pwsh
284289
run: Get-Content -Path ${{ env.workdir }}\ver.json
290+
285291
- name: Collect dependencies
286292
shell: cmd /C CALL {0}
287293
run: |
@@ -293,9 +299,11 @@ jobs:
293299
SET PACKAGE_VERSION=%%F
294300
)
295301
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
302+
296303
- name: Display lockfile content
297304
shell: pwsh
298305
run: Get-Content -Path .\lockfile
306+
299307
- name: Cache conda packages
300308
uses: actions/cache@v4
301309
env:
@@ -307,9 +315,11 @@ jobs:
307315
restore-keys: |
308316
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
309317
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
318+
310319
- name: Install opencl_rt
311320
shell: cmd /C CALL {0}
312321
run: conda install -n ${{ env.TEST_ENV_NAME }} opencl_rt -c ${{ env.INTEL_CHANNEL }} --override-channels
322+
313323
- name: Install dpctl
314324
shell: cmd /C CALL {0}
315325
run: |
@@ -323,12 +333,14 @@ jobs:
323333
)
324334
SET TEST_DEPENDENCIES=pytest"<8" pytest-cov cython setuptools
325335
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
336+
326337
- name: Report content of test environment
327338
shell: cmd /C CALL {0}
328339
run: |
329340
echo "Value of CONDA enviroment variable was: " %CONDA%
330341
echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX%
331342
conda info && conda list -n ${{ env.TEST_ENV_NAME }}
343+
332344
- name: Configure Intel OpenCL CPU RT
333345
shell: pwsh
334346
run: |
@@ -337,23 +349,28 @@ jobs:
337349
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
338350
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
339351
Get-Content -Tail 5 -Path $cl_cfg
352+
340353
- name: Smoke test, step 1
341354
shell: cmd /C CALL {0}
342355
run: >-
343356
conda activate ${{ env.TEST_ENV_NAME }} && python -c "import sys; print(sys.executable)"
357+
344358
- name: Smoke test, step 2
345359
shell: cmd /C CALL {0}
346360
run: >-
347361
conda activate ${{ env.TEST_ENV_NAME }} && python -m dpctl -f
362+
348363
- name: Create empty temporary directory to run tests from
349364
shell: cmd /C CALL {0}
350365
# create temporary empty folder to runs tests from
351366
# https://github.com/pytest-dev/pytest/issues/11904
352367
run: >-
353368
mkdir "${{ env.workdir }}\test_tmp"
369+
354370
- name: List content of workdir folder
355371
shell: cmd /C CALL {0}
356372
run: dir "${{ env.workdir }}"
373+
357374
- name: Run tests
358375
shell: cmd /C CALL {0}
359376
env:

0 commit comments

Comments
 (0)