Skip to content

Commit 52a906e

Browse files
committed
Cover all cases
Update CI Split workflows Fix Enable Intel-mKL downlaod flag Split linux/macos Fix typo
1 parent 688f80c commit 52a906e

File tree

6 files changed

+196
-80
lines changed

6 files changed

+196
-80
lines changed

.github/workflows/intel-mkl.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: intel-mkl-backend
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
9+
jobs:
10+
windows:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
feature:
15+
- mkl-static-lp64-seq
16+
- mkl-static-ilp64-seq
17+
- mkl-dynamic-lp64-seq
18+
- mkl-dynamic-ilp64-seq
19+
runs-on: windows-2019
20+
steps:
21+
- uses: actions/checkout@v1
22+
- uses: actions-rs/cargo@v1
23+
with:
24+
command: test
25+
args: >
26+
--no-default-features
27+
--features=${{ matrix.feature }}
28+
29+
macos:
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
feature:
34+
- mkl-dynamic-lp64-iomp
35+
- mkl-dynamic-lp64-seq
36+
- mkl-dynamic-ilp64-iomp
37+
- mkl-dynamic-ilp64-seq
38+
runs-on: macos-10.15
39+
steps:
40+
- uses: actions/checkout@v1
41+
- uses: actions-rs/cargo@v1
42+
with:
43+
command: test
44+
args: >
45+
--no-default-features
46+
--features=${{ matrix.feature }}
47+
48+
linux:
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
feature:
53+
- mkl-static-lp64-iomp
54+
- mkl-static-lp64-seq
55+
- mkl-static-ilp64-iomp
56+
- mkl-static-ilp64-seq
57+
- mkl-dynamic-lp64-iomp
58+
- mkl-dynamic-lp64-seq
59+
- mkl-dynamic-ilp64-iomp
60+
- mkl-dynamic-ilp64-seq
61+
runs-on: ubuntu-18.04
62+
steps:
63+
- uses: actions/checkout@v1
64+
- uses: actions-rs/cargo@v1
65+
with:
66+
command: test
67+
args: >
68+
--no-default-features
69+
--features=${{ matrix.feature }}

.github/workflows/netlib.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: netlib-backend
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
9+
jobs:
10+
linux:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
feature:
15+
- system
16+
- static
17+
runs-on: ubuntu-18.04
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: apt install gfortran
21+
run: sudo apt update && sudo apt install -y gfortran
22+
- name: apt install netlib
23+
run: sudo apt update && sudo apt install -y libblas-dev liblapack-dev liblapacke-dev
24+
if: ${{ matrix.feature == 'system' }}
25+
- uses: actions-rs/cargo@v1
26+
with:
27+
command: test
28+
args: >
29+
--no-default-features
30+
--features=netlib-${{ matrix.feature }}
31+
32+
macos:
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
feature:
37+
- system
38+
- static
39+
runs-on: macos-10.15
40+
steps:
41+
- uses: actions/checkout@v1
42+
- uses: actions-rs/cargo@v1
43+
with:
44+
command: test
45+
args: >
46+
--no-default-features
47+
--features=netlib-${{ matrix.feature }}

.github/workflows/openblas.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: openblas-backend
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request: {}
8+
9+
jobs:
10+
linux:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
feature:
15+
- system
16+
- static
17+
runs-on: ubuntu-18.04
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: apt install gfortran
21+
run: sudo apt update && sudo apt install -y gfortran
22+
- name: apt install openblas
23+
run: sudo apt update && sudo apt install -y libopenblas-dev
24+
if: ${{ matrix.feature == 'system' }}
25+
- uses: actions-rs/cargo@v1
26+
with:
27+
command: test
28+
args: >
29+
--no-default-features
30+
--features=openblas-${{ matrix.feature }}
31+
32+
macos:
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
feature:
37+
- system
38+
- static
39+
runs-on: macos-10.15
40+
steps:
41+
- uses: actions/checkout@v1
42+
- uses: actions-rs/cargo@v1
43+
with:
44+
command: test
45+
args: >
46+
--no-default-features
47+
--features=openblas-${{ matrix.feature }}

.github/workflows/rust.yml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,6 @@ on:
77
pull_request: {}
88

