Skip to content

Commit f60d947

Browse files
authored
Merge pull request #104 from rust-math/windows-ocipkg
ocipkg for Windows
2 parents 9414e8d + 8245698 commit f60d947

File tree

3 files changed

+37
-11
lines changed

3 files changed

+37
-11
lines changed

.github/workflows/intel-mkl-sys.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ jobs:
4747
image: rust:1.62.1
4848
steps:
4949
- uses: actions/checkout@v1
50-
- uses: actions-rs/cargo@v1
51-
with:
52-
command: install
53-
args: ocipkg-cli
5450
- uses: actions-rs/cargo@v1
5551
with:
5652
command: test
@@ -87,7 +83,25 @@ jobs:
8783
command: test
8884
args: >
8985
--manifest-path=intel-mkl-sys/Cargo.toml
90-
--no-default-features
9186
--features=${{ matrix.feature }}
9287
env:
9388
MKLROOT: ${{ github.workspace }}
89+
90+
windows-ocipkg:
91+
strategy:
92+
fail-fast: false
93+
matrix:
94+
feature:
95+
- mkl-static-lp64-iomp
96+
- mkl-static-lp64-seq
97+
- mkl-static-ilp64-iomp
98+
- mkl-static-ilp64-seq
99+
runs-on: windows-2022
100+
steps:
101+
- uses: actions/checkout@v1
102+
- uses: actions-rs/cargo@v1
103+
with:
104+
command: test
105+
args: >
106+
--manifest-path=intel-mkl-sys/Cargo.toml
107+
--features=${{ matrix.feature }}

intel-mkl-src/Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,9 @@ mkl-dynamic-ilp64-seq = []
3131

3232
[build-dependencies]
3333
anyhow = "1.0.58"
34-
ocipkg = "0.2.6"
35-
intel-mkl-tool = { version = "0.8.0-rc.0", path = "../intel-mkl-tool", default-features = false }
34+
ocipkg = "0.2.8"
35+
36+
[build-dependencies.intel-mkl-tool]
37+
path = "../intel-mkl-tool"
38+
version = "0.8.0"
39+
default-features = false

intel-mkl-src/build.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,18 @@ fn main() -> Result<()> {
6666
// where ocipkg download archive is not searched by ld
6767
// unless user set `LD_LIBRARY_PATH` explictly.
6868
if cfg.link == LinkType::Static {
69-
let _ = ocipkg::link_package(&format!(
70-
"ghcr.io/rust-math/rust-mkl/{}:2020.1-2851133947",
71-
MKL_CONFIG
72-
));
69+
if cfg!(target_os = "linux") {
70+
let _ = ocipkg::link_package(&format!(
71+
"ghcr.io/rust-math/rust-mkl/linux/{}:2020.1-3038006115",
72+
MKL_CONFIG
73+
));
74+
}
75+
if cfg!(target_os = "windows") {
76+
let _ = ocipkg::link_package(&format!(
77+
"ghcr.io/rust-math/rust-mkl/windows/{}:2022.0-3038006115",
78+
MKL_CONFIG
79+
));
80+
}
7381
}
7482

7583
Ok(())

0 commit comments

Comments
 (0)