Skip to content

ocipkg for Windows #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .github/workflows/intel-mkl-sys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ jobs:
image: rust:1.62.1
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
with:
command: install
args: ocipkg-cli
- uses: actions-rs/cargo@v1
with:
command: test
Expand Down Expand Up @@ -87,7 +83,25 @@ jobs:
command: test
args: >
--manifest-path=intel-mkl-sys/Cargo.toml
--no-default-features
--features=${{ matrix.feature }}
env:
MKLROOT: ${{ github.workspace }}

windows-ocipkg:
strategy:
fail-fast: false
matrix:
feature:
- mkl-static-lp64-iomp
- mkl-static-lp64-seq
- mkl-static-ilp64-iomp
- mkl-static-ilp64-seq
runs-on: windows-2022
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
with:
command: test
args: >
--manifest-path=intel-mkl-sys/Cargo.toml
--features=${{ matrix.feature }}
8 changes: 6 additions & 2 deletions intel-mkl-src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@ mkl-dynamic-ilp64-seq = []

[build-dependencies]
anyhow = "1.0.58"
ocipkg = "0.2.6"
intel-mkl-tool = { version = "0.8.0-rc.0", path = "../intel-mkl-tool", default-features = false }
ocipkg = "0.2.8"

[build-dependencies.intel-mkl-tool]
path = "../intel-mkl-tool"
version = "0.8.0"
default-features = false
16 changes: 12 additions & 4 deletions intel-mkl-src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,18 @@ fn main() -> Result<()> {
// where ocipkg download archive is not searched by ld
// unless user set `LD_LIBRARY_PATH` explictly.
if cfg.link == LinkType::Static {
let _ = ocipkg::link_package(&format!(
"ghcr.io/rust-math/rust-mkl/{}:2020.1-2851133947",
MKL_CONFIG
));
if cfg!(target_os = "linux") {
let _ = ocipkg::link_package(&format!(
"ghcr.io/rust-math/rust-mkl/linux/{}:2020.1-3038006115",
MKL_CONFIG
));
}
if cfg!(target_os = "windows") {
let _ = ocipkg::link_package(&format!(
"ghcr.io/rust-math/rust-mkl/windows/{}:2022.0-3038006115",
MKL_CONFIG
));
}
}

Ok(())
Expand Down