Skip to content

Commit b701f19

Browse files
authored
Merge pull request #82 from rust-math/drop-download-feature
Drop download feature
2 parents 389209d + 9f6540d commit b701f19

File tree

12 files changed

+32
-310
lines changed

12 files changed

+32
-310
lines changed

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

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,6 @@ on:
77
pull_request: {}
88

99
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/toolchain@v1
23-
with:
24-
toolchain: "1.56.0"
25-
profile: minimal
26-
default: true
27-
override: true
28-
- uses: actions-rs/cargo@v1
29-
with:
30-
command: test
31-
args: >
32-
--manifest-path=intel-mkl-sys/Cargo.toml
33-
--no-default-features
34-
--features=${{ matrix.feature }},download
35-
36-
macos:
37-
strategy:
38-
fail-fast: false
39-
matrix:
40-
feature:
41-
- mkl-dynamic-lp64-iomp
42-
- mkl-dynamic-lp64-seq
43-
- mkl-dynamic-ilp64-iomp
44-
- mkl-dynamic-ilp64-seq
45-
runs-on: macos-10.15
46-
steps:
47-
- uses: actions/checkout@v1
48-
- uses: actions-rs/toolchain@v1
49-
with:
50-
toolchain: "1.56.0"
51-
profile: minimal
52-
default: true
53-
override: true
54-
- uses: actions-rs/cargo@v1
55-
with:
56-
command: test
57-
args: >
58-
--manifest-path=intel-mkl-sys/Cargo.toml
59-
--no-default-features
60-
--features=${{ matrix.feature }},download
61-
6210
linux:
6311
strategy:
6412
fail-fast: false
@@ -73,18 +21,14 @@ jobs:
7321
- mkl-dynamic-ilp64-iomp
7422
- mkl-dynamic-ilp64-seq
7523
runs-on: ubuntu-22.04
24+
container:
25+
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0
7626
steps:
7727
- uses: actions/checkout@v1
78-
- uses: actions-rs/toolchain@v1
79-
with:
80-
toolchain: "1.56.0"
81-
profile: minimal
82-
default: true
83-
override: true
8428
- uses: actions-rs/cargo@v1
8529
with:
8630
command: test
8731
args: >
8832
--manifest-path=intel-mkl-sys/Cargo.toml
8933
--no-default-features
90-
--features=${{ matrix.feature }},download
34+
--features=${{ matrix.feature }}

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

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,36 @@ jobs:
2424
profile: minimal
2525
default: true
2626
override: true
27-
- uses: actions-rs/cargo@v1
27+
- name: cargo test
28+
uses: actions-rs/cargo@v1
2829
with:
2930
command: test
3031
args: --manifest-path=intel-mkl-tool/Cargo.toml
31-
name: cargo-test
32-
- uses: actions-rs/cargo@v1
32+
- name: cargo test with no-default-features
33+
uses: actions-rs/cargo@v1
3334
with:
3435
command: test
35-
args: --manifest-path=intel-mkl-tool/Cargo.toml --no-default-features
36-
name: cargo-test no-default-features
36+
args: >
37+
--manifest-path=intel-mkl-tool/Cargo.toml
38+
--no-default-features
3739
38-
docker:
39-
runs-on: ubuntu-22.04
40+
seek:
4041
strategy:
4142
fail-fast: false
4243
matrix:
43-
target: ["test", "package", "seek", "seek-ubuntu", "seek-centos"]
44+
image:
45+
- mkl-rust
46+
- mkl-ubuntu
47+
- mkl-centos
48+
runs-on: ubuntu-22.04
49+
container:
50+
image: ghcr.io/rust-math/intel-mkl-src/${{ matrix.image }}:1.56.0
4451
steps:
4552
- uses: actions/checkout@v1
46-
- name: Test with mkl-rust container
47-
run: make -C intel-mkl-tool ${{ matrix.target }}
53+
- name: cargo run -- seek
54+
uses: actions-rs/cargo@v1
55+
with:
56+
command: run
57+
args: >
58+
--manifest-path=intel-mkl-tool/Cargo.toml
59+
-- seek

.github/workflows/rust.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,21 @@ on:
99
jobs:
1010
check-format:
1111
runs-on: ubuntu-22.04
12+
container:
13+
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0
1214
steps:
1315
- uses: actions/checkout@v1
14-
- uses: actions-rs/toolchain@v1
15-
with:
16-
toolchain: "1.56.0"
17-
profile: minimal
18-
components: rustfmt
19-
default: true
20-
override: true
2116
- uses: actions-rs/cargo@v1
2217
with:
2318
command: fmt
2419
args: -- --check
2520

2621
clippy:
2722
runs-on: ubuntu-22.04
23+
container:
24+
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0
2825
steps:
2926
- uses: actions/checkout@v1
30-
- uses: actions-rs/toolchain@v1
31-
with:
32-
toolchain: "1.56.0"
33-
profile: minimal
34-
components: clippy
35-
default: true
36-
override: true
3727
- uses: actions-rs/cargo@v1
3828
with:
3929
command: clippy

