-
Notifications
You must be signed in to change notification settings - Fork 38
77 lines (62 loc) · 2.16 KB
/
build-with-clang.yml
File metadata and controls
77 lines (62 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build project with IntelLLVM clang compiler
on:
push:
branches:
- master
pull_request:
permissions: read-all
jobs:
build-with-clang:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10", "3.11", "3.12", "3.13"]
numpy_version: ["numpy'>=2'"]
env:
ONEAPI_ROOT: /opt/intel/oneapi
defaults:
run:
shell: bash -el {0}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
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-mkl-devel
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Install mkl-service dependencies
run: |
pip install meson-python cython cmake ninja mkl
pip install ${{ matrix.numpy_version }}
- name: List oneAPI folder content
run: ls ${{ env.ONEAPI_ROOT }}/compiler
- name: Build mkl-service
run: |
source ${{ env.ONEAPI_ROOT }}/setvars.sh
echo "$CMPLR_ROOT"
export CC="$CMPLR_ROOT/bin/icx"
export CFLAGS="${CFLAGS} -fno-fast-math"
pip install . --no-build-isolation --no-deps --verbose
- name: Run mkl-service tests
run: |
source ${{ env.ONEAPI_ROOT }}/setvars.sh
pip install pytest
pytest -s -v --pyargs mkl