Skip to content

Commit 5b7dcd0

Browse files
committed
Test Library::pkg_config
1 parent 1edb6b1 commit 5b7dcd0

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

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

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,23 @@ jobs:
3535
args: --manifest-path=intel-mkl-tool/Cargo.toml --no-default-features
3636
name: cargo-test no-default-features
3737

38-
docker:
38+
find_system_mkl:
3939
runs-on: ubuntu-22.04
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
target: ["test", "package", "seek", "seek-ubuntu", "seek-centos"]
44-
steps:
45-
- uses: actions/checkout@v1
46-
- name: Test with mkl-rust container
47-
run: make -C intel-mkl-tool ${{ matrix.target }}
48-
49-
seek-opt-intel:
50-
runs-on: ubuntu-22.04
43+
image: ["mkl-rust", "mkl-ubuntu", "mkl-centos"]
5144
container:
52-
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0
45+
image: ghcr.io/rust-math/intel-mkl-src/${{ matrix.image }}:1.56.0
5346
steps:
5447
- uses: actions/checkout@v1
5548
- uses: actions-rs/cargo@v1
56-
name: cargo test seek_opt_intel
49+
name: Seek /opt/intel
50+
with:
51+
command: test
52+
args: --manifest-path=intel-mkl-tool/Cargo.toml seek_opt_intel -- --ignored --show-output
53+
- uses: actions-rs/cargo@v1
54+
name: Use pkg-config
5755
with:
5856
command: test
59-
args: >
60-
--manifest-path=intel-mkl-tool/Cargo.toml
61-
seek_opt_intel
62-
--
63-
--ignored
64-
--show-output
57+
args: --manifest-path=intel-mkl-tool/Cargo.toml pkg_config -- --ignored --show-output

intel-mkl-tool/src/entry.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -421,19 +421,22 @@ impl Entry {
421421
mod tests {
422422
use super::*;
423423

424-
/// Test all available MKL are detected
424+
/// Seek /opt/intel in Linux system
425425
#[ignore]
426426
#[test]
427-
fn with_mkl_availables() {
428-
assert_eq!(Entry::available().len(), 8);
427+
fn seek_opt_intel() {
428+
for cfg in Config::possibles() {
429+
let lib = Library::seek_directory(cfg, "/opt/intel").unwrap();
430+
dbg!(lib);
431+
}
429432
}
430433

431-
/// Seek /opt/intel in Linux system
432434
#[ignore]
433435
#[test]
434-
fn seek_opt_intel() {
435-
let cfg = Config::from_str("mkl-static-lp64-seq").unwrap();
436-
let lib = Library::seek_directory(cfg, "/opt/intel").unwrap();
437-
dbg!(lib);
436+
fn pkg_config() {
437+
for cfg in Config::possibles() {
438+
let lib = Library::pkg_config(cfg).unwrap();
439+
dbg!(lib);
440+
}
438441
}
439442
}

0 commit comments

Comments
 (0)