Skip to content

Commit 06fb456

Browse files
committed
add standard clang workflow and update clang workflow
1 parent 8f2a4db commit 06fb456

2 files changed

Lines changed: 70 additions & 8 deletions

File tree

.github/workflows/build-with-clang.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
python: ["3.10", "3.11", "3.12", "3.13"]
18+
numpy_version: ["numpy'>=2'"]
1819

1920
env:
2021
ONEAPI_ROOT: /opt/intel/oneapi
@@ -40,7 +41,6 @@ jobs:
4041
- name: Install Intel OneAPI
4142
run: |
4243
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
43-
sudo apt-get install intel-oneapi-tbb
4444
sudo apt-get install intel-oneapi-mkl-devel
4545
4646
- name: Setup Python
@@ -55,12 +55,9 @@ jobs:
5555
fetch-depth: 0
5656

5757
- name: Install mkl-service dependencies
58-
uses: BSFishy/pip-action@8f2d471d809dc20b6ada98c91910b6ae6243f318 # v1
59-
with:
60-
packages: |
61-
cython
62-
setuptools>=77
63-
pytest
58+
run: |
59+
pip install meson-python cython mkl
60+
pip install ${{ matrix.numpy_version }}
6461
6562
- name: List oneAPI folder content
6663
run: ls ${{ env.ONEAPI_ROOT }}/compiler
@@ -71,9 +68,10 @@ jobs:
7168
echo "$CMPLR_ROOT"
7269
export CC="$CMPLR_ROOT/bin/icx"
7370
export CFLAGS="${CFLAGS} -fno-fast-math"
74-
python setup.py develop
71+
pip install . --no-build-isolation --no-deps --verbose
7572
7673
- name: Run mkl-service tests
7774
run: |
7875
source ${{ env.ONEAPI_ROOT }}/setvars.sh
76+
pip install pytest
7977
pytest -s -v --pyargs mkl
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build project with standard clang compiler
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
permissions: read-all
9+
10+
jobs:
11+
build-with-standard-clang:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
17+
numpy_version: ["numpy'>=2'"]
18+
19+
env:
20+
COMPILER_ROOT: /usr/bin
21+
22+
defaults:
23+
run:
24+
shell: bash -el {0}
25+
26+
steps:
27+
- name: Cancel Previous Runs
28+
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
29+
with:
30+
access_token: ${{ github.token }}
31+
32+
- name: Install Dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y clang
36+
37+
- name: Setup Python
38+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
39+
with:
40+
python-version: ${{ matrix.python }}
41+
architecture: x64
42+
43+
- name: Checkout repo
44+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45+
with:
46+
fetch-depth: 0
47+
48+
- name: Install mkl-service dependencies
49+
run: |
50+
pip install meson-python cython mkl
51+
pip install ${{ matrix.numpy_version }}
52+
53+
- name: Build mkl-service
54+
run: |
55+
export CC=${{ env.COMPILER_ROOT }}/clang
56+
pip install . --no-build-isolation --no-deps --verbose
57+
58+
- name: Run mkl-service tests
59+
run: |
60+
pip install pytest
61+
# mkl-service cannot be installed in editable mode, we need
62+
# to change directory before importing it and running tests
63+
cd ..
64+
pytest -s -v --pyargs mkl

0 commit comments

Comments
 (0)