Skip to content

Commit 01a95f9

Browse files
committed
Install OneAPI compiler for coverage GH action
1 parent 35f04f3 commit 01a95f9

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

.github/workflows/generate_coverage.yaml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121

2222
env:
2323
python-ver: '3.10'
24-
CHANNELS: '-c dppy/label/coverage -c intel -c conda-forge --override-channels'
24+
CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
25+
# Install the latest oneAPI compiler to work around an issue
26+
INSTALL_ONE_API: 'yes'
2527

2628
steps:
2729
- name: Cancel Previous Runs
@@ -34,6 +36,26 @@ jobs:
3436
with:
3537
fetch-depth: 0
3638

39+
- name: Add Intel repository
40+
if: env.INSTALL_ONE_API == 'yes'
41+
run: |
42+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
43+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
44+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
45+
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
46+
sudo apt-get update
47+
48+
- name: Install latest Intel OneAPI
49+
if: env.INSTALL_ONE_API == 'yes'
50+
run: |
51+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
52+
sudo apt-get install intel-oneapi-mkl-devel
53+
sudo apt-get install intel-oneapi-tbb-devel
54+
55+
- name: Install Lcov
56+
run: |
57+
sudo apt-get install lcov
58+
3759
- name: Setup miniconda
3860
uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3
3961
with:
@@ -42,14 +64,17 @@ jobs:
4264
miniconda-version: 'latest'
4365
activate-environment: 'coverage'
4466

45-
- name: Install Lcov
67+
- name: Install dpnp dependencies
68+
if: env.INSTALL_ONE_API == 'yes'
4669
run: |
47-
sudo apt-get install lcov
70+
conda install cython llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
71+
dpctl">=0.17.0dev0" onedpl-devel ${{ env.CHANNELS }}
4872
4973
- name: Install dpnp dependencies
74+
if: env.INSTALL_ONE_API != 'yes'
5075
run: |
5176
conda install cython llvm cmake">=3.21" scikit-build ninja pytest pytest-cov coverage[toml] \
52-
dpctl">=0.17.0dev0" dpctl dpcpp_linux-64 mkl-devel-dpcpp tbb-devel onedpl-devel ${{ env.CHANNELS }}
77+
dpctl">=0.17.0dev0" dpcpp_linux-64 mkl-devel-dpcpp tbb-devel onedpl-devel ${{ env.CHANNELS }}
5378
5479
- name: Conda info
5580
run: |
@@ -67,6 +92,7 @@ jobs:
6792
command: |
6893
. $CONDA/etc/profile.d/conda.sh
6994
conda activate coverage
95+
[ -f /opt/intel/oneapi/setvars.sh ] && source /opt/intel/oneapi/setvars.sh
7096
git clean -fxd
7197
python scripts/gen_coverage.py --pytest-opts="--ignore tests/test_random.py"
7298

0 commit comments

Comments
 (0)