Skip to content

Commit 05fade9

Browse files
Use Miniforge, use conda-forge
Remove auto-update-code from setup-miniconda step. Create channel directory, then channel\win-64 directory.
1 parent f0f7837 commit 05fade9

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

.github/workflows/conda-package.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,38 +249,63 @@ jobs:
249249
shell: pwsh
250250
run: |
251251
echo "CHANNELS=-c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels" >> $env:GITHUB_ENV
252+
252253
- name: Display channels line
253254
run: |
254255
echo ${{ env.CHANNELS }}
256+
255257
- name: Download artifact
256258
uses: actions/download-artifact@v4
257259
with:
258260
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
261+
259262
- uses: conda-incubator/setup-miniconda@v3
260263
with:
261-
auto-update-conda: true
262-
conda-build-version: '*'
263-
miniconda-version: 'latest'
264+
miniforge-version: latest
265+
channels: conda-forge,nodefaults
264266
activate-environment: ${{ env.TEST_ENV_NAME }}
265267
python-version: ${{ matrix.python }}
268+
269+
- name: Remove defaults channel
270+
run: conda config --remove channels defaults
271+
272+
- name: Install conda-index
273+
run: |
274+
conda install -n base conda-index
275+
266276
- name: Create conda channel with the artifact bit
267277
shell: cmd /C CALL {0}
268278
run: |
279+
@echo on
269280
echo ${{ env.workdir }}
281+
mkdir ${{ env.workdir }}\channel
270282
mkdir ${{ env.workdir }}\channel\win-64
271283
move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
272-
dir ${{ env.workdir }}\channel\win-64
284+
dir ${{ env.workdir }}\channel\win-64\
285+
273286
- name: Index the channel
274287
shell: cmd /C CALL {0}
275-
run: conda index ${{ env.workdir }}\channel
288+
run: |
289+
@echo on
290+
conda index ${{ env.workdir }}\channel
291+
292+
- name: List content of the channels
293+
shell: cmd /C CALL {0}
294+
run: |
295+
dir ${{ env.workdir }}\channel
296+
dir ${{ env.workdir }}\channel\win-64
276297
277298
- name: Dump dpctl version info from created channel into ver.json
278299
shell: cmd /C CALL {0}
279300
run: |
301+
@echo on
280302
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
303+
dir ${{ env.workdir }}
304+
281305
- name: Output content of produced ver.json
282306
shell: pwsh
283307
run: Get-Content -Path ${{ env.workdir }}\ver.json
308+
284309
- name: Collect dependencies
285310
shell: cmd /C CALL {0}
286311
run: |
@@ -292,9 +317,11 @@ jobs:
292317
SET PACKAGE_VERSION=%%F
293318
)
294319
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
320+
295321
- name: Display lockfile content
296322
shell: pwsh
297323
run: Get-Content -Path .\lockfile
324+
298325
- name: Cache conda packages
299326
uses: actions/cache@v4
300327
env:
@@ -306,9 +333,11 @@ jobs:
306333
restore-keys: |
307334
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
308335
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
336+
309337
- name: Install opencl_rt
310338
shell: cmd /C CALL {0}
311339
run: conda install -n ${{ env.TEST_ENV_NAME }} opencl_rt -c ${{ env.INTEL_CHANNEL }} --override-channels
340+
312341
- name: Install dpctl
313342
shell: cmd /C CALL {0}
314343
run: |
@@ -322,12 +351,14 @@ jobs:
322351
)
323352
SET TEST_DEPENDENCIES=pytest"<8" pytest-cov cython setuptools
324353
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
354+
325355
- name: Report content of test environment
326356
shell: cmd /C CALL {0}
327357
run: |
328358
echo "Value of CONDA enviroment variable was: " %CONDA%
329359
echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX%
330360
conda info && conda list -n ${{ env.TEST_ENV_NAME }}
361+
331362
- name: Configure Intel OpenCL CPU RT
332363
shell: pwsh
333364
run: |
@@ -336,23 +367,28 @@ jobs:
336367
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
337368
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
338369
Get-Content -Tail 5 -Path $cl_cfg
370+
339371
- name: Smoke test, step 1
340372
shell: cmd /C CALL {0}
341373
run: >-
342374
conda activate ${{ env.TEST_ENV_NAME }} && python -c "import sys; print(sys.executable)"
375+
343376
- name: Smoke test, step 2
344377
shell: cmd /C CALL {0}
345378
run: >-
346379
conda activate ${{ env.TEST_ENV_NAME }} && python -m dpctl -f
380+
347381
- name: Create empty temporary directory to run tests from
348382
shell: cmd /C CALL {0}
349383
# create temporary empty folder to runs tests from
350384
# https://github.com/pytest-dev/pytest/issues/11904
351385
run: >-
352386
mkdir "${{ env.workdir }}\test_tmp"
387+
353388
- name: List content of workdir folder
354389
shell: cmd /C CALL {0}
355390
run: dir "${{ env.workdir }}"
391+
356392
- name: Run tests
357393
shell: cmd /C CALL {0}
358394
env:

0 commit comments

Comments
 (0)