Skip to content

Commit d736961

Browse files
authored
Merge pull request #1884 from IntelPython/update-coverage-workflow-for-2025
Update generate-coverage workflow to work with oneAPI 2025
2 parents 212fdd5 + 938dd00 commit d736961

File tree

3 files changed

+48
-32
lines changed

3 files changed

+48
-32
lines changed

.github/workflows/conda-package.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ env:
1212
PACKAGE_NAME: dpctl
1313
MODULE_NAME: dpctl
1414
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:])))"
1718
INTEL_CHANNEL: "https://software.repos.intel.com/python/conda/"
1819

1920
jobs:
@@ -363,7 +364,11 @@ jobs:
363364
shell: pwsh
364365
run: |
365366
$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+
}
367372
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
368373
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
369374
Get-Content -Tail 5 -Path $cl_cfg
@@ -540,18 +545,28 @@ jobs:
540545
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
541546
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
542547
- name: Install example requirements
543-
shell: bash -l {0}
548+
shell: bash -ex -l {0}
544549
env:
545-
DPCPP_CMPLR: dpcpp_linux-64">=2024.2"
550+
DPCPP_CMPLR: "dpcpp_linux-64>=2024.2"
546551
run: |
547552
CHANNELS="${{ env.CHANNELS }}"
548553
. $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"
552560
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"
555570
- name: Install dpctl
556571
shell: bash -l {0}
557572
run: |

.github/workflows/generate-coverage.yaml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
env:
1818
ONEAPI_ROOT: /opt/intel/oneapi
1919
GTEST_ROOT: /home/runner/work/googletest-1.15.2/install
20-
# Use oneAPI compiler 2023 to work around an issue
21-
USE_2023: 0
2220

2321
steps:
2422
- name: Cancel Previous Runs
@@ -28,23 +26,23 @@ jobs:
2826

2927
- name: Add Intel repository
3028
run: |
31-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
32-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
33-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
34-
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
35-
sudo apt-get update
36-
37-
- name: Install Intel OneAPI 2023
38-
if: env.USE_2023 == '1'
39-
run: |
40-
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-2023.2.1
41-
sudo apt-get install intel-oneapi-tbb-2021.10.0
29+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
30+
cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
31+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
32+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
33+
sudo apt update
4234
4335
- name: Install latest Intel OneAPI
44-
if: env.USE_2023 != '1'
4536
run: |
46-
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
47-
sudo apt-get install intel-oneapi-tbb
37+
sudo apt install intel-oneapi-compiler-dpcpp-cpp
38+
sudo apt install intel-oneapi-tbb
39+
sudo apt install intel-oneapi-umf
40+
sudo apt install hwloc
41+
42+
- name: Run SYCL list
43+
run: |
44+
source /opt/intel/oneapi/setvars.sh
45+
sycl-ls --verbose
4846
4947
- name: Install CMake and Ninja
5048
run: |

.github/workflows/generate-docs.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,18 @@ jobs:
2424
- name: Add Intel repository
2525
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
2626
run: |
27-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
28-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
29-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
30-
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
31-
sudo apt-get update
27+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
28+
cat GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
29+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
30+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
31+
sudo apt update
3232
- name: Install Intel OneAPI
3333
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
3434
run: |
35-
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
35+
sudo apt install intel-oneapi-compiler-dpcpp-cpp
36+
sudo apt install intel-oneapi-tbb
37+
sudo apt install intel-oneapi-umf
38+
sudo apt install hwloc
3639
- name: Install Lua
3740
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
3841
run: |

0 commit comments

Comments
 (0)