|
12 | 12 | PACKAGE_NAME: dpctl |
13 | 13 | MODULE_NAME: dpctl |
14 | 14 | TEST_ENV_NAME: test_dpctl |
15 | | - VER_SCRIPT1: "import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); " |
16 | | - VER_SCRIPT2: "d = j['dpctl'][0]; print('='.join((d[s] for s in ('version', 'build'))))" |
| 15 | + VER_SCRIPT1: "import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); d = j['dpctl'][0];" |
| 16 | + VER_SCRIPT2: "print('='.join((d[s] for s in ('version', 'build'))))" |
| 17 | + VER_SCRIPT3: "print(' '.join(map(lambda s: chr(34) + s + chr(34), [comp for comp in d['depends'] if 'dpcpp' in comp][1:])))" |
17 | 18 | INTEL_CHANNEL: "https://software.repos.intel.com/python/conda/" |
18 | 19 |
|
19 | 20 | jobs: |
|
25 | 26 | matrix: |
26 | 27 | python: ['3.9', '3.10', '3.11', '3.12'] |
27 | 28 | steps: |
28 | | - - uses: actions/[email protected].1 |
| 29 | + - uses: actions/[email protected].2 |
29 | 30 | with: |
30 | 31 | fetch-depth: 0 |
31 | 32 |
|
|
81 | 82 | matrix: |
82 | 83 | python: ['3.9', '3.10', '3.11', '3.12'] |
83 | 84 | steps: |
84 | | - - uses: actions/[email protected].1 |
| 85 | + - uses: actions/[email protected].2 |
85 | 86 | with: |
86 | 87 | fetch-depth: 0 |
87 | 88 |
|
@@ -363,7 +364,11 @@ jobs: |
363 | 364 | shell: pwsh |
364 | 365 | run: | |
365 | 366 | $script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1" |
366 | | - &$script_path |
| 367 | + if (Test-Path $script_path) { |
| 368 | + &$script_path |
| 369 | + } else { |
| 370 | + Write-Warning "File $script_path was NOT found!" |
| 371 | + } |
367 | 372 | # Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default |
368 | 373 | $cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg" |
369 | 374 | Get-Content -Tail 5 -Path $cl_cfg |
@@ -501,7 +506,7 @@ jobs: |
501 | 506 | # Needed to be able to run conda index |
502 | 507 | run: conda install conda-index -c conda-forge --override-channels |
503 | 508 | - name: Checkout dpctl repo |
504 | | - |
| 509 | + |
505 | 510 | with: |
506 | 511 | fetch-depth: 0 |
507 | 512 | - name: Download artifact |
@@ -540,18 +545,28 @@ jobs: |
540 | 545 | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- |
541 | 546 | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- |
542 | 547 | - name: Install example requirements |
543 | | - shell: bash -l {0} |
| 548 | + shell: bash -ex -l {0} |
544 | 549 | env: |
545 | | - DPCPP_CMPLR: dpcpp_linux-64">=2024.2" |
| 550 | + DPCPP_CMPLR: "dpcpp_linux-64>=2024.2" |
546 | 551 | run: | |
547 | 552 | CHANNELS="${{ env.CHANNELS }}" |
548 | 553 | . $CONDA/etc/profile.d/conda.sh |
549 | | - conda create -n ${{ env.EXAMPLES_ENV_NAME }} -y pytest python=${{ matrix.python }} setuptools"<72.2.0" $CHANNELS |
550 | | - conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y cmake $CHANNELS || exit 1 |
551 | | - conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y ninja $CHANNELS || exit 1 |
| 554 | + DPCTL_DEPENDS="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT3}")" |
| 555 | + echo "Dpctl dependencies: ${DPCTL_DEPENDS}" |
| 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" |
552 | 560 | conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y pybind11 cython scikit-build $CHANNELS || exit 1 |
553 | | - conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y mkl-dpcpp mkl-devel-dpcpp dpcpp_cpp_rt $CHANNELS || exit 1 |
554 | | - conda create -y -n ${{ env.BUILD_ENV_NAME }} $CHANNELS gcc_linux-64 gxx_linux-64 ${{ env.DPCPP_CMPLR }} sysroot_linux-64">=2.28" |
| 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" |
555 | 570 | - name: Install dpctl |
556 | 571 | shell: bash -l {0} |
557 | 572 | run: | |
@@ -651,7 +666,7 @@ jobs: |
651 | 666 | run: | |
652 | 667 | echo ${{ env.CHANNELS }} |
653 | 668 | - name: Checkout dpctl repo |
654 | | - |
| 669 | + |
655 | 670 | with: |
656 | 671 | fetch-depth: 0 |
657 | 672 | - name: Cache array API tests |
@@ -795,7 +810,7 @@ jobs: |
795 | 810 | run: conda install anaconda-client -c conda-forge --override-channels |
796 | 811 |
|
797 | 812 | - name: Checkout repo |
798 | | - |
| 813 | + |
799 | 814 | with: |
800 | 815 | repository: IntelPython/devops-tools |
801 | 816 | fetch-depth: 0 |
|
0 commit comments