Skip to content

Commit 885095e

Browse files
Attempt to triage py38
1 parent e838d95 commit 885095e

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

.github/workflows/conda-package.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,20 +193,23 @@ jobs:
193193
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
194194
- uses: conda-incubator/setup-miniconda@v2
195195
with:
196-
auto-activate-base: true
197-
activate-environment: ""
196+
use-only-tar-bz2: true
197+
auto-update-conda: true
198+
activate-environment: "dpctl_test"
198199
- name: Install conda-build
200+
shell: cmd /C CALL {0}
199201
# Needed to be able to run conda index
200202
run: conda install conda-build
201203
- name: Create conda channel
204+
shell: cmd /C CALL {0}
202205
run: |
203206
echo ${{ env.workdir }}
204207
mkdir ${{ env.workdir }}\channel\win-64
205208
move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
206209
conda index ${{ env.workdir }}/channel
207210
# Test channel
208211
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
209-
more ${{ env.workdir }}\ver.json
212+
type ${{ env.workdir }}\ver.json
210213
- name: Collect dependencies
211214
shell: cmd /C CALL {0}
212215
run: |
@@ -219,7 +222,11 @@ jobs:
219222
SET PACKAGE_VERSION=%%F
220223
)
221224
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
222-
more lockfile
225+
- name: Display lockfile content
226+
shell: cmd /C CALL {0}
227+
run: |
228+
echo "Outputting content of lockfile:"
229+
type lockfile
223230
- name: Cache conda packages
224231
uses: actions/cache@v3
225232
env:
@@ -232,6 +239,7 @@ jobs:
232239
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
233240
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
234241
- name: Install opencl_rt
242+
shell: cmd /C CALL {0}
235243
run: conda install opencl_rt -c intel --override-channels
236244
- name: Install dpctl
237245
shell: cmd /C CALL {0}
@@ -243,12 +251,17 @@ jobs:
243251
SET PACKAGE_VERSION=%%F
244252
)
245253
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
246-
REM Test installed packages
254+
- name: Report content of test environemtn
255+
shell: cmd /C CALL {0}
256+
run: |
257+
conda info
258+
echo "Value of CONDA enviroment variable was: " %CONDA%
247259
conda list
248260
- name: Add library
249261
shell: pwsh
250262
run: |
251-
echo "OCL_ICD_FILENAMES=C:\Miniconda\Library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
263+
$conda_env_library = $env:CONDA_PREFIX\Library
264+
echo "OCL_ICD_FILENAMES=$conda_env_library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
252265
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
253266
if ($list.count -eq 0) {
254267
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos)) {
@@ -260,12 +273,12 @@ jobs:
260273
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)) {
261274
New-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors
262275
}
263-
New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors -Name C:\Miniconda\Library\lib\intelocl64.dll -Value 0
276+
New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors -Name $conda_env_library\lib\intelocl64.dll -Value 0
264277
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
265278
Write-Output $(Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)
266279
# Now copy OpenCL.dll into system folder
267280
$system_ocl_icd_loader="C:\Windows\System32\OpenCL.dll"
268-
$python_ocl_icd_loader="C:\Miniconda\Library\bin\OpenCL.dll"
281+
$python_ocl_icd_loader="$conda_env_library\bin\OpenCL.dll"
269282
Copy-Item -Path $python_ocl_icd_loader -Destination $system_ocl_icd_loader
270283
if (Test-Path -Path $system_ocl_icd_loader) {
271284
Write-Output "$system_ocl_icd_loader has been copied"
@@ -275,12 +288,13 @@ jobs:
275288
Write-Output "OCL-ICD-Loader was not copied"
276289
}
277290
# Variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
278-
$cl_cfg="C:\Miniconda\Library\lib\cl.cfg"
279-
(Get-Content $cl_cfg) -replace '^CL_CONFIG_TBB_DLL_PATH =', 'CL_CONFIG_TBB_DLL_PATH = C:\Miniconda\Library\bin' | Set-Content $cl_cfg
291+
$cl_cfg="$conda_env_library\lib\cl.cfg"
292+
(Get-Content $cl_cfg) -replace '^CL_CONFIG_TBB_DLL_PATH =', 'CL_CONFIG_TBB_DLL_PATH = $conda_env_library\bin' | Set-Content $cl_cfg
280293
}
281294
- name: Smoke test
282295
shell: cmd /C CALL {0}
283296
run: |
297+
python -c "import sys; print(sys.executable)"
284298
set SYCL_ENABLE_HOST_DEVICE=1
285299
python -c "import dpctl; dpctl.lsplatform()"
286300
python -c "import dpctl; print(dpctl.get_devices(backend='opencl', device_type='gpu'))"
@@ -289,6 +303,7 @@ jobs:
289303
shell: cmd /C CALL {0}
290304
run: |
291305
set SYCL_ENABLE_HOST_DEVICE=1
306+
python -c "import sys; print(sys.executable)"
292307
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
293308
294309
upload_linux:

0 commit comments

Comments
 (0)