Skip to content

Commit

Permalink
Added workflow to build dpctl with oneAPI's clang/clang++
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Sep 14, 2023
1 parent 57442a1 commit f358c19
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build-with-clang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build mkl_random with clang
on:
pull_request:
push:
branches: [master]

jobs:
generate-coverage:
name: Generate coverage and push to Coveralls.io
runs-on: ubuntu-20.04

env:
ONEAPI_ROOT: /opt/intel/oneapi

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Add Intel repository
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
- name: Install Intel OneAPI
run: |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
sudo apt-get install intel-oneapi-tbb
sudo apt-get install intel-oneapi-mkl-devel
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64

- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install mkl_random dependencies
shell: bash -l {0}
run: |
pip install numpy cython setuptools pytest pytest-cov
- name: List oneAPI folder content
shell: bash -l {0}
run: ls /opt/intel/oneapi

- name: Build mkl_random
shell: bash -l {0}
run: |
source /opt/intel/oneapi/setvars.sh
echo $CMPLR_ROOT
export CC=$CMPLR_ROOT/bin-llvm/clang
export CXX=$CMPLR_ROOT/bin-llvm/clang++
echo "CC = ${CC} CXX=${CXX}"
python setup.py develop
- name: Run mkl_random tests
shell: bash -l {0}
run: |
source /opt/intel/oneapi/setvars.sh
pytest -s -v --pyargs mkl_random

0 comments on commit f358c19

Please sign in to comment.