Skip to content

Commit fe20347

Browse files
authored
add python matrix in build with clang (#64)
* add python matrix to build with clang * address comments
1 parent 1210461 commit fe20347

File tree

2 files changed

+31
-17
lines changed

2 files changed

+31
-17
lines changed

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

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build mkl-service with clang
1+
name: Build project with IntelLLVM clang compiler
22

33
on:
44
push:
@@ -10,12 +10,19 @@ permissions: read-all
1010

1111
jobs:
1212
build-with-clang:
13-
name: Build project with IntelLLVM clang compiler
1413
runs-on: ubuntu-latest
1514

15+
strategy:
16+
matrix:
17+
python: ["3.10", "3.11", "3.12"] # 3.9 fails - gh-issue#56
18+
1619
env:
1720
ONEAPI_ROOT: /opt/intel/oneapi
1821

22+
defaults:
23+
run:
24+
shell: bash -el {0}
25+
1926
steps:
2027
- name: Cancel Previous Runs
2128
uses: styfle/[email protected]
@@ -39,7 +46,7 @@ jobs:
3946
- name: Setup Python
4047
uses: actions/setup-python@v5
4148
with:
42-
python-version: '3.12'
49+
python-version: ${{ matrix.python }}
4350
architecture: x64
4451

4552
- name: Checkout repo
@@ -48,28 +55,25 @@ jobs:
4855
fetch-depth: 0
4956

5057
- name: Install mkl-service dependencies
51-
shell: bash -l {0}
52-
run: |
53-
pip install numpy cython setuptools pytest pytest-cov
58+
uses: BSFishy/pip-action@v1
59+
with:
60+
packages: |
61+
cython
62+
setuptools
63+
pytest
5464
5565
- name: List oneAPI folder content
56-
shell: bash -l {0}
57-
run: ls /opt/intel/oneapi/compiler
66+
run: ls ${{ env.ONEAPI_ROOT }}/compiler
5867

5968
- name: Build mkl-service
60-
shell: bash -l {0}
6169
run: |
62-
source /opt/intel/oneapi/setvars.sh
70+
source ${{ env.ONEAPI_ROOT }}/setvars.sh
6371
echo $CMPLR_ROOT
64-
export CC=$CMPLR_ROOT/bin/compiler/clang
65-
export CXX=$CMPLR_ROOT/bin/compiler/clang++
72+
export CC=$CMPLR_ROOT/bin/icx
6673
export CFLAGS="${CFLAGS} -fno-fast-math"
67-
echo "CC = ${CC} CXX=${CXX}"
68-
ls -l ${CC} ${CXX}
6974
python setup.py develop
7075
71-
- name: Run mkl-service tests
72-
shell: bash -l {0}
76+
- name: Run mkl-service tests
7377
run: |
74-
source /opt/intel/oneapi/setvars.sh
78+
source ${{ env.ONEAPI_ROOT }}/setvars.sh
7579
pytest -s -v --pyargs mkl

.github/workflows/conda-package.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
matrix:
2323
python: ["3.9", "3.10", "3.11", "3.12"]
2424
steps:
25+
- name: Cancel Previous Runs
26+
uses: styfle/[email protected]
27+
with:
28+
access_token: ${{ github.token }}
29+
2530
- uses: actions/[email protected]
2631
with:
2732
fetch-depth: 0
@@ -71,6 +76,11 @@ jobs:
7176
env:
7277
conda-bld: C:\Miniconda\conda-bld\win-64\
7378
steps:
79+
- name: Cancel Previous Runs
80+
uses: styfle/[email protected]
81+
with:
82+
access_token: ${{ github.token }}
83+
7484
- uses: actions/[email protected]
7585
with:
7686
fetch-depth: 0

0 commit comments

Comments
 (0)