Skip to content

Commit

Permalink
Test_windows step to check if script exists before attempting to run it
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Oct 30, 2024
1 parent 242f03d commit 34aaaad
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit 34aaaad

Please sign in to comment.