Skip to content

Commit 840b260

Browse files
Coverage action to run on DPC++ 2023.2.1
1 parent 471f6e1 commit 840b260

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/generate-coverage.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
env:
1313
ONEAPI_ROOT: /opt/intel/oneapi
1414
GTEST_ROOT: /home/runner/work/googletest-1.13.0/install
15+
# Use oneAPI compiler 2023 to work around an issue
16+
USE_2023: 1
1517

1618
steps:
1719
- name: Cancel Previous Runs
@@ -27,11 +29,18 @@ jobs:
2729
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
2830
sudo apt-get update
2931
30-
- name: Install Intel OneAPI
32+
- name: Install Intel OneAPI 2023
33+
if: env.USE_2023 == '1'
3134
run: |
3235
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-2023.2.1
3336
sudo apt-get install intel-oneapi-tbb-2021.10.0
3437
38+
- name: Install latest Intel OneAPI
39+
if: env.USE_2023 != '1'
40+
run: |
41+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
42+
sudo apt-get install intel-oneapi-tbb
43+
3544
- name: Install CMake and Ninja
3645
run: |
3746
sudo apt-get install ninja-build
@@ -81,7 +90,19 @@ jobs:
8190
run: |
8291
pip install numpy"<1.26.0" cython setuptools pytest pytest-cov scikit-build cmake coverage[toml]
8392
84-
- name: Build dpctl with coverage
93+
- name: Build dpctl with coverage for oneAPI 2023
94+
if: env.USE_2023 == '1'
95+
shell: bash -l {0}
96+
run: |
97+
source /opt/intel/oneapi/setvars.sh
98+
export ARGS="--compiler-root ${CMPLR_ROOT}"
99+
export ARGS="${ARGS} --c-compiler ${CMPLR_ROOT}/linux/bin/icx"
100+
export ARGS="${ARGS} --cxx-compiler ${CMPLR_ROOT}/linux/bin/icpx"
101+
export ARGS="${ARGS} --bin-llvm ${CMPLR_ROOT}/linux/bin-llvm"
102+
python scripts/gen_coverage.py ${ARGS}
103+
104+
- name: Build dpctl with coverage for default oneAPI
105+
if: env.USE_2023 != '1'
85106
shell: bash -l {0}
86107
run: |
87108
source /opt/intel/oneapi/setvars.sh

0 commit comments

Comments
 (0)