Skip to content

Commit 11ba0d0

Browse files
committed
Organize the workspace of test crates a bit better
Using workspace = true (Rust 1.64+)
1 parent 14c8123 commit 11ba0d0

File tree

13 files changed

+41
-18
lines changed

13 files changed

+41
-18
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
- beta
5252
- nightly
5353
- 1.64.0 # MSRV
54+
- 1.66.0 # MSRV
55+
- 1.68.0 # MSRV
5456

5557
name: tests/${{ matrix.rust }}
5658
steps:

Cargo.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,18 @@ opt-level = 2
8080
opt-level = 2
8181

8282
[workspace]
83-
members = ["ndarray-rand", "xtest-serialization", "xtest-blas", "xtest-numeric"]
83+
members = [
84+
"ndarray-rand",
85+
"extra-tests/serialization",
86+
"extra-tests/blas",
87+
"extra-tests/numeric",
88+
]
89+
90+
[workspace.dependencies]
91+
ndarray = { path = "." }
92+
num-traits = { version = "0.2", default-features = false }
93+
num-complex = { version = "0.4", default-features = false }
94+
ndarray-rand = { path = "./ndarray-rand" }
8495

8596
[package.metadata.release]
8697
no-dev-version = true

extra-tests/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Extra Tests
3+
4+
These are test crates whose settings, features and dependencies should be
5+
separate from the main crate.

xtest-blas/Cargo.toml renamed to extra-tests/blas/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ test = false
1111
[dev-dependencies]
1212
approx = "0.5"
1313
defmac = "0.2"
14-
num-traits = "0.2"
15-
num-complex = { version = "0.4", default-features = false }
14+
num-traits = { workspace = true }
15+
num-complex = { workspace = true }
1616

1717
[dependencies]
18-
ndarray = { path = "..", features = ["approx", "blas"] }
18+
ndarray = { workspace = true, features = ["approx"] }
1919

2020
blas-src = { version = "0.10", optional = true }
2121

File renamed without changes.
File renamed without changes.

xtest-numeric/Cargo.toml renamed to extra-tests/numeric/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ edition = "2018"
77

88
[dependencies]
99
approx = "0.5"
10-
ndarray = { path = "..", features = ["approx"] }
11-
ndarray-rand = { path = "../ndarray-rand" }
10+
ndarray = { workspace = true, features = ["approx"] }
11+
ndarray-rand = { workspace = true }
1212
rand_distr = "0.4"
1313

1414
blas-src = { optional = true, version = "0.10", default-features = false, features = ["openblas"] }
@@ -19,8 +19,8 @@ version = "0.8.0"
1919
features = ["small_rng"]
2020

2121
[dev-dependencies]
22-
num-traits = { version = "0.2.14", default-features = false }
23-
num-complex = { version = "0.4", default-features = false }
22+
num-traits = { workspace = true }
23+
num-complex = { workspace = true }
2424

2525
[lib]
2626
test = false
File renamed without changes.
File renamed without changes.

xtest-serialization/Cargo.toml renamed to extra-tests/serialization/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition = "2018"
99
test = false
1010

1111
[dependencies]
12-
ndarray = { path = "..", features = ["serde"] }
12+
ndarray = { workspace = true, features = ["serde"] }
1313

1414
[features]
1515
default = ["ron"]
@@ -22,8 +22,8 @@ default-features = false
2222
version = "1.0.40"
2323

2424
[dev-dependencies.rmp-serde]
25-
version = "0.14.0"
25+
version = "1.3"
2626

2727
[dependencies.ron]
28-
version = "0.5.1"
28+
version = "0.8.1"
2929
optional = true

0 commit comments

Comments
 (0)