Skip to content

Commit 4bec34e

Browse files
Attempt to triage py38
1 parent e838d95 commit 4bec34e

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

.github/workflows/conda-package.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -193,20 +193,24 @@ 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+
miniconda-version: 'latest'
199+
activate-environment: "dpctl_test"
198200
- name: Install conda-build
201+
shell: cmd /C CALL {0}
199202
# Needed to be able to run conda index
200203
run: conda install conda-build
201204
- name: Create conda channel
205+
shell: cmd /C CALL {0}
202206
run: |
203207
echo ${{ env.workdir }}
204208
mkdir ${{ env.workdir }}\channel\win-64
205209
move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
206210
conda index ${{ env.workdir }}/channel
207211
# Test channel
208212
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
209-
more ${{ env.workdir }}\ver.json
213+
type ${{ env.workdir }}\ver.json
210214
- name: Collect dependencies
211215
shell: cmd /C CALL {0}
212216
run: |
@@ -219,7 +223,11 @@ jobs:
219223
SET PACKAGE_VERSION=%%F
220224
)
221225
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
222-
more lockfile
226+
- name: Display lockfile content
227+
shell: cmd /C CALL {0}
228+
run: |
229+
echo "Outputting content of lockfile:"
230+
type lockfile
223231
- name: Cache conda packages
224232
uses: actions/cache@v3
225233
env:
@@ -232,6 +240,7 @@ jobs:
232240
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
233241
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
234242
- name: Install opencl_rt
243+
shell: cmd /C CALL {0}
235244
run: conda install opencl_rt -c intel --override-channels
236245
- name: Install dpctl
237246
shell: cmd /C CALL {0}
@@ -243,12 +252,17 @@ jobs:
243252
SET PACKAGE_VERSION=%%F
244253
)
245254
conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
246-
REM Test installed packages
255+
- name: Report content of test environemtn
256+
shell: cmd /C CALL {0}
257+
run: |
258+
conda info
259+
echo "Value of CONDA enviroment variable was: " %CONDA%
247260
conda list
248261
- name: Add library
249262
shell: pwsh
250263
run: |
251-
echo "OCL_ICD_FILENAMES=C:\Miniconda\Library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
264+
$conda_env_library = $env:CONDA_PREFIX\Library
265+
echo "OCL_ICD_FILENAMES=$conda_env_library\lib\intelocl64.dll" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
252266
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
253267
if ($list.count -eq 0) {
254268
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos)) {
@@ -260,12 +274,12 @@ jobs:
260274
if (-not (Test-Path -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)) {
261275
New-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors
262276
}
263-
New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors -Name C:\Miniconda\Library\lib\intelocl64.dll -Value 0
277+
New-ItemProperty -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors -Name $conda_env_library\lib\intelocl64.dll -Value 0
264278
try {$list = Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors | Select-Object -ExpandProperty Property } catch {$list=@()}
265279
Write-Output $(Get-Item -Path HKLM:\SOFTWARE\Khronos\OpenCL\Vendors)
266280
# Now copy OpenCL.dll into system folder
267281
$system_ocl_icd_loader="C:\Windows\System32\OpenCL.dll"
268-
$python_ocl_icd_loader="C:\Miniconda\Library\bin\OpenCL.dll"
282+
$python_ocl_icd_loader="$conda_env_library\bin\OpenCL.dll"
269283
Copy-Item -Path $python_ocl_icd_loader -Destination $system_ocl_icd_loader
270284
if (Test-Path -Path $system_ocl_icd_loader) {
271285
Write-Output "$system_ocl_icd_loader has been copied"
@@ -275,12 +289,13 @@ jobs:
275289
Write-Output "OCL-ICD-Loader was not copied"
276290
}
277291
# 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
292+
$cl_cfg="$conda_env_library\lib\cl.cfg"
293+
(Get-Content $cl_cfg) -replace '^CL_CONFIG_TBB_DLL_PATH =', 'CL_CONFIG_TBB_DLL_PATH = $conda_env_library\bin' | Set-Content $cl_cfg
280294
}
281295
- name: Smoke test
282296
shell: cmd /C CALL {0}
283297
run: |
298+
python -c "import sys; print(sys.executable)"
284299
set SYCL_ENABLE_HOST_DEVICE=1
285300
python -c "import dpctl; dpctl.lsplatform()"
286301
python -c "import dpctl; print(dpctl.get_devices(backend='opencl', device_type='gpu'))"
@@ -289,6 +304,7 @@ jobs:
289304
shell: cmd /C CALL {0}
290305
run: |
291306
set SYCL_ENABLE_HOST_DEVICE=1
307+
python -c "import sys; print(sys.executable)"
292308
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
293309
294310
upload_linux:

0 commit comments

Comments
 (0)