Skip to content

Commit f358c19

Browse files
Added workflow to build dpctl with oneAPI's clang/clang++
1 parent 57442a1 commit f358c19

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build mkl_random with clang
2+
on:
3+
pull_request:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
generate-coverage:
9+
name: Generate coverage and push to Coveralls.io
10+
runs-on: ubuntu-20.04
11+
12+
env:
13+
ONEAPI_ROOT: /opt/intel/oneapi
14+
15+
steps:
16+
- name: Cancel Previous Runs
17+
uses: styfle/[email protected]
18+
with:
19+
access_token: ${{ github.token }}
20+
21+
- name: Add Intel repository
22+
run: |
23+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
24+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
25+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
26+
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
27+
sudo apt-get update
28+
29+
- name: Install Intel OneAPI
30+
run: |
31+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
32+
sudo apt-get install intel-oneapi-tbb
33+
sudo apt-get install intel-oneapi-mkl-devel
34+
35+
- name: Setup Python
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: '3.11'
39+
architecture: x64
40+
41+
- name: Checkout repo
42+
uses: actions/checkout@v3
43+
with:
44+
fetch-depth: 0
45+
46+
- name: Install mkl_random dependencies
47+
shell: bash -l {0}
48+
run: |
49+
pip install numpy cython setuptools pytest pytest-cov
50+
51+
- name: List oneAPI folder content
52+
shell: bash -l {0}
53+
run: ls /opt/intel/oneapi
54+
55+
- name: Build mkl_random
56+
shell: bash -l {0}
57+
run: |
58+
source /opt/intel/oneapi/setvars.sh
59+
echo $CMPLR_ROOT
60+
export CC=$CMPLR_ROOT/bin-llvm/clang
61+
export CXX=$CMPLR_ROOT/bin-llvm/clang++
62+
echo "CC = ${CC} CXX=${CXX}"
63+
python setup.py develop
64+
65+
- name: Run mkl_random tests
66+
shell: bash -l {0}
67+
run: |
68+
source /opt/intel/oneapi/setvars.sh
69+
pytest -s -v --pyargs mkl_random

0 commit comments

Comments
 (0)