diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index ed362aaefa..b3bac5b051 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -14,7 +14,7 @@ env: TEST_ENV_NAME: test_dpctl VER_SCRIPT1: "import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); d = j['dpctl'][0];" VER_SCRIPT2: "print('='.join((d[s] for s in ('version', 'build'))))" - VER_SCRIPT3: "print(' '.join(d['depends']))" + VER_SCRIPT3: "print(' '.join(map(lambda s: chr(34) + s + chr(34), [comp for comp in d['depends'] if 'dpcpp' in comp])))" INTEL_CHANNEL: "https://software.repos.intel.com/python/conda/" jobs: @@ -364,7 +364,11 @@ jobs: shell: pwsh run: | $script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1" - &$script_path + if (Test-Path $script_path) { + &$script_path + } else { + Write-Warning "File $script_path was NOT found!" + } # Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default $cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg" Get-Content -Tail 5 -Path $cl_cfg @@ -541,20 +545,28 @@ jobs: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- - name: Install example requirements - shell: bash -l {0} + shell: bash -ex -l {0} env: - DPCPP_CMPLR: dpcpp_linux-64">=2024.2" + DPCPP_CMPLR: "dpcpp_linux-64>=2024.2" run: | CHANNELS="${{ env.CHANNELS }}" . $CONDA/etc/profile.d/conda.sh - export DPCTL_DEPENDS=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT3}") + DPCTL_DEPENDS="\"$(python -c "${VER_SCRIPT1} ${VER_SCRIPT3}")\"" echo "Dpctl dependencies: ${DPCTL_DEPENDS}" - conda create -n ${{ env.EXAMPLES_ENV_NAME }} -y pytest python=${{ matrix.python }} setuptools"<72.2.0" $DPCTL_DEPENDS $CHANNELS - conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y cmake $DPCTL_DEPENDS $CHANNELS || exit 1 - conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y ninja $DPCTL_DEPENDS $CHANNELS || exit 1 - conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y pybind11 cython scikit-build $DPCTL_DEPENDS $CHANNELS || exit 1 - conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y mkl-dpcpp mkl-devel-dpcpp dpcpp_cpp_rt $DPCTL_DEPENDS $CHANNELS || exit 1 - 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" + conda create -n ${{ env.EXAMPLES_ENV_NAME }} -y pytest python=${{ matrix.python }} "setuptools<72.2.0" $CHANNELS + echo "Environment created" + conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y cmake ninja $CHANNELS || exit 1 + echo "Cmake and Ninja installed" + conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y pybind11 cython scikit-build $CHANNELS || exit 1 + echo "scikit-build installed" + conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y mkl-dpcpp \ + mkl-devel-dpcpp dpcpp_cpp_rt "${DPCTL_DEPENDS}" \ + $CHANNELS || exit 1 + echo "IPL installed" + 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" + echo "Compiler installed" - name: Install dpctl shell: bash -l {0} run: |