99
jobs:
10-
windows:
11-
runs-on: windows-2019
12-
steps:
13-
- uses: actions/checkout@v1
14-
- uses: actions-rs/cargo@v1
15-
with:
16-
command: test
17-
args: --features=intel-mkl --no-default-features
18-
19-
macos:
20-
runs-on: macos-10.15
21-
env:
22-
CC: gcc-9
23-
FC: gfortran-9
24-
LIBRARY_PATH: /usr/local/opt/gcc/lib/gcc/9
25-
strategy:
26-
fail-fast: false
27-
matrix:
28-
feature:
29-
- netlib
30-
- openblas
31-
- intel-mkl
32-
steps:
33-
- uses: actions/checkout@v1
34-
- uses: actions-rs/cargo@v1
35-
with:
36-
command: test
37-
args: --features=${{ matrix.feature }} --no-default-features
38-
39-
linux:
40-
runs-on: ubuntu-18.04
41-
strategy:
42-
fail-fast: false
43-
matrix:
44-
feature:
45-
- netlib
46-
- openblas
47-
- intel-mkl
48-
steps:
49-
- uses: actions/checkout@v1
50-
- name: apt-install gfortran
51-
run: |
52-
sudo apt update
53-
sudo apt install -y gfortran
54-
if: ${{ matrix.feature != 'intel-mkl' }}
55-
- uses: actions-rs/cargo@v1
56-
with:
57-
command: test
58-
args: --features=${{ matrix.feature }} --no-default-features
59-
6010
check-format:
6111
runs-on: ubuntu-18.04
6212
steps:

Cargo.toml

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,37 @@ readme = "README.md"
1313
categories = ["algorithms", "science"]
1414

1515
[features]
16-
default = []
17-
intel-mkl = ["lapack-src/intel-mkl", "blas-src/intel-mkl"]
18-
netlib = ["lapack-src/netlib", "blas-src/netlib"]
19-
openblas = ["lapack-src/openblas", "blas-src/openblas"]
20-
serde-1 = ["ndarray/serde-1", "num-complex/serde"]
21-
22-
static = ["openblas-static"]
23-
openblas-static = ["openblas", "openblas-src"]
16+
default = []
17+
18+
netlib = ["netlib-static"]
19+
openblas = ["openblas-static"]
20+
intel-mkl = ["mkl-static-ilp64-seq"]
21+
22+
netlib-static = ["netlib-src/static"]
23+
netlib-system = ["netlib-src/system"]
24+
openblas-static = ["openblas-src/static"]
25+
openblas-system = ["openblas-src/system"]
26+
27+
mkl-static-lp64-iomp = ["intel-mkl-src/mkl-static-lp64-iomp"]
28+
mkl-static-lp64-seq = ["intel-mkl-src/mkl-static-lp64-seq"]
29+
mkl-static-ilp64-iomp = ["intel-mkl-src/mkl-static-ilp64-iomp"]
30+
mkl-static-ilp64-seq = ["intel-mkl-src/mkl-static-ilp64-seq"]
31+
mkl-dynamic-lp64-iomp = ["intel-mkl-src/mkl-dynamic-lp64-iomp"]
32+
mkl-dynamic-lp64-seq = ["intel-mkl-src/mkl-dynamic-lp64-seq"]
33+
mkl-dynamic-ilp64-iomp = ["intel-mkl-src/mkl-dynamic-ilp64-iomp"]
34+
mkl-dynamic-ilp64-seq = ["intel-mkl-src/mkl-dynamic-ilp64-seq"]
2435

2536
[dependencies]
37+
cauchy = "0.2.2"
2638
lapacke = "0.2.0"
39+
ndarray = { version = "0.13", features = ["blas", "approx", "serde-1"], default-features = false }
40+
num-complex = { version = "0.2", features = ["serde"] }
2741
num-traits = "0.2.11"
28-
cauchy = "0.2.2"
29-
num-complex = "0.2.4"
3042
rand = "0.5"
3143

32-
[dependencies.ndarray]
33-
version = "0.13.0"
34-
features = ["blas", "approx"]
35-
default-features = false
36-
37-
[dependencies.blas-src]
38-
version = "0.6.1"
39-
default-features = false
40-
41-
[dependencies.lapack-src]
42-
version = "0.6.0"
43-
default-features = false
44-
45-
[dependencies.openblas-src]
46-
version = "0.9.0"
47-
default-features = false
48-
features = ["static"]
49-
optional = true
44+
openblas-src = { version = "0.9.0", optional = true }
45+
netlib-src = { version = "0.8.0", optional = true }
46+
intel-mkl-src = { version = "0.6.0", default-features = false, features = ["download"], optional = true }
5047

5148
[dev-dependencies]
5249
paste = "0.1.9"

src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@
4141
#[macro_use]
4242
extern crate ndarray;
4343

44-
extern crate blas_src;
45-
extern crate lapack_src;
44+
#[cfg(feature = "intel-mkl")]
45+
extern crate intel_mkl_src as _src;
46+
47+
#[cfg(feature = "openblas")]
48+
extern crate openblas_src as _src;
49+
50+
#[cfg(feature = "netlib")]
51+
extern crate netlib_src as _src;
4652

4753
pub mod assert;
4854
pub mod cholesky;

0 commit comments

Comments
 (0)