docker/mkl-rust.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ RUN sed -i "s/MKLROOT/prefix/g" ${PKG_CONFIG_PATH}/*.pc
2929
# Setup basic rust development tools
3030
WORKDIR /src
3131
RUN cargo install cargo-tarpaulin
32+
RUN rustup component add rustfmt clippy

intel-mkl-src/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ mkl-dynamic-lp64-seq = []
2929
mkl-dynamic-ilp64-iomp = []
3030
mkl-dynamic-ilp64-seq = []
3131

32-
# Enable downloading from AWS S3 when system MKL not found
33-
download = ["intel-mkl-tool/archive"]
34-
3532
[build-dependencies]
3633
anyhow = "1.0.58"
3734
intel-mkl-tool = { version = "0.3.0", path = "../intel-mkl-tool", default-features = false }

intel-mkl-sys/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ keywords = ["ffi"]
1212
license = "MIT"
1313

1414
[features]
15-
default = ["download", "mkl-static-ilp64-seq"]
15+
default = ["mkl-static-ilp64-seq"]
1616

1717
# MKL config
1818
# https://software.intel.com/content/www/us/en/develop/articles/intel-math-kernel-library-intel-mkl-and-pkg-config-tool.html
@@ -25,9 +25,6 @@ mkl-dynamic-lp64-seq = ["intel-mkl-src/mkl-dynamic-lp64-seq"]
2525
mkl-dynamic-ilp64-iomp = ["intel-mkl-src/mkl-dynamic-ilp64-iomp"]
2626
mkl-dynamic-ilp64-seq = ["intel-mkl-src/mkl-dynamic-ilp64-seq"]
2727

28-
# Enable downloading from AWS S3 when not found
29-
download = ["intel-mkl-src/download"]
30-
3128
[dependencies]
3229
intel-mkl-src = { path = "../intel-mkl-src", version = "0.7.0", default-features = false }
3330

intel-mkl-tool/Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ license = "MIT"
1212

1313
[features]
1414
default = ["cli"]
15-
archive = ["curl", "tar", "zstd"]
16-
cli = ["structopt", "archive"]
15+
cli = ["structopt"]
1716

1817
[dependencies]
1918
anyhow = "1.0.58"
@@ -22,11 +21,6 @@ dirs = "4.0.0"
2221
glob = "0.3.0"
2322
pkg-config = "0.3.25"
2423

25-
# archive
26-
curl = { version = "0.4.44", optional = true }
27-
tar = { version = "0.4.38", optional = true }
28-
zstd = { version = "0.11.2", optional = true }
29-
3024
# CLI
3125
structopt = { version = "0.3.26", optional = true }
3226

intel-mkl-tool/Makefile

Lines changed: 0 additions & 19 deletions
This file was deleted.

intel-mkl-tool/src/cli.rs

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,18 @@
11
use anyhow::{bail, Result};
22
use intel_mkl_tool::*;
3-
use std::{env, path::PathBuf, str::FromStr};
43
use structopt::StructOpt;
54

65
/// CLI tool for intel-mkl crate
76
#[derive(Debug, StructOpt)]
87
enum Opt {
9-
/// Download Intel-MKL library
10-
Download {
11-
/// Archive name, e.g. "mkl-static-lp64-iomp". Download all archives if None
12-
#[structopt(long = "name")]
13-
name: Option<String>,
14-
/// Install destination
15-
#[structopt(short = "o", long = "path")]
16-
path: PathBuf,
17-
},
18-
198
/// Seek Intel-MKL library
209
Seek {},
21-
22-
/// Package Intel MKL libraries into an archive
23-
Package {
24-
#[structopt(long = "name")]
25-
name: Option<String>,
26-
#[structopt(short = "o", long = "path")]
27-
path: Option<PathBuf>,
28-
},
2910
}
3011

3112
fn main() -> Result<()> {
3213
let opt = Opt::from_args();
3314

3415
match opt {
35-
Opt::Download { name, path } => {
36-
if let Some(name) = name {
37-
let cfg = Config::from_str(&name)?;
38-
cfg.download(&path.join(cfg.to_string()))?;
39-
} else {
40-
for cfg in Config::possibles() {
41-
println!("Download archive {:<22} into {}", cfg, path.display());
42-
cfg.download(&path.join(cfg.to_string()))?;
43-
}
44-
}
45-
}
46-
4716
Opt::Seek {} => {
4817
let available = Entry::available();
4918
if available.is_empty() {
@@ -60,31 +29,6 @@ fn main() -> Result<()> {
6029
}
6130
}
6231
}
63-
64-
Opt::Package { name, path } => {
65-
let path = path.unwrap_or(env::current_dir().unwrap());
66-
if let Some(name) = name {
67-
let cfg = Config::from_str(&name)?;
68-
let entry = Entry::from_config(cfg)?;
69-
let path = if let Ok(version) = entry.version() {
70-
path.join(format!("{}.{}", version.0, version.1))
71-
} else {
72-
path
73-
};
74-
let package = entry.package(&path)?;
75-
println!("Pacakge created: {}", package.display());
76-
} else {
77-
for entry in Entry::available() {
78-
let path = if let Ok(version) = entry.version() {
79-
path.join(format!("{}.{}", version.0, version.1))
80-
} else {
81-
path.clone()
82-
};
83-
let package = entry.package(&path)?;
84-
println!("Pacakge created: {}", package.display());
85-
}
86-
}
87-
}
8832
}
8933
Ok(())
9034
}

0 commit comments

Comments
 (0)