Skip to content

Commit 938dd00

Browse files
Test_windows step to check if script exists before attempting to run it
1 parent 242f03d commit 938dd00

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

.github/workflows/conda-package.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
TEST_ENV_NAME: test_dpctl
1515
VER_SCRIPT1: "import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); d = j['dpctl'][0];"
1616
VER_SCRIPT2: "print('='.join((d[s] for s in ('version', 'build'))))"
17-
VER_SCRIPT3: "print(' '.join(d['depends']))"
17+
VER_SCRIPT3: "print(' '.join(map(lambda s: chr(34) + s + chr(34), [comp for comp in d['depends'] if 'dpcpp' in comp][1:])))"
1818
INTEL_CHANNEL: "https://software.repos.intel.com/python/conda/"
1919

2020
jobs:
@@ -364,7 +364,11 @@ jobs:
364364
shell: pwsh
365365
run: |
366366
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
367-
&$script_path
367+
if (Test-Path $script_path) {
368+
&$script_path
369+
} else {
370+
Write-Warning "File $script_path was NOT found!"
371+
}
368372
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
369373
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
370374
Get-Content -Tail 5 -Path $cl_cfg
@@ -541,20 +545,28 @@ jobs:
541545
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
542546
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
543547
- name: Install example requirements
544-
shell: bash -l {0}
548+
shell: bash -ex -l {0}
545549
env:
546-
DPCPP_CMPLR: dpcpp_linux-64">=2024.2"
550+
DPCPP_CMPLR: "dpcpp_linux-64>=2024.2"
547551
run: |
548552
CHANNELS="${{ env.CHANNELS }}"
549553
. $CONDA/etc/profile.d/conda.sh
550-
export DPCTL_DEPENDS=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT3}")
554+
DPCTL_DEPENDS="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT3}")"
551555
echo "Dpctl dependencies: ${DPCTL_DEPENDS}"
552-
conda create -n ${{ env.EXAMPLES_ENV_NAME }} -y pytest python=${{ matrix.python }} setuptools"<72.2.0" $DPCTL_DEPENDS $CHANNELS
553-
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y cmake $DPCTL_DEPENDS $CHANNELS || exit 1
554-
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y ninja $DPCTL_DEPENDS $CHANNELS || exit 1
555-
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y pybind11 cython scikit-build $DPCTL_DEPENDS $CHANNELS || exit 1
556-
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y mkl-dpcpp mkl-devel-dpcpp dpcpp_cpp_rt $DPCTL_DEPENDS $CHANNELS || exit 1
557-
conda create -y -n ${{ env.BUILD_ENV_NAME }} $CHANNELS gcc_linux-64 gxx_linux-64 ${{ env.DPCPP_CMPLR }} $DPCTL_DEPENDS sysroot_linux-64">=2.28"
556+
conda create -n ${{ env.EXAMPLES_ENV_NAME }} -y pytest python=${{ matrix.python }} "setuptools<72.2.0" $CHANNELS
557+
echo "Environment created"
558+
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y cmake ninja $CHANNELS || exit 1
559+
echo "Cmake and Ninja installed"
560+
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y pybind11 cython scikit-build $CHANNELS || exit 1
561+
echo "scikit-build installed"
562+
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y mkl-dpcpp \
563+
mkl-devel-dpcpp dpcpp_cpp_rt "${DPCTL_DEPENDS}" \
564+
$CHANNELS || exit 1
565+
echo "IPL installed"
566+
conda create -y -n ${{ env.BUILD_ENV_NAME }} $CHANNELS gcc_linux-64 gxx_linux-64 \
567+
${{ env.DPCPP_CMPLR }} "${DPCTL_DEPENDS}" \
568+
"sysroot_linux-64>=2.28"
569+
echo "Compiler installed"
558570
- name: Install dpctl
559571
shell: bash -l {0}
560572
run: |

0 commit comments

Comments
 (0)